Search found 6 matches: custom error messages

Searched query: +custom +error +messages

Return to advanced search

Re: Setting a custom JRE for Tomcat

Sorry I could not be more directly helpful.

Try this by using:
Code: Select all
if defined JAVA_HOME set JAVA_HOME=
leave blank.
(because you have the System variable set then try leaving both those entries blank ie "" and see if that helps)

from this post:
http://www.coderanch.com/forums/posts/list/87999

From this topic:
http://www.coderanch.com/t/87999/Tomcat ... env-values

From these search results of which you may not feel so alone after reading them - sorry, I ran out of time but you may have more time and be able to understand better these search results.

There was also another tip I found (not tested) that may return some message about the issue by adding:
Code: Select all
echo %errorlevel%
before and after that set JAVA_HOME= line
Perhaps here should also be an echo off line also somewhere after you have finished with the error messages.

Good luck.
by Izzy
03. October 2009 01:27
 
Forum: XAMPP for Windows
Topic: Setting a custom JRE for Tomcat
Replies: 31
Views: 56411

Re: Custom Error Documents - Need Some Help.

This topic might contain some useful assistance with this custom error messages (keywords) issue and perhaps your other security concerns.
viewtopic.php?t=19348

This forum search using Izzy in the Search for author: field and the above keywords may have more info for you to seed ideas perhaps.
by Izzy
10. January 2009 23:28
 
Forum: XAMPP for Windows
Topic: Custom Error Documents - Need Some Help.
Replies: 6
Views: 6853

You could try this:
Close all XAMPP services and make sure they have uninstalled as a service by checking with the Task Manager that there are no instances of any XAMPP components running.

Try now and return all you config changes back to the defaults from the backups you made before making those changes except for the paths you set.

When you are satisfied that none of the XAMPP services are running execute xampp\xampp-portcheck.exe and make sure that all ports are Free

If all ports are free you can now try and start apache using the xampp\apache_start.bat and paste here if you get any error messages.

Also worth noting here is did you follow the installation instruction relating to running the xampp\setup_xampp.bat if your installation was not in the default location? This would set the paths for you and all you would need to do is check that the paths were indeed correctly changed by the bat file in your conf files.

Sometimes when things have messed up on your first installation attempt it is worth uninstalling and deleting completely the XAMPP directory and then rebooting and installing again and follow the instructions once more and see if this approach works. Better doing this at the start before you have added too many custom additions and changes.
by Izzy
01. December 2006 00:18
 
Forum: XAMPP for Windows
Topic: Apache service hangs on startup - DocumentRoot
Replies: 4
Views: 8713

GetFree wrote:Now that I hid the .php from my public URLs, I want to send a 404 for every request to a .php file.

So I did the following:

RedirectMatch 404 \.php$

which works fine.

But the error page is the default apache error.
I want to show a custom error page, so I tried the following:

RedirectMatch 404 \.php$ /error.html

But it didn't work.

I dont know whether that directive will serve to do what I want.


In your httpd.conf file you commented out the link to the custom error pages in the extra directory from an earlier post, I believe.

So add this to your .htaccess file after creating and naming your custom error page (the name of the file is your choice, I used 404.htm as an example):
ErrorDocument 404 /404.htm
Put the page in the same place as the .htaccess file if using the above path or you can use a full path to where ever you want to put the error page. You can even use http://blah/blah/404.html etc.

You can customize other error pages for example:
ErrorDocument 403 /403.html
ErrorDocument 500 /500.html
ErrorDocument 405 /405.htm

You can even use SSI to add environment variables to spruce up the error page with what appears as very knowledgable messages like these for example:
Code: Select all
You were referred from this page:    <!--#echo var="HTTP_REFERER" -->
Your IP address shows as:    <!--#echo var="REMOTE_ADDR" -->
Your web browser says it is:    <!--#echo var="HTTP_USER_AGENT" -->
You requested this page (error):    http://<!--#echo var="HTTP_HOST" --><!--#echo var="REQUEST_URI" -->
The HTTP Status (error) Code is:    <!--#echo var="REDIRECT_STATUS" -->

