forked from qgis/QGIS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RPM] Do not make qgis-server depend on httpd [RPM] Add an Nginx configuration example [RPM] Update server readme and replace wms with a better ogc [RPM] More fixes for Epoch directive [RPM] F27 reached EoL, replace it with F29 [RPM] Add support for netcdf and replace ogc with ows as server endpoint [RPM] Add sample systemd service file
- Loading branch information
Showing
7 changed files
with
149 additions
and
31 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,18 +7,21 @@ Services (WMS). Simply layout your map in QGIS. The WMS will look | |
exactly the same, because QGIS server uses the same libraries for | ||
rendering, as the desktop application does. | ||
|
||
A sample configuration file for Httpd is installed under | ||
/etc/httpd/conf.d/qgis-server.conf. | ||
A sample configuration file for HTTPD is installed under | ||
/usr/share/doc/qgis-server/qgis-server-httpd.conf. | ||
Also a sample configuration file for Nginx is available under | ||
/usr/share/doc/qgis-server/qgis-server-nginx.conf with the corresponding | ||
systemd socket for the FastCGI daemon. | ||
|
||
This configuration expects QGIS project files under /var/www/wms. To | ||
This configuration expects QGIS project files under /var/www/ows. To | ||
use it, reload the Httpd configuration and place the files you want to | ||
publish in this directory. | ||
|
||
A getCapabilities request looks like this: | ||
|
||
http://localhost/wms/my_qgis_project?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.3.0 | ||
http://localhost/ows/my_qgis_project?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.3.0 | ||
|
||
QGIS project is "/var/www/wms/my_qgis_project.qgs". The sample | ||
QGIS project is "/var/www/ows/my_qgis_project.qgs". The sample | ||
configuration automatically adds the project file extension for you. | ||
|
||
The actual data can stay where it is. Make sure QGIS server can | ||
|
@@ -55,7 +58,8 @@ Both configuration files are included as documentation. | |
|
||
================================================== | ||
|
||
Further information: http://karlinapp.ethz.ch/qgis_wms | ||
|
||
Volker Fröhlich | ||
[email protected] | ||
|
||
Daniele Viganò | ||
[email protected] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Adapted from http://www.itopen.it/bulk/qgis3-server/#/step-27 | ||
# Path: /etc/systemd/system/qgis-server-fcgi.service | ||
# systemctl enable qgis-server-fcgi.service && systemctl start qgis-server-fcgi.service | ||
|
||
[Unit] | ||
Description = QGIS Server Tracker FastCGI backend | ||
After = network.target qgis-server-fcgi.socket | ||
|
||
[Service] | ||
# An existing user must be set | ||
User = qgis | ||
Group = qgis | ||
ExecStart = /usr/libexec/qgis/qgis_mapserv.fcgi | ||
StandardInput = socket | ||
WorkingDirectory = /tmp | ||
|
||
Restart = always |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Adapted from http://www.itopen.it/bulk/qgis3-server/#/step-26 | ||
# Path: /etc/systemd/system/qgis-server-fcgi.socket | ||
# systemctl enable qgis-server-fcgi.socket && systemctl start qgis-server-fcgi.socket | ||
|
||
[Unit] | ||
Description = QGIS Server FastCGI Socket | ||
PartOf = qgis-server-fcgi.service | ||
|
||
[Socket] | ||
ListenStream = 127.0.0.1:9993 | ||
Accept = yes | ||
|
||
[Install] | ||
WantedBy = sockets.target |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Adapted from https://github.com/gem/oq-qgis-server/blob/master/conf/qgis-server-nginx.conf | ||
# It requires a FCGI processes spawner like spawn-fcgi or systemd (see s-server-fcgi.socket) | ||
|
||
user nginx; | ||
worker_processes auto; | ||
access_log /var/log/nginx/access.log; | ||
error_log /var/log/nginx/error.log; | ||
pid /run/nginx.pid; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
|
||
sendfile on; | ||
tcp_nopush on; | ||
tcp_nodelay on; | ||
keepalive_timeout 65; | ||
types_hash_max_size 2048; | ||
|
||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
# Get 'port' from `$http_host` | ||
map $http_host $port { | ||
"~*.*:(?<p>.*)" $p; | ||
default server_port; | ||
} | ||
# Get 'proto' from `$scheme` unless 'X-Forwarded-Proto' | ||
# is set by the reverse proxy | ||
map $http_x_forwarded_proto $qgis_proto { | ||
"" $scheme; | ||
default $http_x_forwarded_proto; | ||
} | ||
# Get 'host' from `$host` unless 'X-Forwarded-Host' | ||
# is set by the reverse proxy | ||
map $http_x_forwarded_host $qgis_host { | ||
"" $host; | ||
default $http_x_forwarded_host; | ||
} | ||
# Get 'port' from `$port` unless 'X-Forwarded-Port' | ||
# is set by the reverse proxy | ||
map $http_x_forwarded_port $qgis_port { | ||
"" $port; | ||
default $http_x_forwarded_port; | ||
} | ||
|
||
server { | ||
listen 80 default_server; | ||
listen [::]:80 default_server; | ||
server_name _; | ||
root /usr/share/nginx/html; | ||
|
||
location /ows/ { | ||
rewrite ^/ows/(.*)$ /qgis/qgis_mapserv.fcgi?map=/var/www/ows/$1.qgs; | ||
} | ||
location /qgis/ { | ||
internal; # Used only by the OGC rewrite | ||
root /var/www/ows; | ||
fastcgi_pass localhost:9993; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
fastcgi_param QUERY_STRING $query_string; | ||
# build links in GetCapabilities based on | ||
# the hostname exposed by the reverse proxy | ||
fastcgi_param SERVER_PROTOCOL $qgis_proto; | ||
fastcgi_param SERVER_NAME $qgis_host; | ||
fastcgi_param SERVER_PORT $qgis_port; | ||
} | ||
error_page 404 /404.html; | ||
location = /40x.html { | ||
} | ||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
} | ||
} | ||
|
||
} |