The root directory method

Allowing your redmine instance to take over the entire domain! Here are the steps you will need to continue with this task:

  1. Make your apps directory where your various redmine versions will be stored
mkdir /apps
  1. Uncompress redmine into the apps directory
tar zxvf redmine.tar.gz
  1. Install dependencies
cd /apps/redmine
bundle install
  1. Create a symlink in /var/www that points to the redmine public directory
cd /apps
ln -s /apps/redmine/public /var/www/redmine
  1. Create a virtual host with the following basic config:
<VirtualHost *:80>
  ServerName red.example.com
  DocumentRoot /var/www/
  <Directory />
    Options FollowSymLinks
    Allowoverride None
    RailsBaseURI /redmine-2.3.0
    PassengerResolveSymlinksInDocumentRoot on

    ### (optional) redirect to https
    #RewriteEngine On
  	#RewriteCond %{HTTPS} off
    
    ### exception for the email handler to not rewrite to https
    #RewriteCond %{REMOTE_ADDR} !###\.###\.###\.###
    #RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
  </Directory>


  ErrorLog ${APACHE_LOG_DIR}/red.example.org-error.log

  # Possible values include: debug, info, notice, warn, error, crit,
  # alert, emerg.
  LogLevel warn
  CustomLog ${APACHE_LOG_DIR}/redmine.example.org-access.log combined
</VirtualHost>

The sub-directory method

When you want to have your Redmine application be hosted under a custom directory and not in the root of your entire domain, use the instructions be below to get started.

Steps to the sub-directory

<VirtualHost *:80>
  ServerName red.example.com
  DocumentRoot /var/www/
  <Directory />
    Allow from all
  </Directory>
			
  RailsBaseURI /redmine
  <Directory /var/www/redmine>
    Options -MultiViews
  </Directory>

  ErrorLog ${APACHE_LOG_DIR}/redmine.example.org-error.log

  # Possible values include: debug, info, notice, warn, error, crit,
  # alert, emerg.
  LogLevel warn
  CustomLog ${APACHE_LOG_DIR}/redmine.example.org-access.log combined
</VirtualHost>

After configuring the website, continue to configure redmine with these steps

  1. Modify your /etc/hosts file to access the newly created site
echo "127.0.0.1 redmine redmine.example.com" >> /etc/hosts
  1. Copy and edit config/database.yml to your needs

  2. Run database migrations

rake db:migrate
  1. Generate secret token
rake generate_secret_token
  1. Start up apache and login!
username: admin
password: admin
comments powered by Disqus