source: osmose-frontend/apache-site

Last change on this file was cc29428, checked in by Jocelyn Jaubert <jocelyn.jaubert@…>, 6 years ago

Update apache-site

  • Property mode set to 100644
File size: 1.8 KB
Line 
1<VirtualHost *:80>
2
3        ServerAdmin jjaubert@openstreetmap.fr
4
5        ServerName osmose.openstreetmap.fr
6        ServerAlias osmose.openstreetmap.lu
7
8        WSGIScriptAlias / /data/project/osmose/frontend/osmose.wsgi
9        WSGIDaemonProcess osmose processes=2 threads=15 user=osmose group=osmose
10        WSGIProcessGroup osmose
11
12        DocumentRoot /data/project/osmose/frontend/static/
13
14        Alias /robots.txt /data/project/osmose/frontend/static/robots.txt
15        Alias /favicon.ico /data/project/osmose/frontend/static/favicon.ico
16
17        <Directory /data/project/osmose/frontend/static/>
18                AddDefaultCharset UTF-8
19                AddHandler cgi-script .py
20                Options FollowSymLinks Indexes MultiViews
21                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
22                AllowOverride None
23                DirectoryIndex index.html index.py
24        </Directory>
25
26        ExpiresActive On
27        ExpiresDefault "access plus 1 week"
28        <LocationMatch /[a-z]*/api>
29                ExpiresActive Off
30        </LocationMatch>
31        <LocationMatch /[a-z]*/byuser>
32                ExpiresDefault "access plus 5 minutes"
33        </LocationMatch>
34        <LocationMatch /[a-z]*/control>
35                ExpiresDefault "access plus 5 minutes"
36        </LocationMatch>
37        <LocationMatch /[a-z]*/error>
38                ExpiresActive Off
39        </LocationMatch>
40        <LocationMatch /[a-z]*/errors>
41                ExpiresDefault "access plus 5 minutes"
42        </LocationMatch>
43        <LocationMatch /[a-z]*/map>
44                ExpiresActive Off
45        </LocationMatch>
46        <LocationMatch /[a-z]*/map/heat>
47                ExpiresDefault "access plus 1 day"
48        </LocationMatch>
49        <LocationMatch /[a-z]*/map/marker>
50                ExpiresActive Off
51        </LocationMatch>
52        <LocationMatch /[a-z]*/map/markers>
53                ExpiresActive Off
54        </LocationMatch>
55
56        RewriteEngine On
57#       RewriteCond %{REQUEST_URI} !/maintenance.html$
58#       RewriteRule !^maintenance.html$ maintenance.html [R=302,L]
59
60        RewriteRule ^/$ /map/ [R,L]
61        RewriteRule ^/map/cgi-bin/index.py$ /map [R,L]
62
63        ErrorLog /var/log/apache2/osmose-error.log
64        LogLevel warn
65        CustomLog /var/log/apache2/osmose-access.log combined
66        ServerSignature On
67
68</VirtualHost>
Note: See TracBrowser for help on using the repository browser.