Functional tests now work properly, bearing in mind whether a user is logged in or...
[depot.git] / etc..apache2..sites-enabled..depot.njae.me.uk
1 NameVirtualHost *:80
2 <VirtualHost *:80>
3 ServerAdmin webmaster@localhost
4
5 DocumentRoot /var/www/depot.njae.me.uk/current/public
6 ServerName depot.njae.me.uk
7
8 # SetEnv RAILS_ENV production
9 #
10 # <Directory />
11 # Options FollowSymLinks
12 # AllowOverride None
13 # </Directory>
14 #
15 # <Directory /var/www/>
16 # Options FollowSymLinks MultiViews
17 # AllowOverride None
18 # Order allow,deny
19 # allow from all
20 # # Uncomment this directive is you want to see apache2's
21 # # default start page (in /apache2-default) when you go to /
22 # #RedirectMatch ^/$ /apache2-default/
23 # </Directory>
24 #
25 # <Directory /var/www/depot.njae.me.uk/current/public>
26 # # General Apache options
27 # Options +FollowSymLinks +ExecCGI
28 # AllowOverride None
29 # Order allow,deny
30 # allow from all
31 #
32 # AuthName "Depot site"
33 # AuthType Basic
34 # AuthUserFile /etc/apache2/depot.njae.me.uk.passwd
35 # Require valid-user
36 # </Directory>
37 #
38 # <Proxy *>
39 # Order allow,deny
40 # Allow from all
41 # </Proxy>
42 #
43 # <Proxy balancer://mongrel_cluster>
44 # BalancerMember http://127.0.0.1:3000
45 # BalancerMember http://127.0.0.1:3001
46 # BalancerMember http://127.0.0.1:3002
47 # </Proxy>
48
49 RewriteEngine On
50 # If you don't want Rails to look in certain directories,
51 # use the following rewrite rules so that Apache won't rewrite certain requests
52 #
53 # Example:
54 # RewriteCond %{REQUEST_URI} ^/notrails.*
55 # RewriteRule .* - [L]
56
57 # Redirect all requests not available on the filesystem to Rails
58 # By default the cgi dispatcher is used which is very slow
59 #
60 # For better performance replace the dispatcher with the fastcgi one
61 #
62 # Example:
63 # RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
64 # If your Rails application is accessed via an Alias directive,
65 # then you MUST also set the RewriteBase in this htaccess file.
66 #
67 # Example:
68 # Alias /myrailsapp /path/to/myrailsapp/public
69 # RewriteBase /myrailsapp
70
71 # If the system maintenance page exists, serve that instead of any other page
72 RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
73 RewriteCond %{SCRIPT_FILENAME} !maintenance.html
74 RewriteRule ^.*$ /system/maintenance.html [L]
75
76 # # Rewrite rule to check for the index page: Apache serves this directly
77 # RewriteRule ^/$ /index.html [QSA]
78 #
79 # # Rewrite rule for static pages: Apache serves these direclty
80 # RewriteRule ^([^.]+)$ $1.html [QSA]
81 #
82 # ## If not other rule matches, pass the request to Rails
83 # # RewriteCond %{REQUEST_FILENAME} !-f
84 # # RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
85 # ## RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
86 #
87 # # If no other rules match, pass the request to the Mongrel cluster
88 # # Redirect all non-static requests to cluster
89 # RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
90 # RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]
91
92
93 # ## Deflate served pages to improve speed over the network
94 # #AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css
95 # #BrowserMatch ^Mozilla/4 gzip-only-text/html
96 # #BrowserMatch ^Mozilla/4\.0[678] no-gzip
97 # #BrowserMatch \\bMSIE !no-gzip !gzip-only-text/html
98 #
99 # ## Uncomment for deflate debugging
100 # #DeflateFilterNote Input input_info
101 # #DeflateFilterNote Output output_info
102 # #DeflateFilterNote Ratio ratio_info
103 # #LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate
104 # #CustomLog /var/log/apache2/depot_deflate.log deflate
105 #
106 #
107 # In case Rails experiences terminal errors
108 # Instead of displaying this message you can supply a file here which will be rendered instead
109 #
110 # Example:
111 # ErrorDocument 500 /500.html
112
113 ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
114
115 # this not only blocks access to .svn directories, but makes it appear
116 # as though they aren't even there, not just that they are forbidden
117 <DirectoryMatch "^/.*/\.svn/">
118 ErrorDocument 403 /404.html
119 Order allow,deny
120 Deny from all
121 Satisfy All
122 </DirectoryMatch>
123
124 ErrorLog /var/log/apache2/error.log
125
126 # Possible values include: debug, info, notice, warn, error, crit,
127 # alert, emerg.
128 LogLevel warn
129
130 CustomLog /var/log/apache2/access.log combined
131 ServerSignature On
132 </VirtualHost>