【问题标题】:Send all not set domains (and subdomains) to another folder将所有未设置的域(和子域)发送到另一个文件夹
【发布时间】:2016-05-29 05:25:14
【问题描述】:

我遇到的问题是,当我没有设置域时,它确实将文档根更改为空白(例如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>

我还设置了许多其他虚拟主机,但它们看起来都像上面的那样。

【问题讨论】:

    标签: apache subdomain vhosts


    【解决方案1】:

    我不确定这是否是答案,但自从我将 &lt;VirtualHost _default_:*&gt; 更改为 &lt;VirtualHost _default_:80&gt; 后,它可以工作。但如果我希望所有端口也提供此空白页,这不是解决方案

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-01-03
      • 2012-08-13
      • 2018-01-22
      • 2023-03-29
      • 1970-01-01
      • 2010-09-30
      • 2015-01-05
      • 2019-12-16
      相关资源
      最近更新 更多