VPS侦探论坛

 找回密码
 注册
查看: 3409|回复: 1

lnmp 无法解析php

[复制链接]
发表于 2017-3-21 19:49:15 | 显示全部楼层 |阅读模式

lnmp1.4测试版,php文件放在默认的/home/wwwroot/default 可以访问,但是在其他路径  /home/work/code1 下就显示 " File not found. " html文件可以正常显示   下面是Nginx的配置文件,请问军哥这个是什么原因引起的呢?

server
    {
        listen 80;
        #listen [::]:80;
        server_name laravel.linkdoc.com;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /home/work/code1;

        include other.conf;
        #error_page   404   /404.html;

        # Deny access to PHP files in specific directory
        #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }

        include enable-php.conf;

        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires      30d;
        }

        location ~ .*\.(js|css)?$
        {
            expires      12h;
        }

        location ~ /.well-known {
            allow all;
        }

        location ~ /\.
        {
            deny all;
        }

        access_log  /home/wwwlogs/laravel.linkdoc.com.log;
    }
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-3-22 09:40:55 | 显示全部楼层


nginx下有 404 not found 的错误,没有file not found 的错误信息
这个配置文件没错误

这个虚拟主机配置文件里设置的目录是一开始lnmp vhost add 时添加上的吗还是后来自己改的?
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-27 15:27 , Processed in 0.024905 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表