以前に議論されたことについての議論を開始して申し訳ありません。しかし、私は自分の問題に対する適切な解決策を見つけることができませんでした。読んでくれてありがとう。
VPS サーバーがあり、/etc/apache2/sites-available/default ファイルを使用してデフォルトのルートを追加しました。
私のデフォルトのファイルは
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/root/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/root/>
Options None
AllowOverride None
Order deny,allow
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
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
後で alfonsoapp.com という新しいドメインを追加しましたが、現在はデフォルトのルートである /home/root/files/ で動作しますが、/home/alfonsoapp/files で動作するはずです。どこで間違ったのでしょうか?
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/alfonsoapp/files/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/alfonsoapp/files>
Options None
AllowOverride None
Order deny,allow
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
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>