Created
May 23, 2017 20:05
-
-
Save SirEdvin/f06f0068f05d86f900dc3ade5d7f8a90 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name _; | |
rewrite ^ https://$http_host$request_uri? permanent; # force redirect http to https | |
} | |
server { | |
listen 443; | |
ssl on; | |
ssl_certificate /path/to/ssl; | |
ssl_certificate_key /path/to/ssl; | |
server_name _; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains"; | |
server_tokens off; | |
location /robots.txt { | |
root /etc/nginx/additional/disallow-robots.txt; | |
} | |
location / { | |
proxy_pass http://127.0.0.1:8000; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; | |
access_log /var/log/nginx/seahub.access.log; | |
error_log /var/log/nginx/seahub.error.log; | |
fastcgi_read_timeout 36000; | |
client_max_body_size 0; | |
} | |
location /seafhttp { | |
rewrite ^/seafhttp(.*)$ $1 break; | |
proxy_pass http://127.0.0.1:8082; | |
client_max_body_size 0; | |
proxy_connect_timeout 36000s; | |
proxy_read_timeout 36000s; | |
proxy_send_timeout 36000s; | |
send_timeout 36000s; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment