classes:confluence_reverse_proxy_nginx
Install Nginx:
sudo apt-get install nginx
Backup default
configuration:
sudo mv /etc/nginx/sites-available/default /etc/nginx/sites-available/default-DIST sudo vi /etc/nginx/sites-available/default
Edit /etc/nginx/sites-enabled/default
to include:
server { listen kvm1:80; server_name kvm1; 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://localhost:8090; } }
Restart Nginx:
sudo service nginx restart
Edit atlassian-confluence-5.7.5/conf/server.xml
:
sudo vi /opt/atlassian/confluence/atlassian-confluence-5.7.5/conf/server.xml
Include the proxyName
line in the Connector
section:
<Connector port="8090" connectionTimeout="20000" redirectPort="8443" maxThreads="200" minSpareThreads="10" enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8" proxyName="kvm1" proxyPort="80" />
Restart Confluence:
sudo /opt/atlassian/confluence/atlassian-confluence-5.7.5/bin/stop-confluence.sh sudo /opt/atlassian/confluence/atlassian-confluence-5.7.5/bin/start-confluence.sh
Test your results: http://kvm1/
Resources
classes/confluence_reverse_proxy_nginx.txt · Last modified: 2018/01/09 19:55 by curry_searle