Access Issues

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

Access Issues

Postby TheHumphries » 17. October 2007 03:48

Hi All.

I tried reading back through the forum to see if anyone else has posted this and I didn't see anyone, so if this is a repost, my apologies.

I installed Xampp for Windows on my 2k3 Standard Edition box without a problem. Went and setup the passwords and all services are running.

When I enter in my IP, I am asked:
Enter username and password for "xampp user:".

If I enter in my XAMPP directory Protection username and password that I setup earlier, I am logged in directly to the the XAMPP admin panel. If I decline, I get this message:

Authentication required!

This server could not verify that you are authorized to access the URL "/xampp/". You either supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.

In case you are allowed to request the document, please check your user-id and password and try again.

If you think this is a server error, please contact the webmaster.
Error 401
MY IP
10/16/07 21:34:20
Apache/2.2.6 (Win32) DAV/2 mod_ssl/2.2.6 OpenSSL/0.9.8e mod_autoindex_color PHP/5.2.4

Looks like xampp is not routing HTTP requests to the htdocs folder? Did I mess this up somehow?

Thanks in advance.

Nick
TheHumphries
 
Posts: 4
Joined: 17. October 2007 03:43

Postby Izzy » 17. October 2007 04:06

Hello Nick,
That is how it is intended to behave, restrictive, in a default installation of XAMPP and this behavior is set in the
C:\xampp\apache\conf\httpd.conf file.
(your path pay be different).
Code: Select all
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "C:/xampp/htdocs"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features. 
#
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

You can change this on a directory by directory basis by changing the <Directory> directive either in the httpd.conf file or by using a .htaccess file at the top level of a directory tree, like so:
Code: Select all
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Allow from all
</Directory>


http://httpd.apache.org/docs/2.3/mod/co ... #directory

http://httpd.apache.org/docs/2.2/howto/access.html

Always backup configuration files before editing and restart apache after making your edits.
HTH


===========================================
Take a look at the new DeskTopXampp launch control for XAMPP
and XAMPPlite (DTX.exe) posted by ridgewood:
http://community.apachefriends.org/f/viewtopi ... 967#103967
Available at Ridgewood's new DTX web site http://zedfiles.com/DTX/
Also available here: http://nat32.com/dtx/
I highly recommend DTX.
============================================
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby TheHumphries » 17. October 2007 04:16

Thanks for the reply Izzy, but I am still lost (sorry! I am a hardware guy :) )

So, in my C:\xampp\htdocs (did default directory install) I should have .htaccess file that I can edit? If so, there isn't one but I have a feeling I am looking in the wrong directory? My apologies as I am not sure where these files are located. Can you point me to the right place?

Thanks.

(EDIT)

I now see the links (I missed them..One of those days). Unfortunately, I know nothing about how to edit config files and such. I know zero code.

Another question I might ask, because I don't understand, is why XAMPP doesn't allow the HTDOCS to be accessed. Isn't a webservice one of the main functions of xampp?
TheHumphries
 
Posts: 4
Joined: 17. October 2007 03:43

Postby TheHumphries » 17. October 2007 04:24

Would this be the correct location of the httpd.conf file?

C:\xampp\apache\conf

Ifso, what exactly do I change? I apologize for the hand holding as I am just lost :)
TheHumphries
 
Posts: 4
Joined: 17. October 2007 03:43

Postby Izzy » 17. October 2007 04:52

If you rename the index.php in the htdocs directory, to say, index.php.bak and put in its place your own index.html file then you will have access to it without the need for a user/pass combo.
http://127.0.0.1/index.html
or just
http://127.0.0.1

Without doing this you will be using the default index.php which redirects to the htdocs\xampp directory which, now you set a username/password in the first place, contains the .htaccess file and is restricted.

http://127.0.0.1/index.php
redirects to
http://127.0.0.1/xampp/index.php
or just
http://127.0.0.1

Clear as mud :)

Had you not set a user/pass in the first place then you would have had access to the XAMPP Welcome Page without any problems.

So rename the index.php and put your own index.html file and the rest of your web site files and directories in there and you will be just fine.
http://127.0.0.1
will give you your web site.

Put your all your web site files in xampp\htdocs\mysite directory which will have its own index page and call it in your browser like this:
http://127.0.0.1/mysite/
and you will have no problems.
HTH


===========================================
Take a look at the new DeskTopXampp launch control for XAMPP
and XAMPPlite (DTX.exe) posted by ridgewood:
http://community.apachefriends.org/f/viewtopi ... 967#103967
Available at Ridgewood's new DTX web site http://zedfiles.com/DTX/
Also available here: http://nat32.com/dtx/
I highly recommend DTX.
============================================
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby TheHumphries » 17. October 2007 05:23

Now it is all clear! :)

So, my whole project here was to get an internal based PHP site going. Would best bet be to do a complete uninstall..and then do a reinstall and NOT enter in the PHP user/pass?

Thanks in advance and thanks for putting up with a moron like me!
TheHumphries
 
Posts: 4
Joined: 17. October 2007 03:43


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 54 guests