Last active
April 27, 2023 10:47
-
-
Save mortenbra/faf34058914947487d1c to your computer and use it in GitHub Desktop.
Apache custom configuration for Apex, ORDS and Tomcat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# customized Apache configuration | |
# add this to the end of /etc/httpd/conf/httpd.conf | |
# or put it in a separate file such as /etc/httpd/conf.d/apex.conf | |
# disable sensitive version info | |
ServerSignature Off | |
ServerTokens Prod | |
# standard alias for Apex image files | |
Alias /i/ "/var/www/apex/images/" | |
# forward dynamic (ORDS) requests to Tomcat | |
<VirtualHost *:80> | |
ProxyRequests Off | |
ProxyPreserveHost On | |
<Proxy *> | |
Order deny,allow | |
Allow from all | |
</Proxy> | |
ProxyPass /ords ajp://localhost:8009/ords | |
ProxyPassReverse /ords ajp://localhost:8009/ords | |
</VirtualHost> | |
# enable compression of static content | |
<IfModule mod_deflate.c> | |
SetOutputFilter DEFLATE | |
AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css text/javascript | |
</IfModule> | |
# enable client caching of static content | |
<IfModule mod_expires.c> | |
ExpiresActive On | |
ExpiresByType image/gif "access plus 7 days" | |
ExpiresByType image/jpeg "access plus 7 days" | |
ExpiresByType image/png "access plus 7 days" | |
ExpiresByType text/css "access plus 7 days" | |
ExpiresByType text/javascript "access plus 7 days" | |
ExpiresByType application/javascript "access plus 7 days" | |
ExpiresByType application/x-javascript "access plus 7 days" | |
</IfModule> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Mine tweak was donw with location /ords/ and here goes:
Big chunk of it was taken from here: https://tedstruik-oracle.nl/ords/f?p=25384:1095::::::
Thanks