Rafnuss
Rafnuss

Reputation: 119

Sub-domain not working

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

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>

zoziology

<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

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

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

Any idea ?

Upvotes: 0

Views: 205

Answers (2)

Rafnuss
Rafnuss

Reputation: 119

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

sudo a2dissite 000-default

Upvotes: 1

e_i_pi
e_i_pi

Reputation: 4820

Unfortunately I can't comment yet as I don't have the rep, so sorry about this being an "answer".

I'm wondering if you have a DNS "A" record for that subdomain? You may have a wildcard DNS record though, which would make this a moot point

Upvotes: 0

Related Questions