Previous: , Up: Basic in GNU Artanis   [Contents]

7.6 Working with Nginx

You may try GNU Artanis+Nginx with so-called reverse proxy.

Although GNU Artanis has good server core, I would recommend you use Nginx as the front server. In addition to the performance, GNU Artanis hasn’t prepared for many security things. But if you use Ngxin with reverse-proxy, then it’ll be easier to be safer.

For example, you may add these lines to your /etc/nginx/nginx.conf:

location / {
        proxy_pass http://127.0.0.1:1234;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

Then restart you Nginx:

sudo service nginx restart

And run GNU Artanis:

(run #:port 1234)