第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

用nginx配置node的程序,已經(jīng)改了conf的配置,用域名無法訪問?

用nginx配置node的程序,已經(jīng)改了conf的配置,用域名無法訪問?

繁星coding 2019-05-25 17:57:43
我用pm2運(yùn)行了一個(gè)node的示例程序(express的示例程序),目前可以用http://127.0.0.1:3000打開,現(xiàn)在我想用自己自定義的域名打開,但是我用nginx配置之后還是不能用自定義域名(http://mydomain.com)打開,用127.0.0.1或localhost是可以的,是不是還要在本機(jī)配置host呢?但是在網(wǎng)上找了一圈nginx配置經(jīng)驗(yàn)或說明沒有一個(gè)說還要改host,希望能有人解答。附上nginx.conf的配置信息#usernobody;worker_processes1;#error_loglogs/error.log;#error_loglogs/error.lognotice;#error_loglogs/error.loginfo;#pidlogs/nginx.pid;events{worker_connections1024;}http{includemime.types;default_typeapplication/octet-stream;#log_formatmain'$remote_addr-$remote_user[$time_local]"$request"'#'$status$body_bytes_sent"$http_referer"'#'"$http_user_agent""$http_x_forwarded_for"';#access_loglogs/access.logmain;sendfileon;#tcp_nopushon;#keepalive_timeout0;keepalive_timeout65;#gzipon;upstreamnodejs{server127.0.0.1:3000;}server{listen80;server_namewww.mydomain.commydomain.com;#charsetkoi8-r;#access_loglogs/host.access.logmain;location/{proxy_set_headerX-Real-IP$remote_addr;proxy_set_headerX-Forwarded-For$proxy_add_x_forwarded_for;proxy_set_headerHost$http_host;proxy_set_headerX-Nginx-Proxytrue;proxy_set_headerConnection"";proxy_passhttp://nodejs;#roothtml;#indexindex.htmlindex.htm;}#error_page404/404.html;#redirectservererrorpagestothestaticpage/50x.html#error_page500502503504/50x.html;location=/50x.html{roothtml;}}includeservers/*;}
查看完整描述

2 回答

  • 2 回答
  • 0 關(guān)注
  • 622 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)