Difference between revisions of "Proxy Adempiere Through Apache"

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
 
Line 27: Line 27:
 
  ProxyPass /wstore <nowiki>http://127.0.0.1:8081/wstore</nowiki>
 
  ProxyPass /wstore <nowiki>http://127.0.0.1:8081/wstore</nowiki>
 
  ProxyPassReverse /wstore <nowiki>http://127.0.0.1:8081/wstore</nowiki>
 
  ProxyPassReverse /wstore <nowiki>http://127.0.0.1:8081/wstore</nowiki>
 +
 +
If you want to expose the Web Store to an address other than wstore (e.g. root web site /), you also need to change the cookie path in order to login work:
 +
 +
ProxyPassReverseCookiePath /wstore /
  
 
You can also expose the admin interface
 
You can also expose the admin interface

Latest revision as of 06:49, 1 October 2012


As a security measure you must not expose directly Adempiere to the www.

A recommended set up to expose Adempiere webstore is through apache server.

Set up for Adempiere: - Install adempiere as adempiere user (not root) - That compels you to use a port different than 80 (i.e. 8081) - You could also use 127.0.0.1 as the IP address for this machine (not allowed in RUN_Setup, you need to edit AdempiereEnv.properties to do this)

Set up apache:

In httpd.conf (/etc/httpd/conf/httpd.conf in Fedora)

Enable modules for proxy (normally enabled by default):

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so

Then add the following lines to your httpd.conf:

SetEnv force-proxy-request-1.0 1

ProxyPass /wstore http://127.0.0.1:8081/wstore
ProxyPassReverse /wstore http://127.0.0.1:8081/wstore

If you want to expose the Web Store to an address other than wstore (e.g. root web site /), you also need to change the cookie path in order to login work:

ProxyPassReverseCookiePath /wstore /

You can also expose the admin interface

ProxyPass /admin http://127.0.0.1:8081/admin
ProxyPassReverse /admin http://127.0.0.1:8081/admin

Or simply expose the whole installation

ProxyPass / http://127.0.0.1:8081/
ProxyPassReverse / http://127.0.0.1:8081/

The port and the IP address can/must be changed if you used different IP/port for RUN_setup.sh