5_prodige_frontcarto_4.1.conf 1.03 KB
Newer Older
Sebastien QUESSON's avatar
Sebastien QUESSON committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
<VirtualHost *:443>
   ServerName carto#DOMAIN#
   DocumentRoot /home/sites/prodigefrontcarto/web
   DirectoryIndex index.php
   Alias /mapimage "/home/prodige/mapimage"
   Alias /IHM/IHM/cartes "/home/prodige/cartes/IHM"
   RewriteEngine On
   SSLProxyEngine On
   RewriteRule ^/cgi-bin/mapserv(?!wfs)(.*) https://datacarto#DOMAIN#/WMS$1 [P]
   ProxyPassReverse  /cgi-bin/mapserv https://datacarto#DOMAIN#/WMS
   RewriteRule ^/cgi-bin/mapservwfs(.*) https://datacarto#DOMAIN#/WFS$1 [P]
   ProxyPassReverse  /cgi-bin/mapservwfs https://datacarto#DOMAIN#/WFS
   RewriteRule ^/wmts(.*) https://datacarto#DOMAIN#/WMTS$1 [P]
   ProxyPassReverse  /wmts https://datacarto#DOMAIN#/WMTS
   RewriteRule ^/wmsc(.*) https://datacarto#DOMAIN#/WMSC$1 [P]
   ProxyPassReverse  /wmsc https://datacarto#DOMAIN#/WMSC
   Include /etc/apache2/ssl-cert/ssl.conf
</VirtualHost>

<VirtualHost *:80>
    ServerName carto#DOMAIN#
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^carto#DOMAIN#$
    RewriteRule ^(.*)$ https://carto#DOMAIN#$1 [R=permanent,L]
</VirtualHost>