Help - Search - Members - Calendar
Full Version: virtual host for apache2
MandrivaUsers.org > Advanced Topics > Networking
scoopy
Just set up Apache2 on a fresh install of 10 OE. I am trying to setup a virtual server that will allow myself easier access to my files (test sites). Everything works fine from the /var/www/html directory and works using my IP. I just need this to work for me, outside (of my network) access is not neccessary.

This is my Vhosts.conf :
CODE
################# Named VirtualHosts
NameVirtualHost scoopy.localhost
<VirtualHost 127.0.0.1>
ServerName scoopy.net
ServerPath /etc/httpd
DocumentRoot /www/html
</VirtualHost>


This is what I am getting in my browser:
QUOTE
Forbidden
You don't have permission to access / on this server.
Apache-AdvancedExtranetServer/2.0.48 (Mandrake Linux/6.2.100mdk) PHP/4.3.4 Server at scoopy.net Port 80


So, I am sure I missed something or did something wrong. Maybe some sort of redirect would work too ???

thanks,
fissy
for each one of my hosts i define the host and set directory permissions:
CODE
<VirtualHost *:80>
DocumentRoot /var/www/stats/wwwroot
ServerName stats.domain.net
ServerAlias stats2.domain.net
</VirtualHost>

<Directory /var/www/stats/wwwroot>
order allow,deny
allow from all
</Directory>


edit: basically i think you have too many options in your <VirtualHost>, but just adding the directory section may help you.
anon
Not sure i understand, why can't you just type 127.0.0.1/my_file to access your stuff? why do you want the virtual server entry to access files from your own box?
scoopy
QUOTE (anon @ Jun 4 2004, 02:40 PM)
why can't you just type 127.0.0.1/my_file to access your stuff?

That would work... IF I filed the stuff in /var/www/html/my_file... BUT I would like to file it in a totally different partition which is mounted as /www.

damn, maybe thats where I messed up... document root should be /mnt/www/html. oops.gif

Will try that after work... along with fissy's idea if needed.

thanks,
scoopy
Got it working now. Fissy's directory options fixed up the permission thing. Don't know why they did not include that in the sample config?

Now if I can just figure out the redirect options... I can probably access everything from outside the network too.

thanks again,
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.