wiki:boggs

Version 4 (modified by Sam Boyer, 9 years ago) (diff)

update with detailed vhost info for projects.occupytechnology.org

Redmine

Installed at /home/members/ocutech/sites/projects.occupytechnology.org/

Requires a custom vhost config that is blown away by red if touched from the web interface. The intended vhost config (for projects.occupytechnology.org) is as follows:

# This file was created by Red. Best not to modify
# by hand unless you know what you're doing.
<VirtualHost *:80>
        # web config for projects.occupytechnology.org
        ServerName projects.occupytechnology.org
        ServerAlias www.projects.occupytechnology.org ctprojects.mayfirst.org projects.occupy.net
#       DocumentRoot /home/members/ocutech/sites/projects.occupytechnology.org/web
        CustomLog /home/members/ocutech/sites/projects.occupytechnology.org/logs/web.log combined
        ErrorLog /home/members/ocutech/sites/projects.occupytechnology.org/logs/error.log
        ScriptAlias /cgi-bin /home/members/ocutech/sites/projects.occupytechnology.org/cgi-bin

#       FCGIWrapper /home/members/ocutech/sites/projects.occupytechnology.org/bin/php-cgi .php
        SuexecUserGroup ctprojects ctprojects

        # FcgidInitialEnv for module mod_fcgid
        # These enviroment variables appear to be ignored by ruby, so these are also set in
        # the relevant config/enviroment.rb file
        FcgidInitialEnv RAILS_RELATIVE_URL_ROOT ""
        FcgidInitialEnv X_DEBIAN_SITEID "default"
        FcgidInitialEnv RAILS_ETC "/home/members/ocutech/sites/projects.occupytechnology.org/include/redmine/config"
        FcgidInitialEnv RAILS_LOG "/home/members/ocutech/sites/projects.occupytechnology.org/include/redmine/log"
        FcgidInitialEnv RAILS_VAR "/home/members/ocutech/sites/projects.occupytechnology.org/include/redmine"
        FcgidInitialEnv RAILS_CACHE "/home/members/ocutech/sites/projects.occupytechnology.org/include/redmine/tmp"
        FcgidInitialEnv RAILS_ENV "production"

        Alias "/plugin_assets/" /var/cache/redmine/default/plugin_assets/
        DocumentRoot /home/members/ocutech/sites/projects.occupytechnology.org/include/redmine/public
        <Directory "/home/members/ocutech/sites/projects.occupytechnology.org/include/redmine/public">
                Options +FollowSymLinks +ExecCGI
                Order allow,deny
                Allow from all
                RewriteEngine On
                # just want projects.occupy.net to work; force redirect
                RewriteCond %{HTTP_HOST} ^projects\.occupytechnology\.org
                RewriteRule (.*) http://projects.occupy.net/$1 [R=301,L]

                RewriteRule ^$ index.html [QSA]
                RewriteRule ^([^.]+)$ $1.html [QSA]
                RewriteCond %{REQUEST_FILENAME} !-f [OR]
                RewriteCond %{REQUEST_FILENAME} dispatch.fcgi$
                RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
        </Directory>
</VirtualHost>

Note that it's now being run exclusively at projects.occupy.net (which is managed elsewhere, and that's unlikely to change), but we're managing the redirect right in the vhost. This is sloppy and it'd be perfectly fine if someone with a better idea were to implement that :)

Required:

gem install i18n -v=0.4.2