VPS侦探论坛

 找回密码
 注册
查看: 3909|回复: 3

二级域名重定向解析不到指定目录

[复制链接]
发表于 2017-2-8 16:58:07 | 显示全部楼层 |阅读模式

域名:http://www.ibmic.cn/二级域名:http://admin.ibmic.cn/

#admin.ibmic.cn.conf
server
{
listen       80;
server_name admin.ibmic.cn;
index index.php index.html index.htm default.html default.htm default.php;
root  /home/wwwroot/www.ibmic.cn/myVue/dist;
location ~ .*\.(php|php5)?$
{
fastcgi_pass  unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fcgi.conf;
}
location /status {
stub_status on;
access_log   off;
}

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

access_log off;
}


#www.ibmic.cn.conf

server
{
listen       80;
server_name www.ibmic.cn;
index index.php index.html index.htm default.html default.htm default.php;
root  /home/wwwroot/www.ibmic.cn/myVue/dist;
location ~ .*\.(php|php5)?$
{
fastcgi_pass  unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fcgi.conf;
}
location /status {
stub_status on;
access_log   off;
}

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

access_log off;
}



#nginx.conf

server
    {
        listen 80 ;
        server_name localhost;
        index index.html index.htm index.php;
        root  /home/wwwroot/default;

        #error_page   404   /404.html;
        include enable-php.conf;

        location /nginx_status
        {
            stub_status on;
            access_log   off;
        }

        location /phpfpm_status {
            fastcgi_pass  127.0.0.1:9000;
            include fastcgi_params;
            fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
        }

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

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

        location ~ /\.
        {
            deny all;
        }

        access_log  /home/wwwlogs/access.log;
    }
include vhost/*.conf;
}

本帖子中包含更多资源

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

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




[ 本帖最后由 superMac 于 2017-2-8 17:52 编辑 ]

本帖子中包含更多资源

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

x
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2017-2-8 17:03:07 | 显示全部楼层

##发错了#admin.ibmic.cn.conf

server
{
listen       80;
server_name admin.ibmic.cn;
index index.php index.html index.htm default.html default.htm default.php;
root  /home/wwwroot/admin.ibmic.cn;
location ~ .*\.(php|php5)?$
{
fastcgi_pass  unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fcgi.conf;
}
location /status {
stub_status on;
access_log   off;
}

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

access_log off;
}

[ 本帖最后由 superMac 于 2017-2-8 17:53 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2017-2-8 17:57:28 | 显示全部楼层



军哥!!谢谢了!!不用看了已经解决了!!
找了半天没找到在哪删除帖子!!不好意思让你费心了看了!!
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-27 21:24 , Processed in 0.027381 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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