logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Error 404 -- Not Found (Oracle web logic) Page 1, 2  Next
Author
Michael T



Joined: 28 Feb 2011
Posts: 39

PostPosted: Wed 08 Jun '11 12:36    Post subject: Error 404 -- Not Found (Oracle web logic) Reply with quote

I am trying to configure Apache to use a local web page Missing.html if the back end application server is unavailable for any reason. I have stopped my application and deployed the Missing.html file to the D:\Program Files\Apache Software Foundation\Apache2.2 folder but I still get the message below.

Error 404--Not Found
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.

If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.



Here is the entry in the httpd.conf file.

#
# 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 /error/Missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://fcdbtest.banif.co.uk/subscription_info.html
#

What have I done wrong, any help much appreciated.

Many thanks
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Wed 08 Jun '11 12:59    Post subject: Reply with quote

Your url shows a an "error" directory.

So the Missing file must be in htdocs. if htdocs is your documentroot

Code:
D:\Program Files\Apache Software Foundation\Apache2.2\htdocs\error\Missing.html



Even displaying the content from Missing.html the server still will send a 404.

How did you configure apache to the applicatin server? Reverse proxy?
Back to top
Michael T



Joined: 28 Feb 2011
Posts: 39

PostPosted: Wed 08 Jun '11 13:08    Post subject: Reply with quote

I have moved the Missing.html to the folder you mentioned but still the same error. WE are suing oracle web logic so we suer the weblogic LoadModule .

How d I know where the document root is pointing to, I am a novice at this.
Back to top
Michael T



Joined: 28 Feb 2011
Posts: 39

PostPosted: Wed 08 Jun '11 13:14    Post subject: Reply with quote

Sorry ignore documentroot question, found it.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Wed 08 Jun '11 13:33    Post subject: Reply with quote

Michael T wrote:
WE are suing oracle web logic so we suer the weblogic LoadModule .


I guess your config is like

Code:

LoadModule weblogic_module     modules/mod_wl_22.so


Having your code fragment from httpd.conf would help to understand that issue.

However in the RTFM for Parameters for Web Server Plug-Ins There is a parameter ErrorPage. I think that is what you might search.

e.g.
Code:

<IfModule mod_weblogic.c>
ErrorPage  /error/Missing.html
</IfModule>


If you still have any question please ask again
Back to top
Michael T



Joined: 28 Feb 2011
Posts: 39

PostPosted: Wed 08 Jun '11 13:56    Post subject: Reply with quote

Ah seem to be getting somewhere now though I cant seem to find where the missing file should go, in httdocs or elsewhere.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Wed 08 Jun '11 16:17    Post subject: Reply with quote

James Blond wrote:
if htdocs is your documentroot

Code:
D:\Program Files\Apache Software Foundation\Apache2.2\htdocs\error\Missing.html

Back to top
Michael T



Joined: 28 Feb 2011
Posts: 39

PostPosted: Wed 08 Jun '11 17:07    Post subject: Reply with quote

Thanks very much, still not working but I think it is looking on the weblogic server not local so have logged issue with Oracle.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Wed 08 Jun '11 17:20    Post subject: Reply with quote

Just for my curiosity. Does the weblog server run like a "normal" tomcat on port 8080 and serves jsp files?
Back to top
Michael T



Joined: 28 Feb 2011
Posts: 39

PostPosted: Thu 09 Jun '11 15:32    Post subject: Reply with quote

It is a middleware application server and sits between apache and the database. It serves web ages as well as housing the application business logic. We run on ports 7001 for mgt server and 7010 and 7020 for the application clusters.
Back to top
Michael T



Joined: 28 Feb 2011
Posts: 39

PostPosted: Thu 09 Jun '11 17:22    Post subject: Reply with quote

This is the reply from Oracle.

To configure the Apache server to look locally for the local html error page (Missing.html) so that if Weblogic is unavailable the Apache server will show Missing.html file stating the service is unavailable, you need to:

1.Make sure that Missing.html is located in the Apache DocumentRoot directory.
2.Confirm that Missing.html is accessible using http://hostname:port/Missing.html
3.Configure the Apache plugin as following:
Code:

<IfModule mod_weblogic.c>
SetHandler weblogic-handler
WebLogicCluster 10.100.18.32:7010,10.100.18.32:7011
MatchExpression /B001/ENULogin.jsp,/B001//INALogin.jsp,/F001//INALogin.html
SecureProxy OFF
Debug ALL
WLLogFile "D:/Program Files/Apache Software Foundation/Apache2.2/logs/wlproxy.log"
ErrorPage http://hostname:port/Missing.html
</IfModule>

> Please note that you should use:

ErrorPage http://hostname:port/Missing.html

instead of:

ErrorPage /Missing.html

However I am unable to access the Missing.html document either locally on the apache server or remotely so I guess I need to change something but what? Below is the httpd.conf file do I need to change anything here?

Code:

