我尝试将第二个域添加到我的专用服务器。我的标准域1应该连接到普通的/ var / www / path,我的第二个域应该指向/ var / www / domain。
更改了一些内容(请参阅注释),现在我收到了404错误
我启用的网站配置如下:
默认域名:
ServerAdmin mail@provider.com
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
第二个域名:
<VirtualHost *:80>
ServerName www.second-domain.net
ServerAlias second-domain.net *.second-domain.net
DocumentRoot /www/domain
</VirtualHost>
主持人文件:
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.0.1 localhost.localdomain localhost
# Auto-generated hostname. Please do not remove this comment.
2a06:1c40::xxx k4lim
::1 localhost
127.0.0.1 localhost
127.0.0.1 domain1.name
185.101.92.XXX domain2.name
Ť 当我尝试在Firefox中打开网站时,我得到的错误是:无法找到域名的DNS地址。
非常感谢任何想法和帮助!
答案 0 :(得分:0)
nslookup domain2.name
是否显示正确的IP地址?ping domain2.name
是否显示正确的IP地址?/etc/hosts
。不在服务器上。cat /etc/resolv.conf
。答案 1 :(得分:0)
我刚刚发现了我的问题:
<VirtualHost *:80>
ServerName www.second-domain.net
ServerAlias second-domain.net *.second-domain.net
DocumentRoot /www/domain
</VirtualHost>
我忘了/ var / ....之前/ www / domain