Nuclos reverse proxy: Apache, AJP, ProxyPass, mod_proxy_ajp, VirtualHost, HTTPS, web client, rich client. |
Language: Deutsch · English
Run Nuclos behind an Apache reverse proxy – AJP connector and vhost configuration for rich and web client.
Auf dieser Seite |
Tomcat can run behind an Apache reverse proxy – e.g. when Nuclos should be served over HTTPS but port 443 is already taken.
The AJP connector must be enabled. Since Nuclos 4.8.0 this is done directly in the installer (step „Server configuration“) – no manual Tomcat change needed.
The AJP protocol is mandatory, otherwise the access path to the Nuclos instance is not mapped correctly. |
Create a vhost and adjust the domain:
<VirtualHost *:80>
ServerName nuclet.nuclos.de
ServerAlias nuclet.nuclos.de
Redirect 301 / https://nuclet.nuclos.de/
</VirtualHost>
<VirtualHost *:443>
ServerName nuclet.nuclos.de
ServerAlias nuclet.nuclos.de
ProxyRequests Off
SSLEngine on
SSLCertificateKeyFile /etc/apache2/ssl/nuclet.nuclos.de/nuclet.nuclos.de.key
SSLCertificateFile /etc/apache2/ssl/nuclet.nuclos.de/nuclet.nuclos.de.crt
SSLCertificateChainFile /etc/apache2/ssl/nuclet.nuclos.de/Intermediate_CA_Bundle.crt
ErrorDocument 503 "/var/www/maintance.html"
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost> |
Enable the module and restart Apache:
a2enmod proxy_ajp service apache2 restart |
<VirtualHost *:80>
ServerName www.example.org
ServerAlias www.example.org
Redirect 301 / https://www.example.org
</VirtualHost>
<VirtualHost *:443>
ServerName www.example.org
ServerAlias www.example.org
ProxyRequests Off
SSLEngine on
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
ErrorDocument 503 "/var/www/maintance.html"
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /nuclos-instanzname ajp://localhost:8010/nuclos-instanzname
ProxyPassReverse /nuclos-instanzname ajp://localhost:8010/nuclos-instanzname
ProxyPass / ajp://localhost:8010/webclient/
ProxyPassReverse / ajp://localhost:8010/webclient/
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost> |