2016-05-27 4 views
0

を働いていない私は、Apacheにかなり新しいですので、おそらく解決策は、あなたには明らかであろう...私はここでDebianの上喘鳴は、サブドメイン

を実行している/etc/apache2/sites-availablesの私の2つのファイルです:

amelineandraphael

<VirtualHost *:80> 
     ServerAdmin [email protected] 
     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 [email protected] 
    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 

  • 私はsudo a2ensite amelineandraphaelsudo a2ensite zoziologie
  • を実行して、Apacheサーバを再起動しました/etc/apache2/sites-enables
  • にシンボリックリンクを追加しました。

サブドメインzoziologie.raphaelnussbaumer.comは機能していますが、amelineandraphael.raphaelnussbaumer.com/var/www/でデフォルトのindex.htmlに私をリダイレクトします。ここで

/var/www/amelineandraphaelの.htaccessファイルです:

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 

任意のアイデア?

答えて

1

私は解決策を見つけたと思います。

sudo a2dissite 000-default 
0

残念ながら私は担当者がいないのでまだコメントできません。このことは "回答"です。

そのサブドメインのDNS "A"レコードがあるのでしょうか?あなたはワイルドカードDNSレコードを持っているかもしれませんが、これは疑問点になります

+0

私はDebian wheezyで動作しています。両方のサブドメインが同じIPアドレスを指しているDNS "A"を持っています(私のサーバのVPS)。ワイルドカードDNSレコードはありません。助けてくれてありがとう – Rafnuss

+0

"sudo a2ensite amelineandraphael.raphaelnussbaumer.com"を実行してから "sudo service apache2 reload"を実行しましたか? (文法が間違っていれば申し訳ありませんが、私はUbuntuに慣れています) –

+0

'sudo a2ensite amelineandraphael'を実行しました。これは' site amelineandraphael already enabled'を返します。しかし 'sudo a2ensite amelineandraphael.raphaelnussbaumer.com'を返すと' ERROR:Site amelineandraphael.raphaelnussbaumer.comは存在しません! ' – Rafnuss

関連する問題