Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
124 lines (104 sloc) 3.8 KB
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
http2_body_preread_size 64k;
include mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
aio on;
keepalive_timeout 65;
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 9;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types
text/plain
application/javascript
application/x-javascript
text/javascript
text/xml
text/css
font/ttf
font/opentype
application/vnd.ms-fontobject
image/svg+xml;
server {
# Deny illegal Host headers
if ($host !~* ^(laike9m.com|www.laike9m.com)$ ) {
return 444;
}
listen 80;
listen [::]:80;
server_name laike9m.com www.laike9m.com;
return 301 https://$server_name$request_uri;
}
# HTTPS server
server {
# Deny illegal Host headers
if ($host !~* ^(laike9m.com|www.laike9m.com)$ ) {
return 444;
}
listen [::]:443 ssl http2 default_server;
listen 443 ssl http2 default_server;
server_name laike9m.com www.laike9m.com;
keepalive_timeout 70;
ssl_buffer_size 1400;
ssl_certificate /etc/letsencrypt/live/laike9m.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/laike9m.com/privkey.pem;
#ssl_certificate /home/laike9m/files/laike9m_com/laike9m_com.chain.crt;
#ssl_certificate_key /home/laike9m/files/laike9m_com/key;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 5m;
ssl_session_tickets on;
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
ssl_prefer_server_ciphers on;
ssl_stapling on;
ssl_stapling_verify on;
ssl_trusted_certificate /home/laike9m/files/laike9m_com/laike9m_com.chain.crt;
ssl_dhparam /home/laike9m/files/dhparams.pem;
location /media {
alias /home/laike9m/media;
etag on;
expires max;
add_header Pragma public;
add_header Cache-Control "public";
access_log off;
}
location ~* ^/static/(.+\.css)$ {
alias /home/laike9m/static/$1;
etag on;
expires 1d;
add_header Pragma public;
add_header Cache-Control "public";
access_log off;
}
location /static {
alias /home/laike9m/static;
etag on;
expires max;
add_header Pragma public;
add_header Cache-Control "public";
access_log off;
}
location / {
include uwsgi_params;
uwsgi_pass unix:/tmp/uwsgi.sock;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
You can’t perform that action at this time.