Last active
April 15, 2019 15:48
-
-
Save dmytrostriletskyi/95b443e62a943b46a970d0b928857c0b 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
user www-data; | |
worker_processes auto; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 768; | |
} | |
http { | |
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
server { | |
listen 80; | |
server_name websitenamewithdomain; | |
server_name_in_redirect on; | |
return 301 https://websitenamewithdomain$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
server_name websitenamewithdomain; | |
ssl_certificate /etc/comodo/ssl-bundle.crt; | |
ssl_certificate_key /etc/comodo/server.key; | |
error_page 500 502 503 504 /custom_50x_rb.html; | |
location = /custom_50x_rb.html { | |
root /usr/share/nginx/html; | |
internal; | |
} | |
location / { | |
proxy_http_version 1.1; | |
proxy_read_timeout 90; | |
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-Forwarded-Proto $scheme; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $connection_upgrade; | |
proxy_pass http://localhost:3333; | |
} | |
location /rpc/ { | |
proxy_http_version 1.1; | |
proxy_read_timeout 90; | |
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-Forwarded-Proto $scheme; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $connection_upgrade; | |
rewrite ^/rpc/$ / break; | |
proxy_pass http://localhost:8080; | |
} | |
location /monitoring/ { | |
proxy_http_version 1.1; | |
proxy_read_timeout 90; | |
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-Forwarded-Proto $scheme; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $connection_upgrade; | |
proxy_pass http://localhost:3000; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment