Please check my virtualhost...
I need to set up a virtualhost (for the first time), and I wanted to make sure I had it set up correctly before I uncommented it.
How does this look? (link to copy of httpd.conf) |
Looks OK to me. I'd put the ServerName at the top to make it more readable, but it doesn't actually matter.
I assume that your DocumentRoot is correct, etc. Give it a try - it won't damage anything is you do have a mistake |
You have Slackware12 in you signature, however not sure if that's the distro that you're using for your webserver.
If you run a stock Slackware 12 box, vhosts are defined in /etc/httpd/extra/httpd-vhosts.conf. You uncomment one line in /etc/httpf/httpd.conf as shown below to activate it; this line is commented out (so non-functional) by default Code:
Include /etc/httpd/extra/httpd-vhosts.conf Code:
# As you might notice, I don't use the standard apache directory for the websites, but the user's home directory. Reason is that I consider it easier when it comes to ftp. Usually a system administrator wants to jail ftp-users to their home directory and I have seen too many questions regarding permissions and access to /var/www/htdocs in relation with ftp. In the setup that I have choosen, a user can ftp to his/her home directory and descend into the web directory to update the website. Disadvantage however is that if apache needs to write files, you need to open the permissions a bit. My directory tree for the sites looks like this: Code:
/home I don't want php code that e.g reveals login credentials for a database to be accessible from the outside world (anything in web is), so that goes in inc. The webpage that uses that code will go in web and will use a include statement to access it. Sorry for the long story, I hope it helps a bit in understanding things. |
All times are GMT -5. The time now is 08:00 PM. |