子域不起作用 [英] Sub-domain not working

查看:72
本文介绍了子域不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Apache来说还很陌生,所以解决方案对您来说很明显...我正在Debian Wheezy上运行

I'm pretty new to apache, so probably the solution will be obvious to you... I'm running on Debian wheezy

这是我在/etc/apache2/sites-availables 中的两个文件:

Here are my two file in /etc/apache2/sites-availables:

amelineandraphael

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName amelineandraphael.raphaelnussbaumer.com

        DocumentRoot /var/www/amelineandraphael
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/amelineandraphael>
                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

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

动物学

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName zoziologie.raphaelnussbaumer.com

    DocumentRoot /var/www/zoziologie
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    </Directory>
    <Directory /var/www/zoziologie>
            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

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

  • 我已将符号链接添加到/etc/apache2/sites-enables
  • 我已经运行 sudo a2ensite amelineandraphael sudo a2ensite zoziologie
  • 然后重新启动apache服务器.

zoziologie.raphaelnussbaumer.com 子域正在运行,但

The sub-domain zoziologie.raphaelnussbaumer.com is working but amelineandraphael.raphaelnussbaumer.com redirect me to the default index.html at /var/www/.

这是/var/www/amelineandraphael 的.htaccess:

Here are the .htaccess of /var/www/amelineandraphael:

SetEnv PHP_VER 5_4

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

有什么主意吗?

推荐答案

我想我找到了解决方案.尽管我不确定那是解决方案的唯一部分:

I think I found the solution. Although I'm not sure that's the only part of the solution:

sudo a2dissite 000-default

这篇关于子域不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