setting up websites help needed

Problems with the Windows version of XAMPP, questions, comments, and anything related.

setting up websites help needed

Postby bruce221 » 03. February 2009 08:08

I have a hardware firewall with one-to one nat configured.( private begin--- ip of my server computer -------- public begin static ip) example ips

Have already pointed my website domain names to my static ip.

I am a total beginner at Apache stuff and Are looking for some help setting up websites on 1 static ip. I am not exactly sure what ip to use in the httpd.conf file for the " Listen , or Server Name".
Should I use the private ip address for these?

I have changed the Document root to: "C:/www" and also this to <Directory "C:/www"> but if i create a index.html file in the www folder it comes up Error 404 not found

I am wanting to have all of my websites directories under the folder C:/www So i will have C:/www/site1/index.html ------- C:/www/site2/index.html ---- C:/www/site3/index.html etc...

I have been reading docs about how to do this, but are not fully understanding how to go about doing this. Anybody can help with a step by step example of how to do this, which files to mod and where?

Also, when i type in my static ip address on another computer, i am getting the XAMPP orange configuration(menu) screen, that means everybody that types my statip ip in will see this too? how can I make
it so it will display a simple html file that i create and yet also on the XAMPP control panel when I click the "Apache Admin button" display the orange config menu screen?
Posts: 1
Joined: 03. February 2009 06:50

Re: setting up websites help needed

Postby Mario Lanz » 03. February 2009 08:13

I gues you have to set up vhost...

first you have to enable it in httpd.conf and then you have to going to the folder extra(s) (not sure at the moment) and configure vhosts there.

I have also to make entries in the host file - use your static ip not internal.
User avatar
Mario Lanz
Posts: 104
Joined: 13. October 2004 22:47
Location: CH, Volketswil

Re: setting up websites help needed

Postby Izzy » 03. February 2009 08:20

@ Mario Lanz
By default you do not need to do anything in the httpd.conf file in fact it is better if the httpd.conf file is left as the default after a successful installation of XAMPP.

(Please be careful on these forums as there will be some who don't search the forums, then try and pass on misleading information for what ever reason they are only privy to.
Often there intentions are corrupted by there lack of translation skills or they use a web machine language translation service which, as we all know, is only a very rough method to use

Now let's get on with it. ;)
Please return your httpd.conf file to the defaults (it is important) and then investigate virtualhosts or vhosts in a search in the XAMPP for Windows forum and select to see All available characters of posts - there are many successful examples that have been posted before.

Creating your sites using vhosts is the way to go for multiple web sites and for having web site folders outside of the htdocs folder (default DocumentRoot).

After your investigation, try and create your vhosts in xampp\apache\conf\extra\httpd-vhosts.conf file, then if you get stuck post back - tip create the localhost vhost first then your first web site and if that works simple add another and see if that works and so on, don't try and add them all at once or you will not know which vhost is giving you issues.

There is plenty of help here for vhosts if you have a go, which you are clearly wanting to do.

This is an example that might help you get started, if this works then simply add another site and so on.
Code: Select all
NameVirtualHost *:80

<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:/xampp/htdocs"

<VirtualHost *:80>
DocumentRoot "C:/www/site1"
<Directory "C:/www.site1" >
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all

Put your index.html file in C:\www\site1\ and in your browser type which should find it.

In the C:\Windows\system32\drivers\etc\HOSTS file (drag in to your text editor, notepad for example) add your domain names after the localhost entry, for example:
Code: Select all localhost
Posts: 3344
Joined: 25. April 2006 17:06

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 29 guests