Ubuntu 12.04:Apache2符号链接到Windows驱动器

我在同一台机器上安装了Ubuntu 12.04和Windows 7。

<VirtualHost *:80> ServerAdmin [email protected] #ServerName example.org #ServerAlias www.example.org DocumentRoot /var/www/ ErrorLog /var/www/logs/error.log CustomLog /var/www/logs/access.log combined </VirtualHost> 

这是我的/ var / www

 wenbert@wenbert-ubuntu:/var/www$ cd /var/www/ wenbert@wenbert-ubuntu:/var/www$ ls -la total 28 drwxr-xr-x 5 root root 4096 May 5 14:51 . drwxr-xr-x 14 root root 4096 May 5 12:05 .. drwxr-xr-x 2 root root 4096 May 5 14:44 logs lrwxrwxrwx 1 wenbert root 33 May 5 14:32 mysite -> /media/Data/xampp/htdocs/mysite 

我的/媒体/数据/ xampp / htdocs / mysite是这样的:

 wenbert@wenbert-ubuntu:/media/Data/xampp/htdocs/mysite$ ls -la total 44 drwx------ 1 wenbert wenbert 0 May 5 14:06 . drwx------ 1 wenbert wenbert 40960 May 5 13:54 .. drwx------ 1 wenbert wenbert 0 May 5 14:11 logs drwx------ 1 wenbert wenbert 0 May 5 13:57 sql drwx------ 1 wenbert wenbert 4096 May 5 13:52 www 

我注意到这个目录的权限是drwx------我想这是导致这个问题的原因。 当我浏览到http://localhost时,我也看不到mysite目录

那么,我将如何去做呢? 我想我的Windows htdocs也可以访问,当我启动到Ubuntu。

更新:

 wenbert@wenbert-ubuntu:/var/www$ ps aux | grep apache root 1446 0.0 0.2 37944 7708 ? Ss 17:45 0:00 /usr/sbin/apache2 -k start www-data 1460 0.0 0.1 38016 5708 ? S 17:45 0:00 /usr/sbin/apache2 -k start www-data 1461 0.0 0.1 37984 4280 ? S 17:45 0:00 /usr/sbin/apache2 -k start www-data 1462 0.0 0.1 37984 4280 ? S 17:45 0:00 /usr/sbin/apache2 -k start www-data 1463 0.0 0.1 37984 4284 ? S 17:45 0:00 /usr/sbin/apache2 -k start www-data 1464 0.0 0.1 37984 4284 ? S 17:45 0:00 /usr/sbin/apache2 -k start www-data 5313 0.0 0.1 37968 4032 ? S 19:28 0:00 /usr/sbin/apache2 -k start www-data 5314 0.0 0.1 37968 4032 ? S 19:28 0:00 /usr/sbin/apache2 -k start www-data 5315 0.0 0.1 37968 4032 ? S 19:28 0:00 /usr/sbin/apache2 -k start www-data 5316 0.0 0.1 37968 4032 ? S 19:28 0:00 /usr/sbin/apache2 -k start www-data 5317 0.0 0.1 37968 4032 ? S 19:28 0:00 /usr/sbin/apache2 -k start wenbert 5338 0.0 0.0 4388 824 pts/2 R+ 19:30 0:00 grep --color=auto apache 

为了使Apache遵循符号链接,你需要

 Options FollowSymlinks 

在你的configuration中。 您还应该确保www-data用户对这些文件具有读取权限,并且可以读取和执行这些目录的权限。