-
Notifications
You must be signed in to change notification settings - Fork 302
Deployment With Nginx
PunitTailor55 edited this page Sep 20, 2020
·
9 revisions
Root the Box works well with Nginx for larger games. There is a basic Nginx config file located in the setup/
directory.
Set the x_headers = True
in the rootthebox.cfg (allows the real IP to be read - necessary for admin ip filtering)
In order to tell nginx to reverse proxying the rootthebox server you have to:
- Add the
nginx_vhost_rtb.conf
file located in thesetup/
directory in thesites-available/
folder of NGINX Server - Adapt the
nginx_vhost_rtb.conf
file and modify the linesserver_name <server_name>;
with your server name androot <PATH of RTB location>;
with where your RTB Server is - Execute the command
ln -s /etc/nginx/sites-available/nginx_vhost_rtb.conf /etc/nginx/sites-enabled/
- Insert these lines in the nginx.conf in the
http{}
block at the end
sendfile on;
server_tokens off;
gzip on;
gzip_http_version 1.0;
gzip_proxied any;
gzip_min_length 500;
gzip_disable "MSIE [1-6]\.";
gzip_types text/plain text/xml text/css
text/comma-separated-values
text/javascript
application/x-javascript
application/atom+xml;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
# Configuration containing list of application servers
# As of now we only use one process for the main app
upstream rtb_server {
server 127.0.0.1:8888;
}
- Restart NGINX server
Note : In nginx.conf
include /usr/local/etc/nginx/mime.types;
File location would be different. Please check your mime type file location.