Last active
March 16, 2018 14:00
-
-
Save capooti/ad74f9f092356b85758d62fa239d19ef to your computer and use it in GitHub Desktop.
Sample configuration for GeoNode/WorldMap, GeoServer and Solr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server{ | |
listen 80; | |
index index.html index.htm; | |
root /usr/share/nginx/html; | |
server_name example.com; | |
location /uploaded { | |
alias /home/ubuntu/worldmap_staging/worldmap_staging/uploaded/; | |
} | |
location /geoserver { | |
proxy_pass http://localhost:8080/geoserver; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
client_max_body_size 100M; | |
proxy_read_timeout 30000; | |
} | |
location /solr { | |
proxy_pass http://localhost:8983; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
client_max_body_size 100M; | |
proxy_read_timeout 30000; | |
} | |
location /{ | |
root /home/ubuntu/worldmap; | |
proxy_pass http://0.0.0.0:8000/; | |
add_header Access-Control-Allow-Origin "*"; | |
if ($request_method = OPTIONS) { | |
add_header Access-Control-Allow-Methods "GET, POST, PUT, PATCH, OPTIONS"; | |
add_header Access-Control-Allow-Headers "Authorization, Content-Type, Accept"; | |
add_header Access-Control-Allow-Credentials true; | |
add_header Content-Length 0; | |
add_header Content-Type text/plain; | |
add_header Access-Control-Max-Age 1728000; | |
return 200; | |
} | |
client_max_body_size 100M; | |
client_body_buffer_size 128K; | |
add_header Access-Control-Allow-Credentials false; | |
add_header Access-Control-Allow-Headers "Content-Type, Accept, Authorization, Origin, User-Agent"; | |
add_header Access-Control-Allow-Methods "GET, POST, PUT, PATCH, OPTIONS"; | |
proxy_set_header X-Forwarded-Protocol $scheme; | |
proxy_read_timeout 30000; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Host $server_name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment