Noob在这里。。我在Ubuntu机器上有以下文件夹结构
/var/www/
/folder1
/folder2
现在我想将我的网址xyz.com重定向到folder1&xyz.com/blog到folder2。我正在使用以下Vhost配置文件
对于xyz.com到folder1
<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中的索引文件(正如预期的那样&correct),但当我输入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
我花了几个小时在这上面,仍然无法解决问题:(
如有任何帮助,我们将不胜感激