← back to Petitionyour

deploy/nginx-petitionyour.org.http.conf

20 lines

# petitionyour.org — HTTP-ONLY bootstrap vhost.
# Installed FIRST so :80 answers petitionyour.org for certbot's HTTP-01 challenge.
# certbot --nginx then injects the :443 ssl block (mirroring petitionyour.com, which
# on this box gets both `listen 443 ssl` AND `listen 45.61.58.125:443 ssl` — the
# IP-bound line is what keeps it from being shadowed by the wildcard :443 default_server).
server {
    listen 80;
    listen 45.61.58.125:80;
    server_name petitionyour.org www.petitionyour.org;

    location / {
        proxy_pass http://127.0.0.1:9730;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}