0

I have Ubuntu 12.04 and Windows 7 on the same machine.

<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>

Here is my /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

My /media/Data/xampp/htdocs/mysite is like this:

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

I noticed that the permissions for this directory is drwx------ - I think this is causing the problem. I also could not see the mysite directory when I browse to http://localhost

So, how would I go about this? I would want my Windows htdocs to be also accessible when I boot to Ubuntu.

UPDATE:

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
2
  • 1
    Does your apache runs under wenbert user? May 5, 2013 at 3:10
  • @DanilaLadner echo exec('whoami'); outputs www-data. I have updated the post above - info about what user is apache running on.
    – wenbert
    May 5, 2013 at 7:31

1 Answer 1

1

In order for Apache to follow symlinks, you need

Options FollowSymlinks

in your configuration. You should also make sure the www-data user has read permissions on the files, and read and execute permissions on the directories.

Not the answer you're looking for? Browse other questions tagged .