0
當我試圖運行下面的nginx配置文件時,我得到錯誤無法GET /索引使用http://domain_name/index
。當我打到http://domain_name
時,其呼叫127.0.0.1/3000。我在這裏做錯了什麼。任何對此的幫助將會非常有幫助。Nginx位置指令無法訪問
error_log /tmp/logs/error.log;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
access_log /tmp/logs/access.log;
sendfile on;
keepalive_timeout 65;
include /etc/nginx/sites-enabled/*;
# BELOW IS THE PART TO PROXY MY samp1.js and samp2.js APP
upstream first_entry {
server 127.0.0.1:3000;
}
upstream second_entry {
server 127.0.0.1:5000;
}
server {
listen 80;
server_name domain_name;
location/{
proxy_pass http://first_entry;
}
location /index {
proxy_pass http://second_entry;
}
}
}
URL'http://127.0.0.1:5000'是否自行工作? –
@Mhamhammad AbuShady是它的工作 – user87267867