Hi.
I haven't work with Apache HTTP for years, and faced with one task, which little bit confused me.
We have Apache HTTP on front and Apache Tomcat - on back end.
Next, we have some domain, let's say "
Main application works under Tomcat via AJP in httpd:
Here is my current configuration:
What I'm trying to do:
if Apache get URL to - it must:
1) check if file exist on file system in %{DOCUMENT_ROOT}/test/1/somefile.js directory, if so - return it;
2) if file not found - return %{DOCUMENT_ROOT}/test/1/index.html;
All other requests (not - but all other "under" must be redirected to Tomcat.
Of course - my current setup doesn't work
I disabled Tomcat Proxy for now, and if I'm trying to open URL - I have 404, instead of file %{DOCUMENT_ROOT}/test/1/somefile.js or %{DOCUMENT_ROOT}/test/1/index.html.
Could anybody please help with this Apache HTTP configuration?
Thanks.
I haven't work with Apache HTTP for years, and faced with one task, which little bit confused me.
We have Apache HTTP on front and Apache Tomcat - on back end.
Next, we have some domain, let's say "
Main application works under Tomcat via AJP in httpd:
Code:
ProxyPass /cloudlibrary ajp://localhost:8009/cloudlibrary
ProxyPassReverse /cloudlibrary ajp://localhost:8009/cloudlibrary
Here is my current configuration:
Code:
...
DocumentRoot /var/[URL unfurl="true"]www/www.domain.com[/URL]
...
<VirtualHost *:443>
ServerName [URL unfurl="true"]www.domain.com[/URL]
DocumentRoot /var/[URL unfurl="true"]www/www.domain.com[/URL]
RedirectMatch ^/$ /cloudlibrary/
RewriteCond %{REQUEST_URI} /cloudlibrary/ui
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -f
RewriteRule ^.*cloudlibrary(.*) %{DOCUMENT_ROOT}/test/1/$1 [L]
RewriteCond %{REQUEST_URI} /cloudlibrary/ui
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteRule ^.*cloudlibrary(.*) %{DOCUMENT_ROOT}/test/1/index.html [L]
# Cloud Library
#ProxyPass /cloudlibrary ajp://localhost:8009/cloudlibrary
#ProxyPassReverse /cloudlibrary ajp://localhost:8009/cloudlibrary
<Location /cloudlibrary>
Header set Access-Control-Allow-Origin "*"
Require all granted
</Location>
What I'm trying to do:
if Apache get URL to - it must:
1) check if file exist on file system in %{DOCUMENT_ROOT}/test/1/somefile.js directory, if so - return it;
2) if file not found - return %{DOCUMENT_ROOT}/test/1/index.html;
All other requests (not - but all other "under" must be redirected to Tomcat.
Of course - my current setup doesn't work
I disabled Tomcat Proxy for now, and if I'm trying to open URL - I have 404, instead of file %{DOCUMENT_ROOT}/test/1/somefile.js or %{DOCUMENT_ROOT}/test/1/index.html.
Could anybody please help with this Apache HTTP configuration?
Thanks.