Jump to content
xisto Community
Sign in to follow this  
jimmy89

Help: Setting Default Index Page on XAMPP Web-Server Need some Help

Recommended Posts

i have just installed XAMMP (win32 version) onto a spare computer just to see if i could get my own home web server going. the install went fine and i managed to get all the of components installed.

but, when i go to LOCALHOST/ it directs me to the administrator page (LOCALHOST/xampp/) and not to my htdocs folder where all my files are stored.

when i type in LOCALHOST/index.html this will take me to the page i want, but i want to be able to just type in localhost or the IP address of the computer to access the page!

how is there a way of doing this, or am I just have to keep entering the page name after localhost each time

thanks for your help
-jimmy

Share this post


Link to post
Share on other sites

PHP Admin

Help: Setting Default Index Page on XAMPP Web-Server

 

Http://localhost worked before I change the "file"(php test sites) folder directory to test. Now my pages work but I can't get onto the PHP/MySQL home page where you configure the databases. Please help!

 

-question by Jacques

Share this post


Link to post
Share on other sites

not able to work in xampp

Help: Setting Default Index Page on XAMPP Web-Server

 

I had installed xampp sucessfully, but the problem is that I am unable to see the welcome apge from where.

 

I can go to PhpMyAdmin.

 

-question by Ashwin Perti

-------------- admin reply ----------

 

Execute XAMPP and make sure APACHE is running.

Open your Browser and type :- LOCALHOST/

Share this post


Link to post
Share on other sites

Help: Setting Default Index Page on XAMPP Web-Server - Need some Help!

Help: Setting Default Index Page on XAMPP Web-Server

 

Replying to iGuest

Just copy the xampp folder into your test directory and you should be fine.

Just make sure you keep it in the root of your working directory.

 

-reply by mike

Share this post


Link to post
Share on other sites

You could change the default index file by opening httpd.conf file.

 

Open httpd.conf from path your have installed xmpserver or apache2\conf directory.

find a string "<Directory>" that includes an value that point to your document root directory.

 

Add or change a line that start with "DirectoryIndex ..." to "DirectoryIndex index.html index.php"

 

e.g.

For instance, you have installed xmpserver or apache2 to c:\program files\xmpserver2

then xmpserver_root = c:\program files\xmpserver2

 

Open the httpd.conf file from a path like [xmpserver_root]\conf\httpd.conf

 

Search for a string that look like this, "<Directory '[xmpserver_root]'>"

Then, add or modify the setting of "DirectoryIndex" look like this,

 

DirectoryIndex `page list`

the page list is a space separated list of default you wish server to use when a request arrived to the server, such as,

 

DirectoryIndex index.html index.php

save and restart xmpserver or apache2 server and test it.

 

P.S Besides the above method. You may also put the DirectoryIndex directive outside of any Directory directive.

Share this post


Link to post
Share on other sites
Index PageHelp: Setting Default Index Page on XAMPP Web-Server

I am in love with XAMPP Apache server, I don't like the Microsoft policies, long live freedom..

to let your index.Html work instead of the LOCALHOST/xampp/, simply go to the htdocs folder and delete the index.Php file

-reply by Abyooda

Share this post


Link to post
Share on other sites
Viewing and editing the Index page - XamppHelp: Setting Default Index Page on XAMPP Web-Server

Hi Ashwini,

The index file/ home page will be stored in /Xampp/htdocs . It can be either a index.Php or index.Html. You can edit one and rename the other one so that you can view your home page by opening your browser and typing in http://localhost.

Feel free to ask questions here.

-reply by Udayakumar

Share this post


Link to post
Share on other sites

For those that don't want to delete the index.Php file, there is a line when you open up that file that says: header('Location: '.$uri.'/xampp/'); 

You can change the '/xampp/' to '/index.Html' or whatever else you have happen to want the default webpage to open up as.  

Share this post


Link to post
Share on other sites
Problem with XAMPP directory and loading websiteHelp: Setting Default Index Page on XAMPP Web-Server

Hi guys, I hope some one with more experience can help meOut with this frustrating problem.

 

I want to practice some PHP and infrastructure tests on thisDynamic website that I have access too, without ruining the website if I makeSome mistakes.

 

Ive installed XAMPP successfully, but now I have the problemOf getting it to run the website correctly.

 

I deleted the original index.Html and index.Php files thatWere in the xampp/htdocs area.

I than copied and pasted all of the files from my websiteInto this directory.

 

 

I just changed the,

1. Locate XAMPP install directory

2. Open php/php.Ini

3. Do a search for the word ‘curl’ and uncomment (remove theLeading semicolon) that line

4. Save & close

 

But there was no, php.Ini file in apache/bin/php.Ini so that was is unchanged.

 

 

Now when I go to,

LOCALHOST/mywebsitename.Com/

the home page works, but when I click on a link on my homePage it goes to the actual page online;

http://www.mywebsitename.com/subfile.Php/?gtnjs=1

 

Some of the links from the home page go to

LOCALHOST/afileonmysite.Php

 

but than an "Object not found!" screen appears.

 

I have a feeling that my directory is not setup correctly.Maybe someone could guide me in the right direction

 

Thanks Will-

 

Share this post


Link to post
Share on other sites
Thanks for the helpHelp: Setting Default Index Page on XAMPP Web-Server

Dear sir/madam,

 Thanks for the timely help. When I work in php with mysql, the index.Php has worked without modified any  configuration file.  But now I am working in Postgres  I could not able to start with the default index.Php with out typing in the address bar. When I give the index.Php in the address bar then only it shows the page otherwise it shows the directory list. So when I saw your comments on this, I follow the comments. Now it is working without typing the index.Php..

Thank you once again...

Bye bye take care...

 Regards,

Pk. PK 

 

Share this post


Link to post
Share on other sites
Got some input on this one.Help: Setting Default Index Page on XAMPP Web-Server

I had the same problem.  My local version redirecting to to /xampp when all I wanted was http://localhost.

First:  index.Php is designed to redirect to /xampp ( header('Location: '.$uri.'/xampp/'); )

I didn't want to mess with this file, if you do then replace the contents or delete the file and the redirect will go away...

I wanted to work on the index.Html, but because of the DirectoryIndex entry in httpd.Conf, it always opted for the index.Php, instead of the index.Html file, because index.Php was before index.Html in the file list.

When a directory request (e.G. http://localhost) is made to Apache it determines the file to respond with by looking at the list of files defined in DirectoryIndex in the order that they are listed.  So, I moved index.Html to the front of the DirectoryIndex list, so Apache "finds" it and responds with index.Html.

Of course, if I delete index.Html it will look for and find index.Php...

Of course, if I renamed index.Php to something not in DirectoryList it would solve the problem as well.

-reply by Tony

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.