astrXbian/.install/nvh/vhost.txt

36 lines
960 B
Plaintext

upstream $domain {
server 192.168.9.$ipvm:$port; #Production
#server 192.168.9.9; #Redirection maintenance
}
server {
server_name $domain;
listen 80;
include includes/errors.conf;
location / {
proxy_pass http://$domain;
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 https;
proxy_set_header Host $http_host;
proxy_redirect off;
}
location /ipfs {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
location /ipns {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
error_log /var/log/nginx/$domain_error.log;
access_log /var/log/nginx/$domain_access.log;
}