Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Redmine Cookbook

You're reading from   Redmine Cookbook Over 80 hands-on recipes to improve your skills in project management, team management, process improvement, and Redmine administration

Arrow left icon
Product type Paperback
Published in Feb 2016
Publisher Packt
ISBN-13 9781785286131
Length 322 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Aleksandar Pavic Aleksandar Pavic
Author Profile Icon Aleksandar Pavic
Aleksandar Pavic
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Installing and Running Redmine 2. Customizing Redmine FREE CHAPTER 3. Project Management with Redmine 4. Improving Team Performance 5. Regular and Planned Maintenance 6. Performance and System Tuning 7. Integrating Redmine with Other Software 8. Getting the Most Out of Scripts and Plugins 9. Troubleshooting 10. Making the Most of Redmine Index

Running with Apache as mod_fcgid

The mod_fcgid module is a high-performance alternative to mod_cgi and handles all requests for programs (such as Ruby) that need to be executed on the server. This recipe may not be a very popular choice due to the fact that many standalone Ruby servers such as Thin, Puma, and Phusion Passenger now exist. However, it may be required, and it's very reliable and relies only on Apache and Ruby executables.

Getting ready

  • Install Redmine as explained in Installing Redmine from a source on Ubuntu to the home directory.
  • Install Apache and mod_fastcgid by typing the following:
    sudo apt-get install apache2 libapache2-mod-fcgid
    

How to do it…

Once the prerequisites are installed, and Redmine is confirmed as working with WEBrick, then navigate to /home/youruser/redmine/public and type the following commands:

cd /home/youruser/redmine/public
mv dispatch.fcgi.example dispatch.fcgi
chmod 755 dispatch.fcgi
mv htaccess.fcgi.example .htaccess

Create a new virtual host for Apache, or edit the default host. We will create a new host called redmine.yoursite.com:

sudo nano /etc/apache2/sites-available/redmine.yoursite.com

Enter the following contents:

<VirtualHost *:80>
        ServerName redmine.yoursite.com
        DocumentRoot /home/youruser/redmine/public
        <Directory /home/youruser/redmine/public >
                Options Indexes ExecCGI FollowSymLinks
                Order allow,deny
                Allow from all
                AllowOverride all
        </Directory>
        ErrorLog /var/log/apache2/yoursite_error.log
        CustomLog /var/log/apache2/yoursite_access.log combined
</VirtualHost>

Enable your new website and restart Apache:

sudo a2ensite redmine.yoursite.com
sudo service apache2 restart

After restarting, your Redmine should be ready and accessible through http://redmine.yoursite.com provided DNS is set properly or at least hosts file for testing purposes.

How it works…

At first, we installed mod_fcgid for Apache, then we prepared dispatch.fcgi; .htaccess, dispatch.fcgi is used by mod_fcgid through Apache and Ruby to run Redmine. htaccess tells Apache what to do with dispatch.fcgid. After this, we created a new virtual server for Apache. This may be done through an Apache management tool, such as Webmin for example, but then the value needs to be entered through an entry form or edited like we did from the command line in this recipe. After creating a virtual server, we enabled it and tested Redmine.

There's more…

If you get an error such as, Rails application failed to start properly, try some of the troubleshooting recipes from Chapter 9, Troubleshooting (the Troubleshooting Apache installations section.)

See also

The official mod_fcgid website is http://httpd.apache.org/mod_fcgid/.

More on Apache administration can be found at https://httpd.apache.org/docs/2.2/vhosts/name-based.html.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image