Remember to use the .shtml file extension so Apache knows what it is.

I don't know if this will affect the same issue you had when we commented out the httpd-multilang-errordoc.conf or if you are still using that mod_rewrite rule or not.

This custom error can also be change on a global basis from within the httpd.conf file using this block of entries:
Code: Select all
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
by Izzy
20. October 2006 08:17
 
Forum: XAMPP for Windows
Topic: .htaccess are not working
Replies: 22
Views: 31958

ServerSignature Off
won't work on custom error pages which is what you have in the default XAMPP installation.

This from \extra\httpd-default.conf
#
# Optionally add a line containing the server version and virtual host
# name to server-generated pages (internal error documents, FTP directory
# listings, mod_status and mod_info output etc., but not CGI generated
# documents or custom error documents).
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
# Set to one of: On | Off | EMail
#
ServerSignature On


The error messages are contained within xampp\apache\error directory and are in various languages.

You can turn custom error messages off in the httpd.conf file by commenting out this line:
# Multi-language error messages
Include conf/extra/httpd-multilang-errordoc.conf

To:
# Multi-language error messages
# Include conf/extra/httpd-multilang-errordoc.conf

or comment out the entries in the conf file it refers to.

You should now be able to control the Apache default error messages using your .htaccess file although I have not tested your .htaccess file to see if it all works.
by Izzy
18. October 2006 07:03
 
Forum: XAMPP for Windows
Topic: .htaccess are not working
Replies: 22
Views: 31958

Read this in the xampp\apache\conf\httpd.conf to get some ideas.

Code: Select all
#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#


Remember that any changes made in the above file will be over ridden by the file below. You would need to comment out this line if you did changes in the above file so the below file was not included:
# Multi-language error messages
Include conf/extra/httpd-multilang-errordoc.conf


to this:
# Multi-language error messages
# Include conf/extra/httpd-multilang-errordoc.conf


Also if you comment out the above line and restart apache then go to a page you know will give you a 404 not found error you will see an apache default file minus the header and footer info. This may be enough to do what you want. I have not tested this on 1.5.3a, only on an earlier version that does not use those extra conf files.

Read this in xampp\apache\conf\extra\httpd-multilang-errordoc.conf
Code: Select all
#
# The configuration below implements multi-language error documents through
# content-negotiation.
#
# Required modules: mod_alias, mod_include, mod_negotiation
#
# We use Alias to redirect any /error/HTTP_<error>.html.var response to
# our collection of by-error message multi-language collections.  We use
# includes to substitute the appropriate text.
#
# You can modify the messages' appearance without changing any of the
# default HTTP_<error>.html.var files by adding the line:
#
#   Alias /error/include/ "/your/include/path/"
#
# which allows you to create your own set of files by starting with the
# /xampp/apache/error/include/ files and copying them to /your/include/path/,
# even on a per-VirtualHost basis.  The default include files will display
# your Apache version number and your ServerAdmin email address regardless
# of the setting of ServerSignature.


Personally I prefer the included xampp error messages as they look more custom designed and give a bit more info than the millions of standard default apache error messages out there. You can customise these files also with ease if you know html.

I have created custom error messages for my Linux sites hosted in a DC out in the states as I like them to reflect the over all appearance of my web sites which include links back to the Home Page so visitors are not left stranded on an error page.

It is possible to create your custom error pages and include the info and path in your root web directory using a .htaccess file which will over ride the httpd.conf files on a site by site basis. This is what I use on my Linux boxes. It is very similar to the commented out error directives in the first httpd.conf code box above:
ErrorDocument 404 /path to your custom 404 error file/404.html

There may be other ways that I am not aware of but may be forthcoming by other readers of this thread.

Good Luck with it and how did you go with your reload httpd.conf issue. :)
by Izzy
28. July 2006 07:56
 
Forum: XAMPP for Windows
Topic: show default apache errors (404)
Replies: 3
Views: 12791

Return to advanced search