神剑山庄资源网 Design By www.hcban.com
本文讲述了PHP(FastCGI)在Nginx的alias下出现404错误的解决方法。分享给大家供大家参考,具体如下:
在Nginx的官方wiki中如下描述
The alias directive cannot be used inside a regex-specified location. If you need to do this you must use a combination of rewrite and root.
在实际使用中alias下面的php返回404,而html确可以正常显示,解决方法如下
location / { root /opt/www/htdocs/www; index index.php index.html index.htm; } location /bbs/ { alias /opt/www/htdocs/bbs/; index index.php index.html index.htm; } location ~ ^/bbs/.+.php{ root /opt/www/htdocs; rewrite /bbs/(.*.php"color: #ff0000">即用root加rewrite替换alias希望本文所述对大家nginx平台上的php程序设计有所帮助。
神剑山庄资源网 Design By www.hcban.com
神剑山庄资源网
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
神剑山庄资源网 Design By www.hcban.com
暂无PHP(FastCGI)在Nginx的alias下出现404错误的解决方法的评论...
更新日志
2024年09月20日
2024年09月20日
- 林宥嘉.2008-神秘嘉宾(引进版)【华研国际】【WAV+CUE】
- 徐小凤.1997-金曲精选(康艺经典珍藏系列)【康艺成音】【WAV+CUE】
- 群星.1994-非常精丫宝丽金】【WAV+CUE】
- 《赛马娘 热血喧闹大感谢祭!》评测:现代复古派对
- 《星球大战:亡命之徒》评测:还是看看远方的光剑吧
- 《末日地带2》评测:酣畅淋漓的“和面”之旅
- 交错战线研发中心推荐角色一览
- 交错战线合成工厂推荐角色一览
- 战锤40K星际战士2狙击职业介绍|狙击职业技能效果一览
- RobertSaxtonTheResurrectionoftheSoldiers(2024)[24Bit-192kHz]FLAC
- 唐成杨东哥弹唱《情若真HQ》头版限量编号[WAV+CUE]
- 柏菲·HIFI风情1《一杯香茶》限量开盘母带ORMCD[WAV+CUE]
- 发糖了!《黑神话》动画导演绘制八戒紫蛛儿中秋贺图
- “时光系列”新作《时光3:永耀之境》首曝:画风更真实的恋爱模拟RPG
- 《战地》游戏主管:始终认为《战地》未来销量能超越《使命召唤》