VPS侦探论坛

 找回密码
 注册
查看: 10658|回复: 9

lnmpa的泛解析也不生效....(解决)

[复制链接]
发表于 2011-4-28 16:59:17 | 显示全部楼层 |阅读模式

在nginx设置里 添加了  *.abc.com   可一浏览  就跳到了默认页面上了

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


从新添加了次网站  
还是不行

[ 本帖最后由 wxforex 于 2011-4-28 17:06 编辑 ]
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2011-4-28 19:46:12 | 显示全部楼层

我的也是这个问题,军哥帮忙解决下啊!
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-4-28 21:05:20 | 显示全部楼层



贴配置文件
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2011-4-28 21:15:37 | 显示全部楼层


  1. ServerAdmin webmaster@example.com
  2. php_admin_value open_basedir "/home/wwwroot/www.527togo.com:/tmp/:/var/tmp/:/proc/"
  3. DocumentRoot "/home/wwwroot/www.527togo.com"
  4. ServerName *.527togo.com
  5. #ServerAlias  *.527togo.com
  6. #ErrorLog "logs/-error_log"
  7. #CustomLog "logs/-access_log" common

  8. =====================下面是nginx的================
  9. server
  10.         {
  11.                 listen       80;
  12.                 server_name *.527togo.com;
  13.                 index index.html index.htm index.php default.html default.htm default.php;
  14.                 root  /home/wwwroot/www.527togo.com;

  15.                 location / {
  16.                         try_files $uri @apache;
  17.                         }

  18.                 location @apache {
  19.                         internal;
  20.                         proxy_pass http://127.0.0.1:88;
  21.                         include proxy.conf;
  22.                         }

  23.                 location ~ .*\.(php|php5)?$
  24.                         {
  25.                                 proxy_pass http://127.0.0.1:88;
  26.                                 include proxy.conf;
  27.                         }

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

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

  36.                 access_log off;
  37.         }
复制代码

军哥运维代购:http://shop63846532.taobao.com/

发表于 2011-4-28 21:16:11 | 显示全部楼层

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

                location / {
                        try_files $uri @apache;
                        }

                location @apache {
                        internal;
                        proxy_pass http://127.0.0.1:88;
                        include proxy.conf;
                        }

                location ~ .*\.(php|php5)?$
                        {
                                proxy_pass http://127.0.0.1:88;
                                include proxy.conf;
                        }

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

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

                log_format  014.cc  '$remote_addr - $remote_user [$time_local] $request '
             '$status $body_bytes_sent $http_referer '
             '$http_user_agent $http_x_forwarded_for';
                access_log  /home/wwwlogs/014.cc.log  014.cc;
        }



给014.cc添加了个*.014.cc

然后单独添加其他子域名的时候打开的还是014.cc


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

                location / {
                        try_files $uri @apache;
                        }

                location @apache {
                        internal;
                        proxy_pass http://127.0.0.1:88;
                        include proxy.conf;
                        }

                location ~ .*\.(php|php5)?$
                        {
                                proxy_pass http://127.0.0.1:88;
                                include proxy.conf;
                        }

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

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

                log_format  g.014.cc  '$remote_addr - $remote_user [$time_local] $request '
             '$status $body_bytes_sent $http_referer '
             '$http_user_agent $http_x_forwarded_for';
                access_log  /home/wwwlogs/g.014.cc.log  g.014.cc;
        }
发表于 2011-4-29 09:05:16 | 显示全部楼层

回复 5# 的帖子


ServerName 换成www.abc.com
写成ServerAlias  *.527togo.com  试试
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-4-29 11:18:43 | 显示全部楼层

还是不行。。。。。。。。。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2011-4-29 12:21:06 | 显示全部楼层


成了 谢谢哈  
n的设置里
server_name www.527togo.com *.527togo.com;

a的设置里
ServerName www.527togo.com
ServerAlias  *.527togo.com

军哥运维代购:http://shop63846532.taobao.com/

发表于 2011-4-29 21:30:21 | 显示全部楼层



我的还是不行,按你的这样设置了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-20 10:48 , Processed in 0.028317 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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