r3-config/nginx/sites-available/3d-racing.conf

30 lines
887 B
Plaintext
Raw Normal View History

2017-01-24 10:18:26 +01:00
#origin https://github.com/ToywheelDev/3d-racing.git
server {
listen 80;
2017-03-21 15:42:58 +01:00
server_name 3d-racing.gamewheel.com;
2017-01-24 10:18:26 +01:00
2017-01-24 17:44:43 +01:00
root /usr/share/gamewheel/3d-racing;
2017-01-24 10:18:26 +01:00
index index.html;
2017-03-21 15:42:58 +01:00
#We start to pass everything to express, otherwise we end up with '/' location saying 403 Forbidden
#Static files delivered trough express.static()
location ~ {
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
2017-01-24 10:18:26 +01:00
2017-03-21 15:42:58 +01:00
# Normal parameters
2017-01-24 10:18:26 +01:00
proxy_pass_request_headers on;
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;
2017-03-21 15:42:58 +01:00
proxy_pass http://3d-racing;
2017-01-24 10:18:26 +01:00
proxy_ssl_session_reuse off;
proxy_set_header Host $http_host;
proxy_redirect off;
2017-03-21 15:42:58 +01:00
}
2017-01-24 10:18:26 +01:00
}