Setting up Apache 2.2 virtual hosts
I tried to setup a development environment in my local Apache server to have multiple sites, each with its own name. However when I try to access them (ex. http://site1) from a browser I get:
Quote:
Quote:
I uncommented the following line in /etc/httpd/httpd.conf Code:
Include /etc/httpd/extra/httpd-vhosts.conf Code:
NameVirtualHost *:80 Code:
127.0.0.1 localhost Quote:
Google hasn't helped me much. I am using slackware 13.37 and Apache version 2.2.21 EDIT: I want to add that the server worked correctly before and still does if I comment again the line in httpd.conf that includes extra/httpd-vhosts.conf, then I can can access localhost from a browser but uses /var/www/htdocs as DocumentRoot. |
You need a "Directory" directive to allow access to the directory...
Something like this... Code:
<VirtualHost *:80> Code:
setenfore 0 |
Yes or make /home/reborn/webdev directory globally available
Code:
NameVirtualHost *:80 |
Yes you are right, I added the "Directory" directive and now everything works!
Thanks a lot! |
All times are GMT -5. The time now is 07:13 AM. |