ServerRoot "D:/Program Files/Apache Software Foundation/Apache2.2"
Listen 10.28.205.96:80

LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule setenvif_module modules/mod_setenvif.so
 LoadModule weblogic_module modules/mod_wl128_22.so

ServerAdmin it@banif.co.uk
ServerName 10.28.205.96:80

DocumentRoot "D:/Program Files/Apache Software Foundation/Apache2.2/htdocs"

<Directory "D:/Program Files/Apache Software Foundation/Apache2.2/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all

</Directory>

<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

<IfModule mod_weblogic.c>
   Include conf/extra/weblogic.conf
</IfModule>

<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</FilesMatch>
ErrorLog "logs/error.log"
LogLevel warn


Modnote: shorted httpd.conf Wink
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Thu 09 Jun '11 17:42    Post subject: Reply with quote

I think you alread putted the Missing.html into htdocs\error\ don't you?

So the config would be
Code:

ErrorPage http://10.28.205.96:80 /error/Missing.html

Before try that link in your browser Wink


Hope that helps. By the way: I see that you don't use mod_deflate. if you would do it will reduce the traffic in the network and speed a bit up.
Back to top
Michael T



Joined: 28 Feb 2011
Posts: 39

PostPosted: Thu 09 Jun '11 17:48    Post subject: Reply with quote

I have it in document root and /error folder but neither are accessible from the local server or remote PC.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Thu 09 Jun '11 17:58    Post subject: Reply with quote

What is the error message in your browser? What is the error about this in your apache error log and access log?
Back to top
Michael T



Joined: 28 Feb 2011
Posts: 39

PostPosted: Thu 09 Jun '11 18:00    Post subject: Reply with quote

Access Log

10.28.205.96 - - [09/Jun/2011:16:34:15 +0100] "GET /Missing.htm HTTP/1.1" 404 1214

Error Log no entries and in the browser I get the following

Error 404--Not Found
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.

If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.
Back to top
Michael T



Joined: 28 Feb 2011
Posts: 39

PostPosted: Mon 13 Jun '11 12:54    Post subject: Reply with quote

I still cannot get this to work. I am unable just to get the Missing.html document to come up so I guess the apache is not serving documents only from the weblogic server.
Back to top
Michael T



Joined: 28 Feb 2011
Posts: 39

PostPosted: Mon 13 Jun '11 14:35    Post subject: Reply with quote

I can only access the Missing.html file if I comment out the

<IfModule mod_weblogic.c>
Include conf/extra/weblogic.conf
</IfModule>

Sections, so I guess I need to put something in the welogic.conf file, back to Oracle.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Thu 16 Jun '11 22:37    Post subject: Reply with quote

I've tried a bit, I was able to make a reverse proxy to a weblogic server without mod_weblogic, but mod_proxy_ajp. I don't know if there is some magic from mod_proxy_html needed for you. BUT if you are able to run the reverse proxy with apaches own modules you can define that error pages with the normal apache behaviour.

I'm not into the mod_weblogic so I don't know if there is something special you need that mod_proxy_* can't provide.
Back to top
Michael T



Joined: 28 Feb 2011
Posts: 39

PostPosted: Fri 17 Jun '11 10:20    Post subject: Reply with quote

The fix was a change to the way weblogic module was configured just in case anyone has similar issue I have posted the weblogic.conf file below.

<IfModule mod_weblogic.c>
<LocationMatch /(B|F)001>
SetHandler weblogic-handler
WebLogicCluster 10.100.18.32:7010,10.100.18.32:7011
SecureProxy OFF
Debug ALL
WLLogFile "D:/Program Files/Apache Software Foundation/Apache2.2/logs/wlproxy.log"
ErrorPage http://10.28.205.96/Missing.html
</LocationMatch>
Back to top
mahe1



Joined: 01 Mar 2012
Posts: 2

PostPosted: Thu 01 Mar '12 8:28    Post subject: Error page implementation not working Reply with quote

Hi michael,

I have modified my httd.conf file as you mentioned. But still am unable to get the error page. Have pasted my virtual host conf below. my error page is located in htdocs folder and am able to access through browser.

<Location ~ /BMP>
SetHandler weblogic-handler
WebLogicCluster 10.28.1.10:61001,10.28.1.11:61002,10.28.1.12:61003
Debug ON
WLLogFile /software/bea/apache/2.2.14/logs/wl_proxy_managed.log
WLTempDir /software/bea/apache/2.2.14/logs
ErrorPage http://10.36.1.9/BMPError.html
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript
</Location>


below is the access logs:

[01/Mar/2012:05:58:20 +0000] "GET /BMP_Home HTTP/1.1" 404 697


Does the ErrorPage option will redirect for 404 or only 503? Please reply me ASAP..
Back to top


Reply to topic   Topic: Error 404 -- Not Found (Oracle web logic) View previous topic :: View next topic
Post new topic   Forum Index -> Apache Page 1, 2  Next