Apache VirtualHost – WebServer on Another Port

Just encountered this today. Here is the situation. We are developing a big project that take almost six months to finished. Thus, all our attention are focused on that project. What we did is install the project on our central development server into the web root.

We are almost finished, but suddenly we have another small project that we also need to house on our development server without interfering the other project.

To solve this, I need to create another VirtualHost for a specific port on the same server so that I may write:


And that would automatically point to our new project. After a quick research, i found this link: http://www.daniweb.com/forums/thread29286.html. I studied it and tried but I think I failed because it says the page is forbidden.

Again, I ask a question in our forum: http://www.phpugph.com/talk/index.php/topic,8029.0.html and gets almost the same answer. However, it made me realized that my first attempt was successful, but it just don’t allow directory browsing.

I pointed my browser directly to the http://our-server:8000/index.htm file and there you go, it works.

This is the final httpd.conf settings:


   ServerAlias localhost ess21147
   DocumentRoot "C:/www/web_projects"
   DirectoryIndex index.php index.html index.htm
   <Directory "C:/www/web_projects">
      AllowOverride All
	  Allow from All
   Alias /projects "C:/www/web_projects"
   <Directory "C:/www/web_projects">
      AllowOverride All
	  Allow from All

I think the alias there is useless. But I just posted it here since it was my original setup. After some cleanup, of course that settings are changed.

Leave a reply

Your email address will not be published. Required fields are marked *