jlhaslip 4 Report post Posted November 2, 2006 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\hosts127.0.0.1 localhost127.0.0.1 gmha.testError 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 403gmha.test11/01/06 22:10:35Apache/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
kdr_98 0 Report post Posted November 2, 2006 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
jlhaslip 4 Report post Posted November 2, 2006 (edited) Man, I knew that. 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. *EDIT* 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 November 2, 2006 by jlhaslip (see edit history) Share this post Link to post Share on other sites
kdr_98 0 Report post Posted November 2, 2006 (edited) 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 November 2, 2006 by kdr_98 (see edit history) Share this post Link to post Share on other sites
matak 2 Report post Posted November 2, 2006 (edited) If u have many problems with Xampp you can always setup your webserver byInstalling Apache 2.0 and PHP 5 (and MySQL) on Windows XPThis 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 DatabaseTo 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 Edited November 2, 2006 by matak (see edit history) Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted November 2, 2006 127.0.0.1 localhost127.0.0.2 gmha.testWorks now with different IP mappings. D'uh! Share this post Link to post Share on other sites
kdr_98 0 Report post Posted November 15, 2006 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
iGuest 3 Report post Posted November 5, 2008 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
iGuest 3 Report post Posted May 11, 2009 XAMPP Apache Virtual Host TutorialXampp Virtual Hosts FailingHi all, I have written a tutorial on how to set up a virtual host in apache with XAMPP. please see if it help. http://forums.xisto.com/no_longer_exists/ -reply by jarvis Share this post Link to post Share on other sites
iGuest 3 Report post Posted August 7, 2009 Hi All, I have installed the xampp on my windows 2003 server , the ip is : 94.76.244.224, 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
iGuest 3 Report post Posted December 16, 2009 Xampp+tomcat catch all virtual hostsXampp Virtual Hosts FailingIf 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