geonode
geonode copied to clipboard
GeoServer printing module - Error while download PDF
I installed Geonode and Geoserver perfectly. And I configured nginx proxy to run on https
So far it worked:
The print module configuration file in GEOSERVER_DATA_DIR/printing/config.yaml is created and I can see access the https://mydomainname/geoserver/pdf/info.json
And I can see printURL: https://mydomainname/geoserver/pdf/print.pdf
and createURL: https://mydomainname/geoserver/pdf/create.json Parameters in info.json
Here is my config.yaml
#===========================================================================
# allowed DPIs
#===========================================================================
dpis:
- 96
- 150
- 300
#===========================================================================
# the allowed scales
#===========================================================================
scales:
- 0.35
- 0.7
- 1.5
- 3.5
- 7.0
- 15.0
- 35.0
- 70.0
- 150.0
- 273.0
- 546.0
- 1093.0
- 2187.5
- 4375.0
- 8750.0
outputFilename: 'GeoNode-Map-${date}.pdf'
#== ms2 =====
disableScaleLocking: true
#======
brokenUrlPlaceholder: 'default'
# brokenUrlPlaceholder: 'throw'
proxyBaseUrl: https://mydomainname/geoserver/pdf
connectionTimeout: 2000
socketTimeout: 2000
#===========================================================================
# the list of allowed ips
#===========================================================================
hosts:
- !ipMatch
ip: 127.0.0.1
- !localMatch
dummy: true
- !acceptAll
dummy: true
- !dnsMatch
host: mydomainname
port: 80
- !dnsMatch
host: localhost
port: 80
Here is the NGINX Configuration:
server {
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name mydomainname;
charset utf-8;
etag on;
expires $expires;
proxy_read_timeout 600s;
# set client body size to 2M #
client_max_body_size 50000M;
location / {
etag off;
uwsgi_pass 127.0.0.1:8000;
uwsgi_read_timeout 600s;
include uwsgi_params;
proxy_pass http://localhost:8000/;
include proxy_params;
}
location /geoserver {
proxy_pass http://geoserver_proxy;
include proxy_params;
etag off;
uwsgi_pass 127.0.0.1:8000;
uwsgi_read_timeout 600s;
include uwsgi_params;
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/mydomainname/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/mydomainname/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
But when I generate the pdf the getURL parameter from create.json url comes with HTTP instead of HTTPS
http://mydomainname/geoserver/pdf/18439792855979453446.pdf.printout
Please help me to get the pdf URL with the HTTPS schema. Thanks