Discuz 二级域名泛解析无法访问,急求解答!

问答中心分类: OneinStackDiscuz 二级域名泛解析无法访问,急求解答!
james asked 8 年 ago
之前Discuz放在一个虚拟主机上,泛解析后,后台设置了二级域名就能正常访问。比如门户www.name.com, 论坛:bbs.name.com。
现在使用了VPS,并您的这个程序,搬家到这个VPS后,二级域名无法访问。Discuz后台设置了应用域名,根域名,在虚拟主机上没有任何问题。怀疑是LNMPA的二级域名泛解析没有生效。
nginx配置
server {
listen 80;
server_name example.com *.example.com;
access_log /data/wwwlogs/example.com_nginx.log combined;
index index.html index.htm index.php;
root /data/wwwroot/abc;
location / {
try_files $uri @apache;
}
location @apache {
proxy_pass http://127.0.0.1:88;
include proxy.conf;
}
location ~ .*\.(php|php5|cgi|pl)?$ {
proxy_pass http://127.0.0.1:88;
include proxy.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|ico)$ {
expires 30d;
access_log off;
}
location ~ .*\.(js|css)?$ {
expires 7d;
access_log off;
}
}
apache配置:
<VirtualHost *:88>
ServerAdmin admin@linuxeye.com
DocumentRoot "/data/wwwroot/abc
ServerName example.com
ServerAlias *.example.com
ErrorLog "/data/wwwlogs/example.com_error_apache.log"
CustomLog "/data/wwwlogs/example.com_apache.log" common
<Directory "/data/wwwroot/abc">
SetOutputFilter DEFLATE
Options FollowSymLinks ExecCGI
Require all granted
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex index.html index.php
</Directory>
</VirtualHost>
 
折腾了半天没有任何结果,希望能帮助一下,感激不尽!

3 Answers
oneinstack answered 8 年 ago
dns解析了吗?

james answered 8 年 ago
dns 已经解析。
在Linode的A记录里已经添加了*,指向域名。
但是打开bbs.xxx.com显示:
server DNS address could not be found.
不知道哪里出问题了。

james answered 8 年 ago
已经解决。谢谢。