加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
nginx.conf.template 1.48 KB
一键复制 编辑 原始数据 按行查看 历史
Alex Crichton 提交于 2017-01-26 11:04 . Ok no stapling for now
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable "msie6";
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /etc/letsencrypt/live/{{ nginx.hostname }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ nginx.hostname }}/privkey.pem;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;
ssl_protocols TLSv1.2;
ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security max-age=15768000;
server_name {{ nginx.hostname }};
access_log /var/log/nginx/{{ nginx.hostname }}.access.log;
location /homu/ {
proxy_pass http://localhost:7942/;
}
location ~ /.well-known {
root /usr/share/nginx/html;
allow all;
}
}
server {
listen 80;
server_name {{ nginx.hostname }};
return 301 https://$host$request_uri;
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化