Page 1 of 1

Home page comes up with User Name and Password screen?

PostPosted: 05. February 2008 02:50
by tomnuff
Hello,
I just setup XAMPP and I believe I have it set right but one there is one problem. When I pull up my URL it asks for a user name and password to get in.

If type in www.mydomain.com and it asks for a user and pass.

If I type in www.mydomain.com/index.html it pulls up the "It Works" page??? :?

Why doesn't it default to the "It WorKs' page? I hope this is a tiny step I missed.

PostPosted: 05. February 2008 02:57
by KallistaAEnvarou
What are you typing in the URL? Where are your scripts located?

PostPosted: 05. February 2008 03:07
by tomnuff
I'm typing www.mydomain.com and it asks for a user name and pass.

If I type in www.mydomain.com/index.html it pulls up the "it works" page?

My httpd-conf file in in the conf folder. Didn't change anything in the vhost file since I only have one site right now.

thanks for the reply.

PostPosted: 05. February 2008 03:09
by KallistaAEnvarou
No, I mean what's the path? Is that site a live server hosted by a regular host, or did you put that as your name alias in your vhosts file? If you don't even know what the vhosts file is, it's the former.

PostPosted: 05. February 2008 03:13
by Izzy
Hello again Tom,
Similar issue here with a possible fix:
http://community.apachefriends.org/f/viewtopic.php?t=28065

Clear your browser's cache also.

PostPosted: 05. February 2008 03:23
by tomnuff
Ok,
I renamed the htaccess file and now when I type in www.mydomain.com it goes straight to the apache control panel? The user name and pass is gone but why doesn't it pull it the "It works" page?

Izzy you da man, thanks, by the way, I signed your petition too :)

PostPosted: 05. February 2008 03:35
by Izzy
I have no idea because I don't know how you have configured www.mydomain.com - check and double check your vhosts file and or the httpd.conf file and while you are at it check the Windows hosts file again.

Kill any Control Panel services and try again - right click on Windows Task Bar->Task Manager->Processes tab and look for xampp-control then right click on it and select End Process then Yes.

What happens when you go to http://localhost

And check your Apache error.log file for clues - xampp\apache\logs\error.log

Thanks for signing the petition, the Whales will love you for it, if they can be saved.

PostPosted: 05. February 2008 03:50
by tomnuff
I checked my windows hosts file and this is what it reades
Code: Select all
# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       localhost
::1             localhost
Do I need to change the 127.0.0.1 to my local IP or site IP? Thanks again for all your help

I used to be able to pull up my http:localhost and it pulled up the xamp control panel but not it does not pull up now.

PostPosted: 05. February 2008 04:07
by Izzy
Get rid of this line as it could cause issues - this is the IPv6 local loop back address and if you don't use IPv6 then it is safe to delete or comment out - try this first and see how you go:
::1 localhost

Please post feed back if removing the above line helps with your issue.

You should have your other domains and local IPs in the hosts file if you are accessing locally but again this depends on how your vhosts file is configured.

Just follow the commented # lines in the above hosts file for clues.



Because I did not read your first post correctly, I may have given you a fix that you may have not needed to do to get rid of the user/pass issue - however the following paragraphs will sort that out I hope and you will be able to set a user/pass again if you wish.

Your www.mydomain.com issue not giving you the "It Works" response is very simple to fix.

When you type www.domain.com then the index file loaded is index.php which, in the htdocs directory is the XAMPP index file and is why it brings up the request for user/pass as you had set one in the Security section of the Welcome page.

When you typed www.mydomain.com/index.html then this brings up the index.html file with the text "It Works" in the html source code.

To fix this just rename the index.php in the htdocs directory to index.php_orig and try again with www.mydomain.com and you should see the "It Works" page.

To change this behavior on a server wide basis you will need to edit your httpd.conf file like this:
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.shtml #
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#

Change this DirectoryIndex line so that index.html is the first entry and before the index.php entry - my list of index files above will be different to yours however.

When ever you type just www.mydomain.com without a page reference then you are requesting a directory index

So the above configuration comes into play and the first index file in the list, if it exists in the directory will be sent to the browser - index.php, so you need to change the order so index.html is first in line.

But if the first index file in the list is not present then the next in line will be looked for and served if it finds it - and so on until all index files in the list have been exhausted - the server will then give a list of files and directories within the specified directory to the browser which requested a directory index.

PostPosted: 05. February 2008 05:25
by tomnuff
:shock:
Got it!!!

I did exaclty that. Changed the name of the index.php file to index.php_old and changed the order of the directory index.

I will pass on your petition and get you more signatures.

Thank you! :D