Project

General

Profile

HowTo have both development and production environment available from Apache with VirtualHost » History » Version 1

Florent Fievez, 2011-02-04 09:36

1 1 Florent Fievez
h1. HowTo have both development and production environment available from Apache with VirtualHost
2
3
To run both development and production environment using VirtualHost to choose between them here's the apache configuration : 
4
5
<pre>
6
LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so
7
8
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11
9
PassengerRuby /usr/local/bin/ruby
10
11
# Production redmine
12
<VirtualHost  *:80>
13
        ServerName redmine.mydomain.com
14
        *RailsEnv production* 
15
        DocumentRoot /www/RoR/Redmine/redmine/public
16
        ErrorLog logs/redmine_error_log
17
        CustomLog logs/redmine_access_log combined
18
19
        <Directory  /www/RoR/Redmine/redmine/public>
20
                Allow from all
21
                Options -MultiViews
22
        </Directory>
23
</VirtualHost>
24
25
# Development (for testing purpose only - have its own db)
26
<VirtualHost  *:80>
27
        ServerName redminedev.mydomain.com
28
       * RailsEnv development* 
29
        DocumentRoot /www/RoR/Redmine/redminedev/public
30
        ErrorLog logs/redminedev_error_log
31
        CustomLog logs/redminedev_access_log combined
32
33
        <Directory  /www/RoR/Redmine/redminedev/public>
34
                Allow from all
35
                Options -MultiViews
36
        </Directory>
37
</VirtualHost>
38
39
</pre>