zf2框架的php程序,nginx下运行提示404 not found
2016-08-11 09:21
357 查看
原始的nginx中的配置如下:
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
修改配置如下,解决404 not found
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php?$args;
}
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
修改配置如下,解决404 not found
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php?$args;
}
相关文章推荐
- php 运行效率总结(提示程序速度)
- php cli命令行模式运行mysql_connect不能连接和运行框架程序
- 在CentOS 7 64位操作系统环境下搭建LNMP(Linux+Nginx+MySQL+PHP)来运行Zabbix监控程序
- php与nginx配置,不能运行php程序
- 运行php程序时,浏览器跳出打开和保存提示框
- 解决PHP程序运行时:Fatal error: Maximum execution time of 30 seconds exceeded in的错误提示
- 在嵌入式开发板中运行程序提示-/bin/sh: ./xx: not found的解决办法
- nginx下运行php的程序时返回200访问却是空白页问题的解决方法
- php 运行效率总结(提示程序速度)
- 运行PHP程序时提示“Notice: Undefined index”的解决办法
- (Ubantu)使用gcc编译一个程序a.c成a.out,输入a.out运行,提示bash:a.out:command not found,怎么回事
- nginx下运行php的程序时返回200访问却是空白页问题的解决方法
- Nginx 访问php文件返回404 Not Found错误
- 解决"libc.so.6: version `GLIBC_2.14' not found"问题 试图运行程序,提示"libc.so.6: version `GLIBC_2.14' not found
- 记:使用Wampserver运行php程序时在该局域网的手机访问提示You don't have permission to access / on this server.
- 解决PHP程序运行时:Fatal error: Maximum execution time of 30 seconds exceeded in的错误提示
- Nginx添加rewrite规则解决Moodle 404 Not Found(含Moodle2.0)(实践下来并未成功,只是个提示)
- PHP程序运行提示Fatal error: Call to undefined function socket_create()
- nginx下运行php的程序时返回200访问却是空白页问题的解决方法
- zf2框架的PHP程序,测试环境使用apache,准生产环境使用nginx,出现的问题