diff --git a/etc/raspberrypios/000-default.conf b/etc/raspberrypios/000-default.conf index 9a4f9f5a..e18cc105 100644 --- a/etc/raspberrypios/000-default.conf +++ b/etc/raspberrypios/000-default.conf @@ -1,43 +1,47 @@ - # The ServerName directive sets the request scheme, hostname and port that - # the server uses to identify itself. This is used when creating - # redirection URLs. In the context of virtual hosts, the ServerName - # specifies what hostname must appear in the request's Host: header to - # match this virtual host. For the default virtual host (this file) this - # value is not decisive as it is used as a last resort host regardless. - # However, you must set it for any further virtual host explicitly. - #ServerName www.example.com + # The ServerName directive sets the request scheme, hostname and port that + # the server uses to identify itself. This is used when creating + # redirection URLs. In the context of virtual hosts, the ServerName + # specifies what hostname must appear in the request's Host: header to + # match this virtual host. For the default virtual host (this file) this + # value is not decisive as it is used as a last resort host regardless. + # However, you must set it for any further virtual host explicitly. + #ServerName www.example.com - ServerAdmin webmaster@localhost + ServerAdmin webmaster@localhost - LoadTileConfigFile /etc/renderd.conf - ModTileRenderdSocketName /run/renderd/renderd.sock - # Timeout before giving up for a tile to be rendered - ModTileRequestTimeout 0 - # Timeout before giving up for a tile to be rendered that is otherwise missing - ModTileMissingRequestTimeout 30 + LoadTileConfigFile /etc/renderd.conf + ModTileRenderdSocketName /run/renderd/renderd.sock + # Timeout before giving up for a tile to be rendered + ModTileRequestTimeout 0 + # Timeout before giving up for a tile to be rendered that is otherwise missing + ModTileMissingRequestTimeout 30 - DocumentRoot /var/www/html + DocumentRoot /var/www/html SSLEngine on SSLCertificateFile /etc/nginx/cert.crt SSLCertificateKeyFile /etc/nginx/cert.key - # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, - # error, crit, alert, emerg. - # It is also possible to configure the loglevel for particular - # modules, e.g. - #LogLevel info ssl:warn + Header set Access-Control-Allow-Origin "*" + Header set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT" + Header set Access-Control-Allow-Headers "Content-Type" - ErrorLog ${APACHE_LOG_DIR}/error.log - CustomLog ${APACHE_LOG_DIR}/access.log combined + # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, + # error, crit, alert, emerg. + # It is also possible to configure the loglevel for particular + # modules, e.g. + #LogLevel info ssl:warn - # For most configuration files from conf-available/, which are - # enabled or disabled at a global level, it is possible to - # include a line for only one particular virtual host. For example the - # following line enables the CGI configuration for this host only - # after it has been globally disabled with "a2disconf". - #Include conf-available/serve-cgi-bin.conf + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + + # For most configuration files from conf-available/, which are + # enabled or disabled at a global level, it is possible to + # include a line for only one particular virtual host. For example the + # following line enables the CGI configuration for this host only + # after it has been globally disabled with "a2disconf". + #Include conf-available/serve-cgi-bin.conf # vim: syntax=apache ts=4 sw=4 sts=4 sr noet diff --git a/etc/raspberrypios/nginx.conf b/etc/raspberrypios/nginx.conf index 9dfac32c..4d2e93fe 100644 --- a/etc/raspberrypios/nginx.conf +++ b/etc/raspberrypios/nginx.conf @@ -54,6 +54,7 @@ http { listen 8085 ssl; listen [::]:8085 ssl; proxy_pass_header Host; + proxy_set_header 'Access-Control-Allow-Origin' '*'; ssl_certificate /etc/nginx/cert.crt; ssl_certificate_key /etc/nginx/cert.key; @@ -68,6 +69,7 @@ http { listen 8086 ssl; listen [::]:8086 ssl; proxy_pass_header Host; + add_header 'Access-Control-Allow-Origin' '*'; ssl_certificate /etc/nginx/cert.crt; ssl_certificate_key /etc/nginx/cert.key; diff --git a/pi-gen/stage2/04-wrolpi/04-run-chroot.sh b/pi-gen/stage2/04-wrolpi/04-run-chroot.sh index 3b8fc8b5..291ffa92 100755 --- a/pi-gen/stage2/04-wrolpi/04-run-chroot.sh +++ b/pi-gen/stage2/04-wrolpi/04-run-chroot.sh @@ -10,16 +10,16 @@ git config --global --add safe.directory /opt/openstreetmap-carto chown -R wrolpi:wrolpi /opt/openstreetmap-carto (cd /opt/openstreetmap-carto && carto project.mml >/opt/openstreetmap-carto/mapnik.xml) -# WROLPi user can access WROLPi and Map database. +# All users can access wrolpi and map database. cat >/etc/skel/.pgpass <<'EOF' 127.0.0.1:5432:gis:_renderd:wrolpi 127.0.0.1:5432:wrolpi:wrolpi:wrolpi EOF -# Update desktop shortcuts. +# Copy desktop shortcuts. mkdir /etc/skel/Desktop cp /opt/wrolpi/etc/raspberrypios/*desktop /etc/skel/Desktop -# Configure renderd. +# Configure renderd (map). cp /opt/wrolpi/etc/raspberrypios/renderd.conf /etc/renderd.conf # Configure Apache2 to listen on 8084. Import renderd into apache. cp /opt/wrolpi/etc/raspberrypios/ports.conf /etc/apache2/ports.conf