Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Part of my nginx configuration
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
server {
server_name dugovic.mooo.com;
listen 80;
error_log /var/log/nginx/lila.error.log;
access_log /var/log/nginx/lila.access.log;
charset utf-8;
location /assets {
add_header "Access-Control-Allow-Origin" "*";
rewrite "^/assets/_\w{6}/(.*)$" /assets/$1;
alias /home/lila/lila/public;
break;
}
location / {
proxy_pass http://127.0.0.1:9663/;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_read_timeout 90s;
}
error_page 500 501 502 503 /oops/servererror.html;
error_page 504 /oops/timeout.html;
error_page 429 /oops/toomanyrequests.html;
location /oops/ {
root /home/lila/lila/public/;
}
location = /robots.txt {
root /home/lila/lila/public/;
}
}
server {
server_name socket.dugovic.mooo.com;
listen 80;
charset utf-8;
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://127.0.0.1:9663/;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.