這是我的整個 nginx.conf 文件
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
server_name subsonic.domain.com;
location / {
proxy_pass http://localhost:4040/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass_request_headers on;
}
}
# server {
# server_name perforce.domain.com;
# location / {
# proxy_pass http://localhost:1666/;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_pass_request_headers on;
# }
# }
}
我使用的是 Windows 8,如果我取消註解第二個伺服器聲明,nginx 會立即崩潰。我已經研究了幾個小時嘗試例子,但不知道為什麼這行不通。請幫忙,謝謝。