24 lines
614 B
Plaintext
24 lines
614 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;
|
||
|
}
|
||
|
|
||
|
error_log /var/log/nginx/$domain_error.log;
|
||
|
access_log /var/log/nginx/$domain_access.log;
|
||
|
|
||
|
}
|