localhost/xampp

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

localhost/xampp

Postby BillClark » 07. March 2010 18:34

I'm running 1.7.3 basic package, when I open a new web brouser and type localhost it automatically adds
//localhost/xampp, is this correct or should I have just localhost. I am confused to say the least. I don't know where the xampp directory came from. Can anyone explain this to me in xampp for dumbies language please.

Thanks

BillClark
BillClark
 
Posts: 9
Joined: 06. March 2010 21:48

Re: localhost/xampp

Postby Altrea » 07. March 2010 18:42

Thats the correct behavior.
localhost routes to your htdocs folder
Inside this Apache searches for a default file (default files are defined in the httpd.conf).
One of the default files is index.php and this file you should find inside your htdocs folder
This index.php file redirects to the xampp folder
Last edited by Altrea on 07. March 2010 23:05, edited 1 time in total.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11933
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: localhost/xampp

Postby Mobius » 07. March 2010 22:55

Hello BillClark,

The default Windows XAMPP installation creates a directory (folder) off of the root of your hard drive.
c:\xampp
Under this directory/folder is another directory/folder called: htdocs
c:\xampp\htdocs
This directory/folder is the one where localhost looks for html files.
In your browser address field, type:
localhost/index.html
You should get a message on screen:
It works!
I have not figured out how to get the redirection to the xampp subdirectory/subfolder to stop when addressing just localhost, but I know where you are coming from as to the confusion when starting to use XAMPP. I feel like the XAMPP community is very friendly, but the average XAMPP user knows so much more than rank beginners like you and me, that they find it hard to explain stuff at our levels. This is not a derogatory remark about them, but rather a cautionary note to you and me that they have done a lot of homework, probably get tired of a lot simple questions, and are just human. Anyway, there are lots of documents to read, so I suggest you get to reading!

:wink:
Mobius
 
Posts: 8
Joined: 24. February 2010 00:48

Re: localhost/xampp

Postby Altrea » 07. March 2010 23:07

Mobius wrote:I have not figured out how to get the redirection to the xampp subdirectory/subfolder to stop when addressing just localhost


Simply delete or change the index.php file inside the htdocs folder.
line 8 in this file does a php header redirect into the xampp subfolder.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11933
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: localhost/xampp

Postby Mobius » 07. March 2010 23:22

Altrea wrote:
Mobius wrote:I have not figured out how to get the redirection to the xampp subdirectory/subfolder to stop when addressing just localhost


Simply delete or change the index.php file inside the htdocs folder.
line 8 in this file does a php header redirect into the xampp subfolder.


Thanks! I thought I had renamed it: indexxampp.php, but I actually made a copy to that name and forgot to delete the original!
Mobius
 
Posts: 8
Joined: 24. February 2010 00:48

Re: localhost/xampp

Postby MC10 » 08. March 2010 03:38

You should also rename xampp\htdocs\index.html, which creates the "It works!" message.
MC10
 
Posts: 148
Joined: 20. February 2010 20:13

Re: localhost/xampp

Postby BillClark » 11. March 2010 04:24

Thanks to all who responded, I think I have the directory path figured out now, I can begin the tutorials now that I know where everything is. Also the short tag problem I had is a thing of the past. Thanks again!!!!!!!!
BillClark
 
Posts: 9
Joined: 06. March 2010 21:48

Re: localhost/xampp

Postby wildswan » 13. March 2010 00:45

I'm also a VERY noob to working with a local server, but I'm building a website that needs servicer side scripts and MySql so I guess I'll learn.

I'm using:
Windows 7
XAMPP Control Panel V 2.5.8
XAMPP for Windows V 1.7.3
And I am not running as a service.

I finally have my browser (Firefox) connecting properly to localhost, BUT....

I installed xampp with all my other program files on c:/ drive, without realizing that htdocs (where wampp apparently stores all the files generated by the user) is a subdirectory of the main xampp directory. Normally, all of my text files (html, js. css, etc) are stored on the d:/ drive. With current partitioning, I don't have enough room to store all these files on the c: drive.

SO, how do I move the htdocs subdirectory to d:/ drive, and reroute the server to look for these files on d:? Of course, the other alternative is to uninstall and reinstall Apache on the d: drive, but after all the trouble I had getting it to work, I really don't want to try that and maybe spend another couple days just on installation!!!

Please tell me it's possible to have xampp program files on one drive and user generated files on a different drive. :roll:
wildswan
 
Posts: 4
Joined: 12. March 2010 17:57

Re: localhost/xampp

Postby cascade27 » 13. March 2010 01:21

Look into your httpd.conf and look for the DocumentRoot line. It looks like something similar to the following:

DocumentRoot "C:/Apache2.2/htdocs"

Change the path to your D: drive where your htdocs resides. You need to restart Apache for the change to take effect.
cascade27
 
Posts: 2
Joined: 13. March 2010 00:01


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 147 guests