Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Setting up proxy for geoserver with nginx
Tested on nginx version 1.1.9, ubuntu 12.04
-Command lines in order:
sudo touch /etc/nginx/site-availables/geoserver.conf
sudo vi /etc/nginx/site-availables/geoserver.conf
sudo ln -s /etc/nginx/site-availables/geoserver.conf /etc/nginx/site-enabled/geoserver.conf
sudo service nginx start
Content of geoserver.conf
server {
listen 80;
server_name 192.168.243.138;
root /usr/share/nginx/www;
index index.html index.htm;
proxy_redirect off;
location /geodata {
include proxy_params;
proxy_pass http://127.0.0.1:8080/geodata;
}
}
Content of proxy_params (default)
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.