Page 1 of 1

Default "start page"

PostPosted: 29. March 2005 21:48
by jmk
Hi,

First of all, Xampp is great, it saves a lot of time, And I think they made a good selection of programs. :)
It seems to me this is the starting location of my webserver:
C:\apachefriends\xampp\htdocs\xampp
I would like to make a set of php-files in this location to be the default:
C:\apachefriends\xampp\htdocs\web

I want to create a more personel index page, in which I can choose what to do, instead of seeing the welcome page every time

I looked in C:\apachefriends\xampp\apache\conf\httpd.conf, and the documentroot is
C:\apachefriends\xampp\htdocs by default, but when I override the index.html, nothing happens!

I'm a bit at a loss, help's appreciated.

PostPosted: 30. March 2005 00:24
by sixx
What you need to do is create a new virtual host at the bottom of the httpd.conf file point it to the document root that you want it to go (can be anywhere) and then after you save your changes you will want to restart Apache server (just open your XAMPP Control Panel and hit the stop button beside of apache and then hit start.

make sure you change the following line of code from

Code: Select all
#
# Use name-based virtual hosting.
#
# NameVirtualHost *:80


to

Code: Select all
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80


oh and here is an example of a vHost

Code: Select all
<VirtualHost *:80>
   ServerAdmin YOU@YOURDOMAIN.com
   DocumentRoot C:/your/document/directory/
   ServerAlias www.yourdomain.com
   ServerName www.yourdomain.com
       ErrorDocument 404 /errors/404.html
       ErrorDocument 403 /errors/403.html
</VirtualHost>


You can add more or less to your vhost i didn't need to but you might. that should get you started.

Also you might want to make sure you forward your domain to your IP..or if you are using dynamic DNS make sure you are running it's software.

PostPosted: 30. March 2005 06:04
by Kristian Marcroft
Hi,

I don't see any need of a vHost.
All you have to do is clear your Browsercache.
The index.html thats in htdocs is in your Browsercache so everytime you call localhost it takes the index.html out of your Cache and redirects you to the xampp-sites.

So long
KriS

Thanks!

PostPosted: 30. March 2005 09:13
by jmk
That helps!
I just changed the index.html in de documentroot and cleared my cache of firefox. :D