1
0
mirror of https://github.com/dani/vroom.git synced 2024-06-02 21:31:41 +02:00
vroom/conf/httpd_vhost.conf
Daniel Berteaud 046453c10d Rename httpd.conf to httpd_vhost.conf
Take language suffix into account
Also fix cache indication on resources files using a timestamp in the path
2014-05-26 22:28:33 +02:00

42 lines
1.6 KiB
Plaintext

<VirtualHost *:80>
ServerName vroom.example.com
DocumentRoot /opt/vroom/public
RewriteEngine on
RewriteRule ^/(.*|$) https://%{HTTP_HOST}/$1 [L,R]
</VirtualHost>
<VirtualHost *:443>
ServerName vroom.example.com
SSLEngine on
DocumentRoot /opt/vroom/public
ProxyPass /socket.io/1/websocket ws://localhost:8889/socket.io/1/websocket
ProxyPassReverse /socket.io/1/websocket ws://localhost:8888/socket.io/1/websocket
ProxyPass /socket.io/ http://localhost:8888/socket.io/
ProxyPassReverse /socket.io/ http://localhost:8888/socket.io/
AliasMatch ^/([a-z]{2}/)?(\d{10}/)?((js|css|img|fonts|snd)/.*) /opt/vroom/public/$3
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/([a-z]{2}/)?(\d{10}/)?(js|css|img|fonts|snd)/(.*)$ /$3/$4 [L]
ScriptAlias / /opt/vroom/public/vroom.pl/
<Location />
require all granted
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch ^HMSIE !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
</IfModule>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
</Location>
<LocationMatch "^/([a-z]{2}/)?(\d{10}/)?(js|css|img|fonts|snd)/">
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 month"
</IfModule>
</LocationMatch>
</VirtualHost>