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

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

nginx 到靜態(tài)頁面的路徑錯誤

nginx 到靜態(tài)頁面的路徑錯誤

明月笑刀無情 2021-11-09 20:38:17
雖然我在django中有應用,但我想設(shè)置一個靜態(tài)頁面。使用 nginx。但我收到一個錯誤:[alert] 100983#0: *439266 "/path_to_page_on_server/press_page.htmlindex.html" is not a directory,這是我的網(wǎng)址: url(r'^press/', TemplateView.as_view(template_name='press_page.html'), name='press')這是我在 nginx 中的配置包括:location /press/ {    alias /path_to_page_on_server/press_page.html;}我想下/press/有頁面press_page.html。
查看完整描述

1 回答

?
達令說

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

在 中nginx,您的index值被設(shè)置為index.html因此它被附加到alias-ed 位置。


您需要為index您的自定義文件指定,并將文件引用放入alias:


location /press/ {

    alias /path_to_page_on_server/;

    index press_page.html index.html;

}

最后一個index.html只是一個后備,你可以根據(jù)需要刪除/替換它。


查看完整回答
反對 回復 2021-11-09
  • 1 回答
  • 0 關(guān)注
  • 365 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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