CentOS中配置LNMP环境打开提示File not found
2014-04-04 12:42
483 查看
在centos系统中配置好php环境了,但是发现能运行html页面并不能运行php文件了,这样我就在gg的帮助下一步不解决了,下面来看问题的具体解决过程。
安装之后测试发现,怎么Html能运行,而php就不行,显示File Not
Found,很是悲伤之下谷歌,发现了各种奇奇怪怪的说法,作为一个error_log看不懂的人只能一个个尝试,而且我将安装步骤仔细重复了一遍又一
遍,保证按照教程来了,还是没发现问题,最后找到了一个类似的答案:
是配置的问题
location ~ .php$ {
root html;
html是nginx默认的目录,需要改成网站实际的路径
然后我基本确定了在/etc/nginx/conf.d/default.conf下,反复修改之后发现了一点不同,其他地方都是:
root /usr/share/nginx/html;而在php下却是root html
所以才访问不了,原来是路径错了,修改完之后就可以访问了。
另外,错误日志所在位置是:var/log/nginx
CentOSLNMPFile not found
安装之后测试发现,怎么Html能运行,而php就不行,显示File Not
Found,很是悲伤之下谷歌,发现了各种奇奇怪怪的说法,作为一个error_log看不懂的人只能一个个尝试,而且我将安装步骤仔细重复了一遍又一
遍,保证按照教程来了,还是没发现问题,最后找到了一个类似的答案:
是配置的问题
location ~ .php$ {
root html;
html是nginx默认的目录,需要改成网站实际的路径
然后我基本确定了在/etc/nginx/conf.d/default.conf下,反复修改之后发现了一点不同,其他地方都是:
root /usr/share/nginx/html;而在php下却是root html
所以才访问不了,原来是路径错了,修改完之后就可以访问了。
另外,错误日志所在位置是:var/log/nginx
CentOSLNMPFile not found
相关文章推荐
- 解决CentOS 7.1上LNMP环境运行Laravel报 404 File not found . 错误。
- LNMP下提示File not found问题的解决方法
- android环境配置(Error generating final archive: java.io.FileNotFoundException: D:\Android\Hello\bin\res)
- centos 打开配置文件出错:E325: ATTENTION Found a swap file by the name "/etc/vsftpd/.vsftpd.conf.swp"
- Docker容器启动lnmp环境下的mysql服务时报"MySQL server PID file could not be found"错误解决办法
- CentOS MySQL 提示:MySQL server PID file could not be found!
- nginx/1.4.6 配置的虚拟主机访问提示“File not found”
- 配置jbpm环境时,出现org.hibernate.MappingNotFoundException: resource: jbpm.repository.hbm.xml not found
- CentOS 7配置LNMP开发环境及配置文件管理详解
- Linux配置之解决CentOS中:xx is not in the sudoers file的问题
- 【CentOS6.5】安装之DNS配置错误,yum install 软件报错:ERROR 6或者56错误提示”could not retrieve mirrorlist http://mirrorlist.centos.org ***”
- comfortable-mexican-sofa 安装后提示:File to import not found or unreadable: jquery.ui.all 的解决办法
- Centos 配置eth0 提示Device does not seem to be present
- 打开sln文件出现the selected file is not a valid visual studio solution file错误提示解决办法
- Android下载文件提示文件不存在。。。 java.io.FileNotFoundException
- MyEclipse中化除frame引起的“the file XXX can not be found."的提示
- delphi2007安装DBGridEh1.1.4时提示File not found: 'DBSumLst.dcu'的解决方法
- 移植到android 提示 cocos-ext.h file not found (cocos 3.x)
- Centos提示-bash: make: command not found
- hive在执行任务的时候提示java.io.FileNotFoundException: File does not exist: hdfs://Master:9000/usr/local/apach