First install nginx like stated here.
- sudo apt-get install nginx
- sudo service nginx start
server {
listen 80;
server_name hostname.org;
location / {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8080/;
}
}
These two blogs do not mention the fact you'll have to tell tomcat you're using a proxy. So in [tomcat-home]/conf/server.xml make sure the Connector has a proxyName and proxyPort.
- <Connector port="8080" protocol="HTTP/1.1" proxyPort="80" proxyName="hostname.org" ..... />
- company.default.home.url=/web/guest/home
Geen opmerkingen:
Een reactie posten