-
Notifications
You must be signed in to change notification settings - Fork 0
/
apache_vhost.conf
43 lines (34 loc) · 1.19 KB
/
apache_vhost.conf
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<VirtualHost *:80>
ServerName nkbook.pl
ServerAlias www.nkbook.pl
ServerAlias nkbook.jrc.one.pl
DocumentRoot /home/maciek/nkbook/public
RailsSpawnMethod smart-lv2
PassengerMaxRequests 100
PassengerMaxPoolSize 15
<Directory "/home/maciek/nkbook/">
Options FollowSymLinks
</Directory>
<Directory "/home/maciek/nkbook/public">
Options FollowSymLinks
AllowOverride All
Order deny,allow
Allow from all
</Directory>
RailsAllowModRewrite On
RewriteEngine On
RewriteCond %{THE_REQUEST} ^(GET|HEAD)
RewriteCond %{REQUEST_URI} ^/([^.]+)$
RewriteCond %{DOCUMENT_ROOT}/cache/%1.html -f
RewriteRule ^/[^.]+$ /cache/%1.html [QSA,L]
RewriteCond %{THE_REQUEST} ^(GET|HEAD)
RewriteCond %{DOCUMENT_ROOT}/cache/index.html -f
RewriteRule ^/$ /cache/index.html [QSA,L]
# Deflate
AddOutputFilterByType DEFLATE text/html text/plain text/css text/xml text/javascript application/x-javascript application/json
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
ErrorLog /var/log/apache2/nkbook.pl-errors.log
CustomLog /var/log/apache2/nkbook.pl.log combined
</VirtualHost>