isaac_golding Posted June 15, 2004 Report Share Posted June 15, 2004 So here I am with mandrake 10 and apache2. Out of the box it works great but the moment I wandered into /etc/httpd/conf/vhosts/Vhosts.conf things have gone to crap. So after experiencing hours of 403 not allowed errors on a vhost that point to /home/isaac/website1_public_html/ I return to this forum to read that alot of other people have had the same if not similar problems. So I go back and try all of the advice about vhosts and apahe2 and none of it seems to work. What would be nice is if somebody could point me to a start to finish solution for this mess as I know that everywhere else but in mandrake advx land the vhosts settings I've used work just fine. Anybody got a good url?? P.S. at this point I've removed EVERYTHING related to apache from the server to include the config files so I can start with a clean slate. Quote Link to comment Share on other sites More sharing options...
armondf Posted June 17, 2004 Report Share Posted June 17, 2004 (edited) Hi Isaac, **** Edited Post **** After some thought, I finally figured out what you meant. And good news is that there is actually nothing to it.... Apache2 has many ACL abilities, specifically on Directories. And although *strictly speaking* a Vhost should work without ACL, Apache2 by default RPM install adds all sorts of order by deny, allow, deny from all rules. In any event, the answer you your problem: Add the following directive INSIDE your VHOST directive (you can do this inside your VHosts file).... <VirtualHost yourvhost.com:*> DocumentRoot /path/to/documents ServerName yourvhost.com HostNameLookups off UseCanonicalName off DirectoryIndex index.htm index.php index.pl #whatever else you want IndexOptions FancyIndexing # the following part is the ACL part <Directory "/path/to/documents/"> allow from all order allow,deny </Directory> # end ACL part </VirtualHost> Remember to do a configtest (apachectl configtest or /path/to/apache/bin/apachectl configtest) after editing any conf files. Hope that helps, Regards, Armond **** End Edited Post ***** I always install from source, as I need lots of other config options that don't get honored with RPM installs. To install from source, get the latest tarball from http://httpd.apache.org/, unpack (tar zxf httpd-whatever.tar.gz, ./configure --with-prefix=/path/to/where/you/want [other configure options] make and make install. This also installs a couple different conf files. remember, if you install apache from source, to uninstall the RPM (rpm -e httpd should do the trick). to learn more about apaches virtual host directives, visit http://httpd.apache.org/docs-2.0/vhosts/ Good Luck, Regards, Armond Edited June 18, 2004 by armondf Quote Link to comment Share on other sites More sharing options...
Hirogen2 Posted June 18, 2004 Report Share Posted June 18, 2004 A VirtualHost directive allows (to the most part) anything that can appear in the default (/etc/httpd/httpd.conf) section, like DocumentRoot, etc. even SSL contexts. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.