Noob Here.. 我的 Ubuntu 机器上有以下文件夹结构
/var/www/
/folder1
/folder2
现在我想将我的 url xyz.com 重定向到 folder1 和 xyz.com/blog 到 folder2。我正在使用以下 Vhost 配置文件
对于 xyz.com 到文件夹 1
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName xyz.com
ServerAlias www.xyz.com
DocumentRoot /var/www/folder1
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
.......
</VirtualHost >
对于 xyz.com/blog 到 folder2
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName xyz.com/blog
ServerAlias www.xyz.com/blog
DocumentRoot /var/www/folder2
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
.......
</VirtualHost >
当我在 url 中输入 xyz.com 时,它为我提供来自 folder1 的索引文件(如预期和正确)但是当我输入 xyz.com/blog 它显示 404:未找到错误
Not Found
The requested URL /blog/ was not found on this server.
Apache/2.2.22 (Ubuntu) Server at socialcosmo.com Port 80
我已经花了几个小时,但仍然无法找出问题:(任何帮助将不胜感激