server {
listen 81;
server_name example.example.com;
access_log /var/log/nginx/example.log;
location /static/ {
root /opt/myenv/example_dir;
expires 30d;
}
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $server_name;
proxy_set_header X-Real_IP remote_addr;
proxy_set_header X-Forwarded-Proxy $proxy_add_x_forwarded_proxy;
}
}
server {
listen 80;
server_name example.com;
location / {
root /opt/myenv/example_dir_2;
index index.html;
}
}
server {
server_name www.lorena-salon.ru;
access_log /var/log/ispconfig/httpd/$host/access.log;
location / {
index index.php index.html index.htm;
root /var/www/lorena-salon.ru/web/;
proxy_pass http://www.lorena-salon.ru:82;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
server {
server_name www.kredo-m.ru;
access_log /var/log/ispconfig/httpd/$host/access.log;
location / {
index index.php index.html index.htm;
root /var/www/kredo-m.ru/web/;
proxy_pass http://www.kredo-m.ru:82;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}