を働いていない私は、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 amelineandraphael
とsudo 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
任意のアイデア?
私はDebian wheezyで動作しています。両方のサブドメインが同じIPアドレスを指しているDNS "A"を持っています(私のサーバのVPS)。ワイルドカードDNSレコードはありません。助けてくれてありがとう – Rafnuss
"sudo a2ensite amelineandraphael.raphaelnussbaumer.com"を実行してから "sudo service apache2 reload"を実行しましたか? (文法が間違っていれば申し訳ありませんが、私はUbuntuに慣れています) –
'sudo a2ensite amelineandraphael'を実行しました。これは' site amelineandraphael already enabled'を返します。しかし 'sudo a2ensite amelineandraphael.raphaelnussbaumer.com'を返すと' ERROR:Site amelineandraphael.raphaelnussbaumer.comは存在しません! ' – Rafnuss