[Help]Changing default xampp page.

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

[Help]Changing default xampp page.

Postby th1alb » 14. February 2009 04:13

when typing http://localhost the default xampp page appears.I know i need to configure httpd.conf directoryindex to change the default page.

I wanted to changed; so that when typing http://localhost gives me htdocs folder (i wanted to see all my projects) just like in wamp typing the same gives me www folders (dont suggest me for wamp :) )

please give details,thanks.

Image
th1alb
 
Posts: 98
Joined: 31. August 2005 21:14

Re: [Help]Changing default xampp page.

Postby Izzy » 14. February 2009 06:44

You don't need to edit the httpd.conf file just delete or rename the existing index.php and index.html files, which will give the htdocs directory listing - not a too fancy interface though.
The indexes are controlled using the httpd-autoindex.conf file in the apache\conf\extra folder.
http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html
Google Search for fancyindexing

Or you can create your own fancy index.html file like the one at wamp by using your favorite html editor, then you can design it just as you like, after all an index.html file is simply another web site page.

You can use a ready made script to get a more fancy directory listing.
This Google Search may help you find one that suits your needs.

This multilingual offering seems to be recommended by some, check out the screenshots:
http://www.bitfolge.de/snif-en.html

You may find more scripts to do this job at HotScripts.com

You can also change the default xampp page and add your own content listing but it is very complicated and would entail editing several xampp files that would be very difficult to explain in a forum post.

Finally, if you are smart, you can look through the source code of the files in wamp and see how they do the index in your screenshot image then use their code to create your own project index page in XAMPP.


I also found this in my database which may help but all the links may not work now:
farmdve wrote:Also where can i edit the mod_autoindex so i can change the apppearance of the def. style iread the article but its pointless in reading because it doesnt say wich file to open etc..

To change the default appearance of a directory index listing there are many options which can be placed in the httpd.conf file or more specifically, and the preferred file, in the httpd-autoindex.conf file, for a server wide solution.

Or in a <Directory> directive in the httpd-vhosts.conf file for a domain specific solution.

Or on a directory by directory basis, within a .htaccess file in the directory you wish to display an index list of files.

These are the official Context locations from the Apache Docs:
server config - .\xampp\apache\conf\httpd.conf
preferred server config - .\xampp\apache\conf\extra\httpd-autoindex.conf
virtual host - .\xampp\apache\conf\extra\httpd-vhosts.conf
directory - within a <Directory> directive
.htaccess - within a .htaccess file in a directory to be indexed.

The default file icons used in XAMPP for file indexes are to be found here:
.\xampp\apache\icons
(read the README file in this directory for useful info).

These public domain icons may be customized or replaced to suit your own web site design and are configured server wide in the httpd-autoindex.conf file.

IMPORTANT - always make a backup of .conf and .ini files before making any edits and always restart the server for any edits you make to be recognized.

The Apache Documentation explains what you can do in changing the appearance of the default listing to suit just about every need.
http://httpd.apache.org/docs/trunk/mod/ ... index.html

Cascading Style Sheets (CSS) are among the favored methods as this allows for plain, image or gradient backgrounds, different text colors, sizes and fonts etc. to display your directory index in the same style and design of your web site.
IndexSyleSheet is referenced here:
http://httpd.apache.org/docs/trunk/mod/ ... stylesheet

This subject is not as easy or as simple as opening and editing a file and setting some configurations but is about reading, learning, investigating and experimenting with the methods outlined in the Apache Documentation.


BTW - mod_autoindex_color is enabled by default in the server's httpd.conf file and all that is required of you now is to read and then implement some of the methods outlined in the Apache Docs - this is too big a subject to just give you a '1-2-3 how to do it' response.


AutoIndex PHP Script v2.0
If you don't want to learn the above method for what ever reason there is an AutoIndex PHP Script (Directory Indexer) available from SourceForge that may do the trick for you.
Note v2.0 is for php5 only and v1.0 is for use if you using php4.

This Screen Shot may give you some idea what it can do.

Their Support Forum would be the place to ask any questions about what the script is capable of, and you can find posts about customizing with CSS and Templates in the Development forum.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: [Help]Changing default xampp page.

Postby th1alb » 14. February 2009 10:55

Izzy wrote:You don't need to edit the httpd.conf file just delete or rename the existing index.php and index.html files, which will give the htdocs directory listing - not a too fancy interface though.


this is it ;i can cope with graphics :).

thanks for your time, much appreciated.thank you. :D
th1alb
 
Posts: 98
Joined: 31. August 2005 21:14

Re: [Help]Changing default xampp page.

Postby Izzy » 14. February 2009 11:00

Your most welcome and a simple solution was all you needed. :)

You can still access the xampp default page (XAMPP Welcome Page) by going to:
http://localhost/xampp

Good luck.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: gsmith and 37 guests