CentOS
- 5 ответов
- 0 вопросов
1
Вклад в тег
server {
listen 80;
server_name mysite.ru;
location / {
proxy_pass http://192.168.1.2;
proxy_set_header X-proxy 192.168.1.3;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Client-IP $remote_addr;
}
}
server {
listen 80;
server_name web1.mysite.ru;
location / {
proxy_pass http://192.168.1.2;
proxy_set_header X-proxy 192.168.1.3;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Client-IP $remote_addr;
}
}
server {
listen 80;
server_name corp1.mysite.ru;
root /var/www/corp1.mysite.ru
Тут описываете свои location для сайта (php/статика/....)
}