nginx二级域名配置问题

康神少 发布于 2017/01/04 16:45
阅读 218
收藏 0
这是我的nginx配置文件


################   localhost.conf   #########################
server
{
    listen       80;
    server_name  www.niukangw.cn localhost 127.0.0.1;
    root         /site/domain/localhost/htdocs;
    index index.php index.html index.htm;
    location ~  .*\.(php|jphp)?$
    {
        include fastcgi.conf;
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
    }
#    if ($request_filename !~ "s|g|fckeditor|new\.(js|htc|ico|gif|jpg|png|css|php|htm)$")
#    {
#        rewrite ^/(.*) /public_index.php?k=$1 last;
#    }
    rewrite "^/(.*)\.pl"    /init.php?$1 last;
    access_log  /log/domain/localhost/access.log  access;
} 

server
{
    listen       80;
    server_name  sources.niukangw.cn;
    root         /site/domain/localhost/htdocs/sources;
    index index.php index.html index.htm;
    location ~  .*\.(php|jphp)?$
    {
        include fastcgi.conf;
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
    }
#    if ($request_filename !~ "s|g|fckeditor|new\.(js|htc|ico|gif|jpg|png|css|php|htm)$")
#    {
#        rewrite ^/(.*) /public_index.php?k=$1 last;
#    }
    rewrite "^/(.*)\.pl"    /init.php?$1 last;
    access_log  /log/domain/localhost/access.log  access;
}

server
{
    listen       80;
    server_name  phpmyadmin.niukangw.cn;
    root         /site/domain/localhost/htdocs/phpmyadmin;
    index index.php index.html index.htm;
    location ~  .*\.(php|jphp)?$
    {
        include fastcgi.conf;
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
    }
#    if ($request_filename !~ "s|g|fckeditor|new\.(js|htc|ico|gif|jpg|png|css|php|htm)$")
#    {
#        rewrite ^/(.*) /public_index.php?k=$1 last;
#    }
    rewrite "^/(.*)\.pl"    /init.php?$1 last;
    access_log  /log/domain/localhost/access.log  access;
}
################   localhost.conf   #########################




但是二级域名无法访问
加载中
返回顶部
顶部