Jappix.com - NGINX dummy vhost configuration file
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
## | |
# @server jappix | |
# @host websocket.jappix.com | |
# @desc nginx host rules | |
# @author Valerian Saliou <valerian@valeriansaliou.name> | |
## | |
# HTTP/WS Server | |
server { | |
listen [::]:80; | |
server_name websocket.jappix.com; | |
root /dev/null; | |
access_log /var/log/nginx/websocket.jappix.com/access.log.gz extended gzip=6 buffer=64k; | |
error_log /var/log/nginx/websocket.jappix.com/error.log crit; | |
rewrite ^ https://$server_name$request_uri permanent; | |
} | |
# HTTPS/WSS Server | |
server { | |
listen [::]:443 ssl http2; | |
server_name websocket.jappix.com; | |
root /dev/null; | |
access_log /var/log/nginx/websocket.jappix.com/access.log.gz extended gzip=6 buffer=64k; | |
error_log /var/log/nginx/websocket.jappix.com/error.log crit; | |
location / { | |
rewrite ^/(.*)$ /xmpp-websockets$1 break; | |
proxy_pass http://localhost:5280; | |
proxy_read_timeout 86400s; | |
proxy_send_timeout 86400s; | |
proxy_buffering off; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $connection_upgrade; | |
} | |
include enforce_security.conf; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment