Created
December 14, 2013 21:35
-
-
Save punund/7965186 to your computer and use it in GitHub Desktop.
два файла конфигурации nginx
This file contains 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
ike@osaka:~$ cat /etc/nginx/sites-available/node-configly | |
server { | |
listen 80; | |
server_name www.config.ly; | |
location / { | |
proxy_pass http://unix:/var/run/proxy.sock/node-configly.80:$uri$is_args$args; | |
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; | |
proxy_set_header X-SSL ""; | |
} | |
} | |
ike@osaka:~$ cat /etc/nginx/sites-available/node-configly-ssl | |
server { | |
listen 443; | |
server_name www.config.ly; | |
ssl on; | |
ssl_certificate /opt/ssl/configly/production.pem; | |
ssl_certificate_key /opt/ssl/configly/production.key; | |
add_header Strict-Transport-Security max-age=500; | |
location / { | |
proxy_pass http://unix:/var/run/proxy.sock/node-configly.443:$uri$is_args$args; | |
proxy_cache_bypass $http_upgrade; | |
proxy_redirect off; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-NginX-Proxy true; | |
proxy_set_header X-SSL 1; | |
proxy_set_header x-bubu 'ssl'; | |
} | |
} | |
ike@osaka:~$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment