Using Nginx as reverse proxy¶
Here is a example for Nginx configuration:
server {
listen 80;
listen [::]:80;
listen 443 http2 ssl;
listen [::]:443 http2 ssl;
server_name argos.example.org;
ssl_certificate /etc/letsencrypt/live/argos.example.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/argos.example.org/privkey.pem;
access_log /var/log/nginx/argos.example.org.access.log;
error_log /var/log/nginx/argos.example.org.error.log;
if ($scheme != "https") {
rewrite ^ https://$http_host$request_uri? permanent;
}
location / {
include proxy_params;
proxy_pass http://127.0.0.1:8000;
}
}
If you want to use Argos under a subdirectory of your web server, you’ll need to set the root_path
setting in Argos’s configuration and set Nginx like this:
location /foo/ {
include proxy_params;
proxy_pass http://127.0.0.1:8000/;
}