我不知道我在哪里出错,但我似乎不能访问我的网站不包括www前缀的网址,否则我可以访问它好。我有以下DNS记录:
答:@-指向000.000.000.000
CNAME:*.example.com -是example.com的别名
在我的.conf文件中,我有以下内容:
ServerName example.com
Redirect permanent / http://www.example.com/
ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/example.com/public
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined该文件应该工作,因为我可以访问网站在www.example.com,所以我不确定是否有错误在我的重定向,或它是否是其他东西,但我正在努力解决这个问题。
发布于 2018-08-30 23:47:44
您有一个CNAME记录的"*.example.com“,这只说明有一个。在域前面有任何东西(包括"www"),所以如果您尝试类似test.example.com的东西,它就能工作。在你会放"www“的田野里做一张新的A唱片。
https://serverfault.com/questions/928794
复制相似问题