Skip to content

Instantly share code, notes, and snippets.

@sim51
Created March 4, 2012 17:44
Show Gist options
  • Save sim51/1974052 to your computer and use it in GitHub Desktop.
Save sim51/1974052 to your computer and use it in GitHub Desktop.
My nginx configuration for opendata-map.org
server {
listen 80;
server_name www.opendata-map.org;
root /var/www/opendata-map.org;
access_log /var/log/nginx/opendata-map.access.log;
error_log /var/log/nginx/opendata-map.error.log debug;
# GEOSERVER PROXY & CACHE
location /geoserver {
proxy_pass http://127.0.0.1:8080/geoserver;
proxy_cache geoserver-cache;
proxy_cache_valid 200 302 10m;
proxy_cache_valid 404 1m;
proxy_no_cache $cookie_nocache $arg_nocache $arg_comment;
proxy_no_cache $http_pragma $http_authorization;
proxy_cache_bypass $cookie_nocache $arg_nocache $arg_comment;
proxy_cache_bypass $http_pragma $http_authorization;
}
# PLAY PUBLIC FOLDER
location /public {
expires max;
root /opt/mapLibertic/;
}
# PLAY PROXY
location / {
proxy_pass http://127.0.0.1:9001/;
}
}
server {
listen 80;
server_name opendata-map.org;
rewrite ^/(.*) http://www.opendata-map.org/$1 permanent;
}
server {
listen 80;
server_name www.opendata-map.org;
root /var/www/opendata-map.org;
access_log /var/log/nginx/opendata-map.access.log;
error_log /var/log/nginx/opendata-map.error.log debug;
# GEOSEREVR PROXY
location /geoserver {
proxy_pass http://127.0.0.1:8080/geoserver;
}
# PLAY PUBLIC FOLDER
location /public {
expires max;
root /opt/mapLibertic/;
}
# PLAY PROXY
location / {
proxy_pass http://127.0.0.1:9001/;
}
}
server {
listen 80;
server_name opendata-map.org;
rewrite ^/(.*) http://www.opendata-map.org/$1 permanent;
}
@sim51
Copy link
Author

sim51 commented Mar 4, 2012

Becarefull of play plugin that have files into plublic folder !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment