-
Notifications
You must be signed in to change notification settings - Fork 302
Deployment With Nginx
loi219 edited this page Jan 11, 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 rtb.conf file located in the
setup/
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 - Insert this 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
Full tutorial coming soon ...