我试图在Windows 10中将ngnix用作tomcat8.5的反向代理,但是它不起作用。我参考了this
我已经在\ nginx-1.15.12 \ conf \ sites-enabled文件夹中创建了一个名为blah.com.conf的文件
server {
listen 80;
server_name blah.com www.blah.com;
location / {
proxy_pass http://127.0.0.1:8080/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
nginx.conf
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
include C:/nginx-1.15.12/conf/sites-enabled/*.conf;
}