|
|
|
|
![]() ![]() |
Nov 2 2006, 07:31 AM
Post
#1
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 3,996 Joined: 24-July 05 From: In Trouble Again... still? Member No.: 9,787 ![]() |
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 )" CODE <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 CODE 127.0.0.1 localhost 127.0.0.1 gmha.test Error received in the Browser: QUOTE 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 gmha.test 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. |
|
|
|
Nov 2 2006, 08:04 AM
Post
#2
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 220 Joined: 30-October 05 Member No.: 13,574 |
In your file httpd.conf you need to setup :
CODE <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 : CODE <VirtualHost ghma.test:80>
DocumentRoot C:/APACHE/XAMPP/GHMA/ ServerName gmha.test </VirtualHost> |
|
|
|
Nov 2 2006, 08:11 AM
Post
#3
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 3,996 Joined: 24-July 05 From: In Trouble Again... still? Member No.: 9,787 ![]() |
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??? This post has been edited by jlhaslip: Nov 2 2006, 09:23 AM |
|
|
|
Nov 2 2006, 10:23 AM
Post
#4
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 220 Joined: 30-October 05 Member No.: 13,574 |
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) CODE <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> This post has been edited by kdr_98: Nov 2 2006, 10:27 AM |
|
|
|
Nov 2 2006, 10:37 AM
Post
#5
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 413 Joined: 4-October 06 From: Psychedelic Realms Member No.: 31,079 |
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 This post has been edited by matak: Nov 2 2006, 10:39 AM |
|
|
|
Nov 2 2006, 06:55 PM
Post
#6
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 3,996 Joined: 24-July 05 From: In Trouble Again... still? Member No.: 9,787 ![]() |
QUOTE 127.0.0.1 localhost 127.0.0.2 gmha.test Works now with different IP mappings. D'uh! |
|
|
|
Nov 15 2006, 12:21 PM
Post
#7
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 220 Joined: 30-October 05 Member No.: 13,574 |
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. |
|
|
|
![]() ![]() |
Similar Topics