Operating System - Linux
1828490 Members
2617 Online
109978 Solutions
New Discussion

Re: apache -- Virtual Diretory as in IIS -- plz help

 
SOLVED
Go to solution
Maaz
Valued Contributor

apache -- Virtual Diretory as in IIS -- plz help

Dear Gurus

I have to configure something like "Virtual Directory(IIS)" in apache

DocumentRoot "/var/htdocs".

I have a directory /rprts2005 that have html files.
I created a symlink
ln -s /rprts /var/htdocs/sales2005

now from client I tried to acces the pages by typing the url:
http://ip/sales2005/page.html

Apache server give me the following error page.

Forbidden
You don't have permission to access /sales2005/page.html on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Apache/2.0.52 (Red Hat) Server at 10.0.0.1 Port 80

what should i do ?

Regards
Maaz
5 REPLIES 5
Steven E. Protter
Exalted Contributor
Solution

Re: apache -- Virtual Diretory as in IIS -- plz help

Couple of things.

If the directory the virtual server refers to is empty, you will get this error. Put a basic html document in it to test.

Also, SELINUX might not allow documents to be in locations other than the DocumentRoot location defined in httpd.conf

For certain configurations you may neeed to turn off SELINUX

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Vernon Brown_4
Trusted Contributor

Re: apache -- Virtual Diretory as in IIS -- plz help

Make sure you have "FollowSymLinks" (spell)
set up in your Apache config file httpd.conf for your /var/htdocs directory. Also directories in the link would all need to be world readable.

Maaz
Valued Contributor

Re: apache -- Virtual Diretory as in IIS -- plz help

THANKS Dear SEP, and Vernon Brown for the Quick Help.

Yes SEP, SELinux was enabled on my system.. and I have disabled it.
ans Vernon Brown, I have no entry of "FollowSymLinks" in my httpd.conf for /var/htdocs directory... and I simply provide/write it into my /var/htdocs directory as:

Options FollowSymLinks

By following both of u(SEP, and Vernon) its working now
Thanks n Regards
Maaz
Thomas Callahan
Valued Contributor

Re: apache -- Virtual Diretory as in IIS -- plz help

The correct way to do this is with Alias statements and settings.

Alias /sales2005 /rpts


blah blah
blah


Pls look the usages and what options you may need/want inside the directives.

Thanks,
Tom Callahan
TESSCO Technologies Inc.
443.506.6216
Maaz
Valued Contributor

Re: apache -- Virtual Diretory as in IIS -- plz help

NICE/SUPERB help Thomas Callahan ;).

Millions of Thanks Thomas Callahan .
Regards
Maaz