I have been trying to implement a virtual host/rewrite so that one of my ApEx applications can be accessed externally.
My ApEx application is served from a 10.1.0.3 database running on Windows Server 2003.
I modified the httpd.conf file located in the HTTP_HOME (e:/oracle/product/10.1.0/http_home/apache/apache/conf/httpd.conf) directory by adding the following lines:
NameVirtualHost *
<VirtualHost *>
ServerName ecydblcyorwq04
ServerAlias wplcsreports
ErrorLog /logs/error_log
CustomLog /logs/custom_log combined
RewriteEngine On
RewriteRule ^/$ /pls/apex/f?p=128:1 [R]
</VirtualHost>
I then restarted the HTTP Server using
HTTP_HOME/opmn/bin/opmnctl restartproc ias_component=HTTP_Server
This caused the following error to appear in the opmn logs:
Syntax error on line 1099 of e:/oracle/product/10.1.0/http_home/apache/apache/conf/httpd.conf:
Invalid command 'RewriteEngine', perhaps mis-spelled or defined by a module not included in the server configuration
I looked the http.conf file and found:
# Include the mod_oc4j configuration file
include "E:\oracle\product\10.1.0\Http_home\Apache\Apache\conf\mod_oc4j.conf"
# Include the mod_dms configuration file
include "E:\oracle\product\10.1.0\Http_home\Apache\Apache\conf\dms.conf"
# Loading rewrite_module here so it loads before mod_oc4j
LoadModule rewrite_module modules/ApacheModuleRewrite.dll
Two things about these entries:
1. The rewrite_module is after the mod_oc4j.conf despite "loads before mod_oc4j"
2. The LoadModule rewrite_module comes after the VirtualHost definition
Do I need to change the order of operations in order for this to work, or am I missing something else altogether?
Thanks, Tony