将所有未设置的域(和子域)发送到另一个文件夹
Send all not set domains (and subdomains) to another folder
我遇到的问题是,当我没有设置域时,它不会将 documentroot 更改为空白(例如 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>
我还设置了许多其他虚拟主机,但它们看起来都像上面的那样。
我不确定这是否是答案,但自从我将 <VirtualHost _default_:*>
更改为 <VirtualHost _default_:80>
后,它就可以工作了。但是,如果我希望 ALL PORTS 也提供此空白页,这不是解决方案
我遇到的问题是,当我没有设置域时,它不会将 documentroot 更改为空白(例如 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>
我还设置了许多其他虚拟主机,但它们看起来都像上面的那样。
我不确定这是否是答案,但自从我将 <VirtualHost _default_:*>
更改为 <VirtualHost _default_:80>
后,它就可以工作了。但是,如果我希望 ALL PORTS 也提供此空白页,这不是解决方案