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

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

nginx不能應用mysite_nginx.conf中的配置,始終以默認配置啟動

nginx不能應用mysite_nginx.conf中的配置,始終以默認配置啟動

炎炎設(shè)計 2019-03-30 11:33:09
[補充]關(guān)于uwsgi_params:官網(wǎng)上面是這么說的:ConfigurenginxforyoursiteYouwillneedtheuwsgi_paramsfile,whichisavailableinthenginxdirectoryoftheuWSGIdistribution,orfromhttps://github.com/nginx/nginx/blob/master/conf/uwsgi_paramsCopyitintoyourprojectdirectory.Inamomentwewilltellnginxtorefertoit.[原文]按照這個文檔http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html部署uwsgi+nginx+django的時候,uwsgi和django或純python配合都能出正確結(jié)果,安裝了nginx之后也能在瀏覽器刷新看到Welcometonginx!。然后我把nginx配置文件建立在django項目文件夾下面了:#mysite_nginx.conf#theupstreamcomponentnginxneedstoconnecttoupstreamdjango{#serverunix:///path/to/your/mysite/mysite.sock;#forafilesocketserver127.0.0.1:8001;#forawebportsocket(we'llusethisfirst)}#configurationoftheserverserver{#theportyoursitewillbeservedonlisten8000;#thedomainnameitwillserveforserver_name192.168.33.10;#substituteyourmachine'sIPaddressorFQDNcharsetutf-8;#maxuploadsizeclient_max_body_size75M;#adjusttotaste#Djangomedialocation/media{alias/home/vagrant/mysite/mysite/media;#yourDjangoproject'smediafiles-amendasrequired}location/static{alias/home/vagrant/mysite/mysite/static;#yourDjangoproject'sstaticfiles-amendasrequired}#Finally,sendallnon-mediarequeststotheDjangoserver.location/{uwsgi_passdjango;include/home/vagrant/mysite/mysite/uwsgi_params;#theuwsgi_paramsfileyouinstalled}}但無論是試圖直接用test.py輸出helloworld,還是啟動django服務(wù)器,都仍然只能看到Welcometonginx!,服務(wù)器ip后面帶上路徑也是只有這個。直接用test.py的時候輸出如下:$uwsgi--socket:8001--wsgi-filetest.py***StartinguWSGI2.0.9(64bit)on[MonFeb215:54:012015]***compiledwithversion:4.6.3on02February201509:51:05os:Linux-3.2.0-23-generic#36-UbuntuSMPTueApr1020:39:51UTC2012nodename:precise64machine:x86_64clocksource:unixdetectednumberofCPUcores:2currentworkingdirectory:/home/vagrant/mysite/mysitedetectedbinarypath:/home/vagrant/mysite/bin/uwsgi!!!nointernalroutingsupport,rebuildwithpcresupport!!!***WARNING:youarerunninguWSGIwithoutitsmasterprocessmanager***yourprocessesnumberlimitis2782yourmemorypagesizeis4096bytesdetectedmaxfiledescriptornumber:1024lockengine:pthreadrobustmutexesthunderlock:disabled(youcanenableitwith--thunder-lock)uwsgisocket0boundtoTCPaddress:8001fd3Pythonversion:2.7.3(default,Dec182014,19:25:50)[GCC4.6.3]***Pythonthreadssupportisdisabled.Youcanenableitwith--enable-threads***Pythonmaininterpreterinitializedat0x1579b10yourserversocketlistenbacklogislimitedto100connectionsyourmercyforgracefuloperationsonworkersis60secondsmapped72768bytes(71KB)for1cores***OperationalMODE:singleprocess***WSGIapp0(mountpoint='')readyin0secondsoninterpreter0x1579b10pid:1655(defaultapp)***uWSGIisrunninginmultipleinterpretermode***spawneduWSGIworker1(andtheonly)(pid:1655,cores:1)
查看完整描述

2 回答

?
largeQ

TA貢獻2039條經(jīng)驗 獲得超8個贊

問題解決了。其實是因為/etc/nginx/sites-enabled/下面有兩個配置文件:default和我自己配置的mysite_nginx.conf,nginx默認使用了default。刪掉default就對了。
                            
查看完整回答
反對 回復 2019-03-30
?
犯罪嫌疑人X

TA貢獻2080條經(jīng)驗 獲得超4個贊

配置文件沒有起作用,檢查是否正確讀取了nginx的配置文件,先用個最簡單的demo測試是否配置文件按是否生效
                            
查看完整回答
反對 回復 2019-03-30
  • 2 回答
  • 0 關(guān)注
  • 556 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

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