【发布时间】:2014-03-23 13:10:46
【问题描述】:
我在使用 nginx 通配符子域时遇到问题。
我从 godaddy 购买了一个域名。然后在 amazone 中创建主机区域,然后为 A(A-IPv4) 创建一个记录集 - 为 www.domain.com / domain.com
在 nginx.conf 中,我有非常基本的配置和 1 个如下所示的服务器文件:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
access_log /var/log/nginx/domain.com.access.log;
error_log /var/log/nginx/domain.com.error.log;
# i tried the following for server name: domain.com *.domain.com/*.domain.com/.domain.com
server_name .domain.com;
root /usr/share/nginx/html/test;
index index.html;
}
当我访问 subdomain.domain.com 时,我得到 Firefox 在 subdomain.domain.com 上找不到服务器
查看访问日志文件没有任何记录,它完全是空的。
谢谢
【问题讨论】:
标签: apache .htaccess nginx dns