VPS侦探论坛

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

lnmp添加网站(虚拟主机)后域名无法访问指定目录

[复制链接]
发表于 2017-11-20 14:55:10 | 显示全部楼层 |阅读模式

在/usr/local/nginx/conf/vhost/已经存www.imooc.com.conf 内容为server
    {
        listen 80;
        #listen [::]:80;
        server_name  www.imooc.com ;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /home/wwwroot/default/imooc_o2o/public;


        include none.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/y.log;
    }
但是访问www.imooc.com后,还是出现lnmp安装成功后的页面

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-11-20 18:36:48 | 显示全部楼层


这边测试是正常的
如果显示lnmp默认页面一般是这几种原因:
配置文件有错误
配置文件添加后未生效
指向的目录下面是lnmp的默认页面
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-25 01:24 , Processed in 0.026231 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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