Click to See Complete Forum and Search --> : Apache Questions: Virt. Dir & Permissions


RobSmul
11-28-2002, 04:14 PM
Hi there,

I have two questions about Apache. I have successfully installed Linux and Apache.

My problem is that I want to create a 'Virtual Directory' like you can with IIS.

I want to use the local dir /var/www/html for my page that shows up when someone types: '//SERVERNAME' . Well this works well.

But then I want to show /mnt/data/www/intra/html/ (mounted disk) when someone types '//SERVERNAME/intra' . I don't know where or how to create such an entry... (BTW I use Webmin as well as the config files)

Also, when I use /mnt/data/www/intra/html as my default directory for the webserver (this was a test), I get an access denied, while this directory is chmodded @ 755.

I search a lot on these forums and on google.com/linux but wasn't able to find this.

Help is much appreciated,

Grtz. Rob

RobSmul
11-30-2002, 09:25 AM
I forgot to mention:

This Linux-box in in a windows environment. For the network-uesers the drive is accessible through Samba using Winbind. So they have the appropriate permissions to read write it, but they cannot view web-pages with apache.

RobSmul
12-02-2002, 11:31 AM
Can someone please help me???

I've got real problems with the permissions.

I can open the default apache page found in /var/www/html/ but if I try to open anything else I get access forbidden.

For example I created a virtual share:
Alias /icons/ /var/www/icons/

I chmodded the directory to 777, made the apache user and apache group the owner, and when I'm logged in as root I still get an access forbidden when opening http://localhost/icons/

I even reinstalled my whole system, and I'm still getting the same errors.

Getting desperate here.....

Thanx for any thoughts or replies.

Grtz. Rob

EricD
12-03-2002, 12:48 PM
At the end of your httpd.conf file, there is a section on virtual hosting. This is where you should look to configure your server.

You can't use the same '//SERVERNAME' for two different dirrectory.

If you want to allow poeple to access /mnt/data/... you have to create a virtual host in httpd.conf ex: //SERVERDATA' and point it to you /mnt/data dirrectory.

RobSmul
12-03-2002, 02:03 PM
thanx for the reply.

I figured it out though.. The main problem was with the permissions. It turned out that I needed to create a <directory> entry in the config-files for every share...

re-v
01-02-2003, 06:09 PM
"<directory> this should be set to whatever you set DocumentRoot to"
from httpd.conf lines 295-330
I'd like to have the server "branch" depending on the address request.
Say I have two addess 192.168.25.1 and 192.168.27.1
I now have them dispaly the same page.
If I define 192.168.27.1 in virtualhost to serve another page defined in <directory> I get a permission failure 404???
Can you point out my problem?
TIA
re-v