Xampp Control Panel Apache Admin button gives 403 error

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

Xampp Control Panel Apache Admin button gives 403 error

Postby KeefyW » 22. October 2020 16:29

Hi. I'm a complete newbie here so please be patient with me. I have been using xampp for about 9 months. Have had various problems but always managed to solve them with a bit of research. Haven't managed to solve this one though. I've spent days on it !

When I click the Admin button for Apache in the control panel it just puts "localhost" in the browser address bar and I get:

Access forbidden!
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
If you think this is a server error, please contact the webmaster.
Error 403
localhost
Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.4.2

When I type 'localhost/dashboard' (no https://) it redirects itself quite happily to https://localhost/dashboard and all is well.
If I type in simply 'localhost' I get the home page of my website, again redirecting to https...

However if I type in http://(whatever) I get the 403 page with no redirect. After this typing 'localhost' gives 403. No https redirect now unless I open a new window. It behaves the same in Edge, IE11 and Firefox 82.0.

The mySQL Admin button works just fine taking me straight to 'https://localhost/phpmyadmin/' . No problem.

I guess what I am asking is: where is the address linked to the Apache Admin button ? Can I modify it ? Why doesn't it automatically redirect to https ? So that's three questions :D

Apache ports are 80 (IIS disabled so works fine) and 443 for ssl. mySQL port 3306. Not using FileZilla, Mercury or Tomcat
KeefyW
 
Posts: 2
Joined: 22. October 2020 16:03
Location: West Sussex, UK
XAMPP version: 2.4.41 64 bit
Operating System: win10pro 2004 19041.572

Re: Xampp Control Panel Apache Admin button gives 403 error

Postby Altrea » 22. October 2020 17:22

Hi,

KeefyW wrote:When I type 'localhost/dashboard' (no https://) it redirects itself quite happily to https://localhost/dashboard and all is well.

Which is still not the default behavior. Did you configured anything to force HTTPS?

KeefyW wrote:If I type in simply 'localhost' I get the home page of my website, again redirecting to https...

Did you replace the default htdocs/index.php file or changed the DocumentRoot or defined any virtuslhosts?

KeefyW wrote:where is the address linked to the Apache Admin button ?

It is hardcoded in the control panel code and will build the url always be http://localhost + followed by a port number if you defined a different http default port

KeefyW wrote:Can I modify it ?

You would need to change it in the source code and recompile it with help of the Delphi compiler...
So technically yes, but i don't know if this is worth the time.

KeefyW wrote:Why doesn't it automatically redirect to https ?

Because XAMPP does not use https in any of the applications. Even phpmyadmin is configured to word on http.
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: Xampp Control Panel Apache Admin button gives 403 error

Postby KeefyW » 22. October 2020 17:46

Hi Altrea. Thanks for such a speedy reply. In order:
Yes I did do something 9 months ago to force HTTPS when I installed xampp. I looked at so many posts on so many forums I can't remember exactly what I did. I never managed to successfully create a valid certificate though.
I don't know what happened to the default index.php file. I have an index.html file now so perhaps I deleted. DocumentRoot unchanged from htdocs, if that is what you mean. No virtualhosts.
Next two issues - I might try Delphi but I am not really a coder in modern terms so that would be a steep learning curve. And you are right. Probably not worth the time
Strange how localhost/phpmyadmin works just fine, re-directing to https from the control panel button. Bye for now - Keith
KeefyW
 
Posts: 2
Joined: 22. October 2020 16:03
Location: West Sussex, UK
XAMPP version: 2.4.41 64 bit
Operating System: win10pro 2004 19041.572


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 248 guests