Problems with apache and localhost [SOLVED]

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

Problems with apache and localhost [SOLVED]

Postby lvmma » 19. January 2012 22:22

I recently installed XAMPP which includes apache. the install went fine. I went into httpd.conf and changed the document root and directory because I want localhost to show me this set of files when I go there in the browser


<Directory "C:/app/webroot">


<DocumentRoot"C:/app/webroot">

I get this message:
Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.

Error 403

localhost
01/19/12 15:08:35
Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1s

oddly enough, when I go to localhost/phpMyadmin it loads up with no problem (aside from the fact that it somehow installed in German instead of english, but that is a problem for another day)

any idea why this is happening?
lvmma
 
Posts: 4
Joined: 19. January 2012 21:52
Operating System: Windows 7

Re: Problems with apache and localhost

Postby Sharley » 19. January 2012 23:40

Which <Directory> line did you change in the httpd.conf file as it sounds like you have changed the line at about 193 instead of the one at about line 210?

But if I am wrong then could you paste the section of the httpd.conf file between the <DocumentRoot> and the last <Directory> directive (about lines 183 to 210) please and put them in between forum code tags found in the reply box top menu.

The phpMyAdmin problem is easily fixed.

In the phpMyAdmin Home Page you can change the language in the Anzeige-Einstellungen section using the Sprache - Language drop box to English or a language of your choosing?
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Problems with apache and localhost

Postby lvmma » 20. January 2012 15:40

Thanks for the reply, I have pasted the requested lines below

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:/app/webroot"


<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "C:/app/webroot">

lvmma
 
Posts: 4
Joined: 19. January 2012 21:52
Operating System: Windows 7

Re: Problems with apache and localhost

Postby Sharley » 21. January 2012 01:00

OK, that code paste seems to be correct.

Now we need to investigate the 403 error and this is best done by reading the C:\xampp\apache\logs\error.log file at the last section after you are presented with the 403 error message in your browser.

Also exactly what are you typing in your browser that gives this error?

What file index is in your new DocumentRoot webroot folder (index.html index.php etc.)

For testing simply copy the index.html from the htdocs folder in the XAMPP installation folder to the webroot folder and then go to
http://localhost
or click on the Apache Admin button the control panel and you should see
It works!
(I have just replicated your changes in the httpd.conf file and tested this with no 403 error messages).

You may also like to clear your browser;s cache (Temporary Internet Files) from time to time when working at localhost level so you are always presented with a fresh file from the server and not a cached file.

Best wishes. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Problems with apache and localhost

Postby lvmma » 21. January 2012 19:06

thanks, it turned out to be some incorrect settings in another config file, the httpd.conf file was fine. thanks for another set of eyes!
lvmma
 
Posts: 4
Joined: 19. January 2012 21:52
Operating System: Windows 7

Re: Problems with apache and localhost

Postby Sharley » 22. January 2012 00:04

lvmma wrote:thanks, it turned out to be some incorrect settings in another config file, the httpd.conf file was fine. thanks for another set of eyes!
You're welcome but would you be so kind as to enlighten the forum what 'incorrect setting in an other config file' caused this 403 error so it might help others who are searching the forum for a similar solution or to help them avoid the situation in the first place.
Thanks. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Problems with apache and localhost

Postby lvmma » 23. January 2012 17:03

it was a bonehead move - i didn't have my app connecting to my local database, and it was triggering the error.
lvmma
 
Posts: 4
Joined: 19. January 2012 21:52
Operating System: Windows 7

Re: Problems with apache and localhost

Postby Sharley » 24. January 2012 00:41

Thanks for the feedback and I am pleased you can now move on. 8)

I will close this topic and mark it solved.

Please feel free to start a new topic if you encounter any more issues with XAMPP.

Best wishes. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 156 guests