我遇到的问题是,当我没有设置域时,它会将文档更改为空白(例如http://lol.orbitrondev.org),(请参阅代码以查看我的意思)
# File 001-sites.conf
<VirtualHost _default_:*>
DocumentRoot /var/www/sites/blank
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/var/www/sites/blank">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
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
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
相反,它将所有内容发送到我的管理网站,但我不知道为什么。我的管理文件是这样的:
# File 002-admin.conf
<VirtualHost *:80>
ServerName admin.orbitrondev.org:80
ServerAdmin team-orbitron@hotmail.com
DocumentRoot /var/www/admin
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/var/www/admin">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
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
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
我还设置了许多其他vhost,但它们看起来都像上面那样。
答案 0 :(得分:0)
我不确定这是否是答案但是因为我将<VirtualHost _default_:*>
更改为此<VirtualHost _default_:80>
它才有效。但如果我想要所有港口也给这个空白页