Короткий мануал как я я всё настроил
Скачал свежий
Nginx
Распаковал по пути C:\nginx
Создал два файла cmd внутри папки nginx
start.cmd
@echo off
start /D%cd% nginx.exe
stop.cmd
@echo off
start /D%cd% nginx.exe -s quit
И отредактировал файл C:\nginx\conf\nginx.conf
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
#Server 1
server {
listen 80;
server_name server1.site.com;
#Redirect to HTTPS
location / {
proxy_pass http://10.0.0.1:80;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
#Server 2
server {
listen 80;
server_name server2.site.com;
#Redirect to HTTPS
location / {
proxy_pass http://10.0.0.2:80;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
Далее запустил Nginx с помощью start.cmd и все заработало!