Added Passenger apache file
authorNeil Smith <neil.git@njae.me.uk>
Thu, 12 Mar 2009 08:04:54 +0000 (08:04 +0000)
committerNeil Smith <neil.git@njae.me.uk>
Thu, 12 Mar 2009 08:04:54 +0000 (08:04 +0000)
etc..apache2..sites-enabled..depot.njae.me.uk [new file with mode: 0644]

diff --git a/etc..apache2..sites-enabled..depot.njae.me.uk b/etc..apache2..sites-enabled..depot.njae.me.uk
new file mode 100644 (file)
index 0000000..e0d861f
--- /dev/null
@@ -0,0 +1,132 @@
+NameVirtualHost *:80
+<VirtualHost *:80>
+       ServerAdmin webmaster@localhost
+       
+       DocumentRoot /var/www/depot.njae.me.uk/current/public
+       ServerName depot.njae.me.uk
+
+#      SetEnv RAILS_ENV production
+#
+#      <Directory />
+#              Options FollowSymLinks
+#              AllowOverride None
+#      </Directory>
+#
+#        <Directory /var/www/>
+#                Options FollowSymLinks MultiViews
+#                AllowOverride None
+#                Order allow,deny
+#                allow from all
+#                # Uncomment this directive is you want to see apache2's
+#                # default start page (in /apache2-default) when you go to /
+#                #RedirectMatch ^/$ /apache2-default/
+#        </Directory>
+#
+#      <Directory /var/www/depot.njae.me.uk/current/public>
+#              # General Apache options
+#              Options +FollowSymLinks +ExecCGI
+#              AllowOverride None
+#              Order allow,deny
+#              allow from all
+#
+#              AuthName "Depot site"
+#              AuthType Basic
+#              AuthUserFile /etc/apache2/depot.njae.me.uk.passwd
+#              Require valid-user
+#        </Directory>
+#
+#        <Proxy *>
+#                Order allow,deny
+#              Allow from all
+#        </Proxy>
+#
+#        <Proxy balancer://mongrel_cluster>
+#          BalancerMember http://127.0.0.1:3000
+#          BalancerMember http://127.0.0.1:3001
+#          BalancerMember http://127.0.0.1:3002
+#        </Proxy>
+
+       RewriteEngine On
+       # If you don't want Rails to look in certain directories,
+       # use the following rewrite rules so that Apache won't rewrite certain requests
+       #
+       # Example:
+       #   RewriteCond %{REQUEST_URI} ^/notrails.*
+       #   RewriteRule .* - [L]
+       
+       # Redirect all requests not available on the filesystem to Rails
+       # By default the cgi dispatcher is used which is very slow
+       #
+       # For better performance replace the dispatcher with the fastcgi one
+       #
+       # Example:
+       #   RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
+       # If your Rails application is accessed via an Alias directive,
+       # then you MUST also set the RewriteBase in this htaccess file.
+       #
+       # Example:
+       #   Alias /myrailsapp /path/to/myrailsapp/public
+       #   RewriteBase /myrailsapp
+
+       # If the system maintenance page exists, serve that instead of any other page
+       RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
+       RewriteCond %{SCRIPT_FILENAME} !maintenance.html
+       RewriteRule ^.*$ /system/maintenance.html [L]
+       
+#      # Rewrite rule to check for the index page: Apache serves this directly
+#      RewriteRule ^/$ /index.html [QSA] 
+#
+#      # Rewrite rule for static pages: Apache serves these direclty
+#      RewriteRule ^([^.]+)$ $1.html [QSA]
+#
+#      ## If not other rule matches, pass the request to Rails
+#      # RewriteCond %{REQUEST_FILENAME} !-f
+#      # RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
+#      ## RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
+#
+#      # If no other rules match, pass the request to the Mongrel cluster
+#      # Redirect all non-static requests to cluster
+#      RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
+#      RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]
+
+
+#      ## Deflate served pages to improve speed over the network
+#      #AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css
+#      #BrowserMatch ^Mozilla/4 gzip-only-text/html
+#      #BrowserMatch ^Mozilla/4\.0[678] no-gzip
+#      #BrowserMatch \\bMSIE !no-gzip !gzip-only-text/html
+#
+#      ## Uncomment for deflate debugging
+#      #DeflateFilterNote Input input_info
+#      #DeflateFilterNote Output output_info
+#      #DeflateFilterNote Ratio ratio_info
+#      #LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate
+#      #CustomLog /var/log/apache2/depot_deflate.log deflate
+#
+#
+       # In case Rails experiences terminal errors
+       # Instead of displaying this message you can supply a file here which will be rendered instead
+       #
+       # Example:
+       #   ErrorDocument 500 /500.html
+
+       ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
+
+       # this not only blocks access to .svn directories, but makes it appear
+       # as though they aren't even there, not just that they are forbidden
+       <DirectoryMatch "^/.*/\.svn/">
+           ErrorDocument 403 /404.html
+           Order allow,deny
+           Deny from all
+           Satisfy All
+       </DirectoryMatch>
+
+       ErrorLog /var/log/apache2/error.log
+
+       # Possible values include: debug, info, notice, warn, error, crit,
+       # alert, emerg.
+       LogLevel warn
+
+       CustomLog /var/log/apache2/access.log combined
+       ServerSignature On
+</VirtualHost>