Custom error page 403

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

Custom error page 403

Postby marcelofares » 28. February 2016 00:21

Good night folks.

I have a problem.
I Have Xampp server for Windows, and have two active Web servers.

I wonder, how can I customize this error page 403. I'm not having trouble for accessing my server, just like to customize this error page 403, in order to remove some information that might compromise my structure, this can be a weapon for an hacker!

Image

Excuse my English, I am Brazilian.

My versions is :
XAMPP Version: 5.6.8
Xampp version: 1.7.7
marcelofares
 
Posts: 12
Joined: 28. February 2016 00:09
Operating System: Windows Server 2012

Re: Custom error page 403

Postby JJ_Tagy » 28. February 2016 01:51

In your xampp/apache/conf/extra/httpd-xampp.conf file, scroll all the way to the bottom. You should see the declaration for your 403 as "ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var". You can change to your custom html or modify the file at xampp/apache/error/.
JJ_Tagy
 
Posts: 678
Joined: 30. January 2012 13:44
Operating System: Windows 10 Pro x64

Re: Custom error page 403

Postby marcelofares » 28. February 2016 03:26

Thanks for the reply friend.
Frankly I am not experienced for that. I do not know edit the html file, I do not know what to enter. I just want to remove this error page. Can you help me ?
marcelofares
 
Posts: 12
Joined: 28. February 2016 00:09
Operating System: Windows Server 2012

Re: Custom error page 403

Postby JJ_Tagy » 28. February 2016 04:48

If you want it blank, replace the contents with:
Code: Select all
<html></html>
JJ_Tagy
 
Posts: 678
Joined: 30. January 2012 13:44
Operating System: Windows 10 Pro x64

Re: Custom error page 403

Postby marcelofares » 28. February 2016 12:59

JJ_Tagy wrote:If you want it blank, replace the contents with:
Code: Select all
<html></html>



Okay, but what the file that I have to edit to enter what you sent me above.
marcelofares
 
Posts: 12
Joined: 28. February 2016 00:09
Operating System: Windows Server 2012

Re: Custom error page 403

Postby JJ_Tagy » 28. February 2016 13:58

xampp/apache/error/XAMPP_FORBIDDEN.html.var
JJ_Tagy
 
Posts: 678
Joined: 30. January 2012 13:44
Operating System: Windows 10 Pro x64

Re: Custom error page 403

Postby marcelofares » 28. February 2016 14:37

JJ_Tagy wrote:xampp/apache/error/XAMPP_FORBIDDEN.html.var



you mean clean all content within this file (XAMPP_FORBIDDEN.html.var) and enter only this (<html> </ html>) ???

Image

This works not see
The only thing that changed was the error page, but the version of my Apache is appearing
Image
marcelofares
 
Posts: 12
Joined: 28. February 2016 00:09
Operating System: Windows Server 2012

Re: Custom error page 403

Postby JJ_Tagy » 28. February 2016 17:12

Yeah that file. Sorry forgot it was not straight html. Delete everything after body: between your language set marks.
JJ_Tagy
 
Posts: 678
Joined: 30. January 2012 13:44
Operating System: Windows 10 Pro x64

Re: Custom error page 403

Postby marcelofares » 28. February 2016 20:17

JJ_Tagy wrote:Yeah that file. Sorry forgot it was not straight html. Delete everything after body: between your language set marks.


Perfect my friend,
Now I got it. The page is completely blank, without any additional information :)

I have another doubt if possible.

I have a domain.ddns.net:8012/glpi
If you forget to enter / glpi, it is possible to automatically redirect to the page of glpi?

For example, if the user types domain.ddns.net:8012/glpi -------> it will access the page normally.

Now if he enter domain.ddns.net:8012/ --------> it will fall on the blank page that you helped me to remove the information about xampp.

My doubt is:

It is possible to redirect the user / glpi without typing the / glpi, only the port 8012 for this example?
marcelofares
 
Posts: 12
Joined: 28. February 2016 00:09
Operating System: Windows Server 2012

Re: Custom error page 403

Postby JJ_Tagy » 28. February 2016 20:47

JJ_Tagy
 
Posts: 678
Joined: 30. January 2012 13:44
Operating System: Windows 10 Pro x64

Re: Custom error page 403

Postby marcelofares » 01. March 2016 14:29

Friends, I have another problem.
My domain is correct (faresdomain.ddns.net:8013/glpi)

If I enter the wrong domonio for example:
faresdomain.ddns.net:8013/glpiiiiiiiiii

it appears another error page 404 with Info my apache.
Image

I ask, how can I remove these error information?
marcelofares
 
Posts: 12
Joined: 28. February 2016 00:09
Operating System: Windows Server 2012

Re: Custom error page 403

Postby JJ_Tagy » 01. March 2016 17:54

The error folder contains all those error pages. 404 means not found. Do the same thing for each error page you don't want shown.
JJ_Tagy
 
Posts: 678
Joined: 30. January 2012 13:44
Operating System: Windows 10 Pro x64

Re: Custom error page 403

Postby marcelofares » 01. March 2016 18:42

JJ_Tagy wrote:The error folder contains all those error pages. 404 means not found. Do the same thing for each error page you don't want shown.



You mean I have to insert this parameter (<html> </ html>) in all the error files in the / xampp \ apache \ error?
marcelofares
 
Posts: 12
Joined: 28. February 2016 00:09
Operating System: Windows Server 2012

Re: Custom error page 403

Postby JJ_Tagy » 01. March 2016 22:31

In any you wish to hide, yes.
JJ_Tagy
 
Posts: 678
Joined: 30. January 2012 13:44
Operating System: Windows 10 Pro x64

Re: Custom error page 403

Postby marcelofares » 01. March 2016 23:27

JJ_Tagy wrote:In any you wish to hide, yes.



To fix the error 403, I had to change the extension of the files below, see:

HTTP_XAMPP_FORBIDDEN.html.var to --- >>>> HTTP_XAMPP_FORBIDDEN.html
XAMPP_FORBIDDEN.html.var to ----- >>> XAMPP_FORBIDDEN.html

After changing the extension, I had to enter the folder apache / conf / extra and change the following line:
File -> httpd-xampp.conf
Modified line - ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var to ------> ErrorDocument 403 /error/XAMPP_FORBIDDEN.html

I had to do all this process, just to run your tip (<html> </ html>)

Now comes my question:
I need to change the extension of all files within this folder below?
C: \ xampp \ apache \ error
All files are as .html.var

You told me that I just have to add this (<html> </ html>) on all files within the error folder. So I ask, if I have to change the extension of the files within this folder (error for .hmtl), after all was the only way that worked only with me to correct the error 403.
marcelofares
 
Posts: 12
Joined: 28. February 2016 00:09
Operating System: Windows Server 2012

Next

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 47 guests