WebServer‎ > ‎

Apache Config Issues

Apache HTTP server configuration issues, extra folder issues in new versions added here to resolve your admin issues
The following issues are encountered while first time starting a Apache instance, Here I am jotting out those issues and their simple workarounds. You can also comments or suggestions about this   Apache configuration Issues page.

Apache Configuration 404 Page Not found ERROR 

Critical issue we have recently come across with HTTP server configuration issue. Let me tell you how it is, We are using a DNS service, there it is loadbalancing to Apache1 and Apache2. The Apache configured with mod_wl.so file Apache version is 2.2.22. Initially i thought that there could be the proxy plug-in version could be the issue so changed that mod_wl.so to mod_wl_20.so and tried but the error persists.

This Apache Proxying to 4 WebLogic servers running in a cluster. As expected the Apache web server has to poll to available backend servers and then it send the request. If any one of the managed server is in SHUTDOWN state then it should automatically send the requests to another alive server at the backend. But here, in our case If one of the managed server is down, we access the page we are getting 404 page error.

We found the workarounds suggested in Oracle proxy plugin configuration as:
1. KeepAlive ON
2. DynamicServerList ON

What else I need to set to achieve the success hit to the jsp? The error still persisting. This is where you need to your intelligence !! de-coding the problem into smaller and identify where is actual issue. 
Verified the following 
* Is all Apache URLs hitting the expected webpage or not?
* Is all WebLogic managed Servers serving the webpage or not?

Here is the blunder we found that the Web application is deployed to 2 managed servers only, remaining two servers are not serving the application at all, whereas Apache doesn't know this and sending the requests to those managed servers where they are in capable of serving. Changed the WebLogic side deployment target to Cluster and it is this 404 Error got resolved. 
 
Assuming you have already installed the Apache at $APACHE_HOME.
1. httpd: could not open document config file /$APACHE_HOME/conf/myainst/httpd.conf
WA:
In your apache installation path apache/bin improper pointing to httpd.conf file give this error.

2. Syntax error on line 234 of $APACHE_HOME/conf/myainst/httpd.conf:
Cannot load $APACHE_HOME/modules/mod_wl_20.so into server: $APACHE_HOME/modules/mod_wl_20.so: cannot open shared object file: No such file or directory
WA:
If the mod_wl_20.so is not present in the modules folder it will gives you this error. copy to this location appropriate module .so file.

Amazon.com Widgets
3. Syntax error on line 327 of $APACHE_HOME/conf/myainst/httpd.conf:

DocumentRoot must be a directory
WA:
Check the DocumentRoot defined in the httpd.conf file:
grep -i documentroot $APACHE_HOME/instancepath/httpd.conf
Now, make sure that the directory exist, if not create it
mkdir -p /$APACHE_HOME/htdocs/path
In some cases you need to create softlinks to WebLogic refering code.

4. (2)No such file or directory: httpd: could not open error log file $APACHE_HOME/logs/myainst/myainst_error_log.
Unable to open logs

WA:
Make sure that specified log directories exist for the error logs generation. In the same log path this Apache instance access log also generated.
mkdir -p $APACHE_HOME/logs/myainst

To double confirm you configuration is perfect you can do apachectl copy for instance with -l option gives you all load module details. The -t option is gives you Syntax having any errors or not. After successful start of Apache webserver doesn't display anything on screen. So better to confirm with process list. ps -fu user gives you that confirmation.

Ref Links:
Installation configuration Apache Installation Configuaration
Plug-ins WebServer Plugins
Restricting Access from Httpd.conf  http://wlatricksntips.blogspot.com/2010/06/restricting-access-from-apache-http.html


www.onlinedegreeadvantage.com

Comments