Gebruikershulpmiddelen

Site-hulpmiddelen


reverse_proxy_openerp

Apache reverse proxy met OpenERP 6.1

Debian/Ubuntu:

Eerst modules voor Apache activeren:

a2enmod ssl proxy_http headers rewrite 

/etc/apache2/sites-available/default:

<VirtualHost *:80>
        #ServerName webclient
        ServerAdmin webmaster@localhost

<Proxy *>
                Order deny,allow
                Allow from all
</Proxy>
        ProxyRequests Off
        ProxyPass / http://127.0.0.1:8069/
        ProxyPassReverse / http://127.0.0.1:8069/

    # Fix IE problem (http error 408/409)
    SetEnv proxy-nokeepalive 1
        ErrorLog /var/log/apache2/webclient-error.log
        CustomLog /var/log/apache2/webclient-access.log combined
</VirtualHost>

Reload config:

service apache2 restart

SSL:

/etc/apache2/sites-available/default:

<VirtualHost *:80>
        #ServerName webclient
        ServerAdmin webmaster@localhost
	Redirect / "https://mydomain/"
</VirtualHost>

/etc/apache2/sites-available/default-ssl:

<VirtualHost *:443>
        #ServerName webclient
        ServerAdmin webmaster@localhost

<Proxy *>
                Order deny,allow
                Allow from all
</Proxy>
        ProxyRequests Off
        ProxyPass / http://127.0.0.1:8069/
        ProxyPassReverse / http://127.0.0.1:8069/

	# Fix IE problem (http error 408/409)
	SetEnv proxy-nokeepalive 1
	RequestHeader set "X-Forwarded-Proto" "https"

        ErrorLog /var/log/apache2/webclient-error.log
        CustomLog /var/log/apache2/webclient-access.log combined

        SSLEngine on
	SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
	SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
</VirtualHost>

Reload config:

a2ensite default-ssl
service apache2 restart
reverse_proxy_openerp.txt · Laatst gewijzigd: 2016/01/06 10:05 (Externe bewerking)