Default "start page"

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

Default "start page"

Postby jmk » 29. March 2005 21:48

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.
jmk
 
Posts: 2
Joined: 29. March 2005 21:35

Postby sixx » 30. March 2005 00:24

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.
sixx
 
Posts: 7
Joined: 26. March 2005 08:16

Postby Kristian Marcroft » 30. March 2005 06:04

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
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

Thanks!

Postby jmk » 30. March 2005 09:13

That helps!
I just changed the index.html in de documentroot and cleared my cache of firefox. :D
jmk
 
Posts: 2
Joined: 29. March 2005 21:35


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 95 guests