Page 1 of 2

Custom error page 403

PostPosted: 28. February 2016 00:21
by marcelofares
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

Re: Custom error page 403

PostPosted: 28. February 2016 01:51
by JJ_Tagy
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/.

Re: Custom error page 403

PostPosted: 28. February 2016 03:26
by marcelofares
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 ?

Re: Custom error page 403

PostPosted: 28. February 2016 04:48
by JJ_Tagy
If you want it blank, replace the contents with:
Code: Select all
<html></html>

Re: Custom error page 403

PostPosted: 28. February 2016 12:59
by marcelofares
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.

Re: Custom error page 403

PostPosted: 28. February 2016 13:58
by JJ_Tagy
xampp/apache/error/XAMPP_FORBIDDEN.html.var

Re: Custom error page 403

PostPosted: 28. February 2016 14:37
by marcelofares
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

Re: Custom error page 403

PostPosted: 28. February 2016 17:12
by JJ_Tagy
Yeah that file. Sorry forgot it was not straight html. Delete everything after body: between your language set marks.

Re: Custom error page 403

PostPosted: 28. February 2016 20:17
by marcelofares
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?

Re: Custom error page 403

PostPosted: 28. February 2016 20:47
by JJ_Tagy

Re: Custom error page 403

PostPosted: 01. March 2016 14:29
by marcelofares
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?

Re: Custom error page 403

PostPosted: 01. March 2016 17:54
by JJ_Tagy
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.

Re: Custom error page 403

PostPosted: 01. March 2016 18:42
by marcelofares
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?

Re: Custom error page 403

PostPosted: 01. March 2016 22:31
by JJ_Tagy
In any you wish to hide, yes.

Re: Custom error page 403

PostPosted: 01. March 2016 23:27
by marcelofares
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.