0
我完全新的Nginx和使用它的第一次。我已經安裝在我的機器上nginx的和乘客的URL。下面是我的配置文件Nginx的配置多個URL
#http {
#passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
# Use /usr/bin/node by default.
#passenger_nodejs /usr/bin/nodejs;
server {
listen 80;
server_name 10.X.XX.XX;
# Tell Nginx and Passenger where your app's 'public' directory is
location /general/ {
root /var/www/app/general_pcap/public;
proxy_pass http://localhost:3000;
# Turn on Passenger
passenger_enabled on;
# Tell Passenger that your app is a Node.js app
passenger_startup_file app.js;
passenger_app_type node;
}
#passenger_env_var ROOT_URL http://127.0.0.1;
location/{
proxy_pass http://localhost:5601;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
#}
當我打的網址10.X.XX.X/generalPcap我沒有找到任何頁面。如何配置配置文件,以便在調用/ generalPCAP時,它將重定向到我的/ var/www/courantapp/general_pcap/public 位於的nodejs應用程序。
當我打電話10.X.XX.X/kibana會重定向到我的kibana在9601
嘗試將location/generalPcap下的「root」指令更改爲「別名」 –
它給了我無法GET/generalPcap –