-
Notifications
You must be signed in to change notification settings - Fork 20
Hsproxy configuration
!!OUTDATED TODO: update to hslayers-server
Hsproxy is a cgi python script, which helps to overcome CORS restrictions in wms and ajax requests.
Compile uwsg with cgi support as described here https://uwsgi-docs.readthedocs.io/en/latest/CGI.html
curl http://uwsgi.it/install | bash -s cgi /tmp/uwsgi
(Doesn't have to be /tmp, but absolute path is necessary)
Create a cgi.ini file for uwsgi configuration with content:
socket = /tmp/uwsgi.sock
cgi = /cgi-bin=/srv/http/cgi-bin
chmod-socket = 664
uid = http #Might be different
gid = http
Download hsproxy.cgi script and put it into /srv/http/cgi-bin:
curl https://raw.githubusercontent.com/hslayers/hslayers-ng/develop/lib/hsproxy_py3.cgi --output /srv/http/cgi-bin/hsproxy.cgi
Launch uwsgi
sudo /tmp/uwsgi --ini cgi.ini
Add config to server section of nginx.conf
location /cgi-bin/ {
include uwsgi_params;
uwsgi_modifier1 9;
uwsgi_pass unix:///tmp/uwsgi.sock;
}
restart nginx
http://localhost/cgi-bin/hsproxy.cgi should give you
Some unexpected error occurred. Error text was: 'NoneType' object has no attribute 'split' hsproxy.cgi 152
Thats fine!
Quick Links: Home ➖ App configuration ➖ Layer configuration ➖ Cesium configuration ➖ Composition schema (separate repo)