Jump to content
xisto Community
Sign in to follow this  

Xampp Virtual Hosts Failing Problem with Apache Server set-up

Recommended Posts

Thanks for any assistance you might be able to provide.

As per the topic title, I am having difficulties getting a Virtual Host set up on my machine. XAMPP by itself is okay, in fact it runs perfectly except with several projects on my Local machine for testing purposes only, I wanted to avoid everything being accessed through the localhost/sub-folder method. I would like to go direct to the folder in the htdocs folder etc, blah, blah. You know what I mean...

I have been to the sites reccomended by other topics and have tried several different things which have all been failures, so I am posting here to have someone assist me in setting up a named host for an Apache server running on a Windows machine running 98SE. XAMPP version is 1.5.1, in case any of that matters.

In summary, I have an install of XAMPP which is un-altered, so I won't post the entire httpd.config file or the vhosts file, either, but here is the coding which I thought would work, but fails:

Added to C:\apache\xampp\apache\conf\httpd.conf and the vhost config file ( seperately & together , with and without quoted paths )"

<VirtualHost *:80>			 DocumentRoot C:/apache/xampp/gmha			 ServerName  gmha.test</VirtualHost><Directory C:/apache/xampp/gmha>		   Options  FollowSymLinks		   AllowOverride None		   Order allow,deny		   Allow from all</Directory>
Contents of C:\WINDOWS\hosts	   localhost127.0.0.1	   gmha.test
Error received in the Browser:

Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.
Error 403
11/01/06 22:10:35
Apache/2.2.0 (Win32) DAV/2 mod_ssl/2.2.0 OpenSSL/0.9.8a mod_autoindex_color PHP/5.1.1

And,of course, I have been stopping and starting the server between attempts as per SOP. Even been bringing down the Browser on each run, but so far, the only thing that works is the original httpd file from the XAMPP install.

Since this is a truly "local" machine, connected to the Internet only via a removable disk which plugs into another machine, there is no need for any other security considerations or directives or what have you. Just need an expert opinion on what I might be doing wrong here.
Should you require any further information, please request it here and I will provide it.

Any, and all, suggestions welcome.

Share this post

Link to post
Share on other sites

In your file httpd.conf you need to setup :

<VirtualHost ghma.test:80>			 DocumentRoot C:/apache/xampp/gmha/			 ServerName  gmha.test</VirtualHost>

Watch because in Windows XP everything is case sensitive, in Windows 98 you may have to use capital letters because before Windows XP everything was DOS based .

Alternative :

<VirtualHost ghma.test:80>			 DocumentRoot C:/APACHE/XAMPP/GHMA/			 ServerName  gmha.test</VirtualHost>

Share this post

Link to post
Share on other sites

Man, I knew that. :lol:


Thanks for your quick response. That's what happens late in the day when you start to use shortcuts like Cut & Paste. A fresh set of eyes solves alot of problems.


Thanks again.




Okay, that solved the problem about getting to the gmha folder.


Now I can't get to Localhost, so I placed another tag-set in there for localhost and now I can't get to the gmha.test. I am getting frustrated here. Even tried reversing the order of the containers. It appears to make no difference.


Any other ideas out there???

Edited by jlhaslip (see edit history)

Share this post

Link to post
Share on other sites

You just need to add 1 block per (local) domain you want to host.
So it must be something like this I think.
eachblock can be linked to a different domain , when you add the asterisk it means that the domain was not found in the above.

Well overhere it's noon (11:26 am)

<VirtualHost ghma.test:80>			 DocumentRoot C:/apache/xampp/gmha			 ServerName  gmha.test</VirtualHost><VirtualHost localhost:80>			 DocumentRoot C:/apache/xampp/			 ServerName  gmha.test</VirtualHost><VirtualHost *:80>			 DocumentRoot C:/apache/xampp/gmha			 ServerName  gmha.test</VirtualHost>

Edited by kdr_98 (see edit history)

Share this post

Link to post
Share on other sites

If u have many problems with Xampp you can always setup your webserver by

Installing Apache 2.0 and PHP 5 (and MySQL) on Windows XP

This is really good tutorial i used, and i think it beats using other apps for setting up server, beacouse here u can in first hand learn setting up MySQL an PHP, which comes quite handy latter..

This can come in handy too...
MySQL PHP Web Database Tutorial: Create Database

To moderators..
Is it allowed to post this links?
I'm not sure couse i'm a noob, as u can se below my name :( so plz don't be mad if it's not allowed :lol:

Edited by matak (see edit history)

Share this post

Link to post
Share on other sites

Strange you have to work with differnt IP adresses.Normally it should work with domain names as well, since you can make different (dynamic) domain names.And host them to different site.The nyou have the same ip adress, because you get only 1 IP adress from the internet.Have you setup the server name in each block, I think you may no specify the server name in each block.Maybe I'll try it out and let you know.

Share this post

Link to post
Share on other sites

How do you get on the net????

Xampp Virtual Hosts Failing


I was wondering how do you get XAMPP on the internet?? I'm googling and googling and I cant find anything free Please help? I want to use XAMPP instead of a webhost


-question by James Wallace

Share this post

Link to post
Share on other sites

Hi All, I have installed the xampp on my windows 2003 server , the ip is :, I have installed into this and put my files on /Shkarko-Mp3.NET direcotry : http://forums.xisto.com/no_longer_exists/ , and my site is http://forums.xisto.com/no_longer_exists/, I have redirect it into my server, I want u to tell me how can I add my domain shkarko-mp3.Net, on my windows 2003 via xampp, !-reply by Albion

Share this post

Link to post
Share on other sites
Xampp+tomcat catch all virtual hostsXampp Virtual Hosts Failing

If tomcat is installed the default configuration will catch all virtual configured hosts to xampp main host ... You need to change this

at apache virtual host configuration <xampp>/apache/conf/extra/httpd-vhosts.ConfafterNameVirtualHost *:80insert <VirtualHost *:80>   ServerName localhost</VirtualHost>at tomcat configuration file <xampp>/tomcat/conf/auto/mod_jk.Confreplace<VirtualHost localhost> with <VirtualHost *:80>

-reply by PkLab.Net

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.