以下の nginx 設定ファイルを実行しようとすると、Cannot GET /index on using というエラーが表示されますhttp://domain_name/index
。をhttp://domain_name
押すと、127.0.0.1/3000 を呼び出しています。ここで間違っていること。これに関するヘルプは本当に役に立ちます。
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;
}
}
}