Use apache to proxy Redmine and use .htaccess problem
Added by jan gestre almost 16 years ago
Hi Guys,
I've recently installed Redmine in our svn server and so far I can access Redmine via http://hostname.org:8000. I want to use Apache 2.2 to proxy Redmine so that it will use port 80 instead of port 8000 but when I've enabled /etc/httpd/conf.d/redmine.conf all I get is Service Unavailable, I can't access any site hosted on the same server even though httpd is running.
Here's my redmine.conf:
<VirtualHost >
ServerAdmin root@localhost
ServerName redmine.example.org
DocumentRoot /var/www/html/redmine
<Directory "/var/www/html/redmine">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Proxy balancer://redmine_cluster>
Order allow,deny
Allow from all
BalancerMember http://127.0.0.1:8000
BalancerMember http://127.0.0.1:8001
BalancerMember http://127.0.0.1:8002
</Proxy>
RewriteEngine On
RewriteCond /{REQUEST_FILENAME} !-f
RewriteRule ^/(.)$ balancer://redmine_cluster%{REQUEST_URI} [P,QSA,L]
</VirtualHost>
And here's my RAILS_ENV output:
RAILS_ENV=production script/about
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- rails/info (MissingSourceFile)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:355:in `new_constants_in'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in `require'
from /usr/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/commands/about.rb:2
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from script/about:3
My actual database.yml is :
production:
adapter: mysql
database: redmine
host: 127.0.0.1
username: redmine
password: password
encoding: utf8
I've ran out of ideas how to proceed, although I can port forward port 3000 to be accessible outside but it's undesirable, also why is it that the .htaccess file for the redmine directory is not working, I just basically used the same authentication my svn users are using.
TIA
Jan
Replies (2)
RE: Use apache to proxy Redmine and use .htaccess problem - Added by Karl Heinz Marbaise almost 16 years ago
Hi,
i think there are missing some things:
<VirtualHost *:80> <Directory "/usr/local/vhosts/redmine/public"> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> ServerAdmin serveradmin@domain.test DocumentRoot "/usr/local/vhosts/redmine/public" ServerName .... ServerAlias .... <Proxy "balancer://railsair_cluster"> BalancerMember http://127.0.0.1:3000 BalancerMember http://127.0.0.1:3001 BalancerMember http://127.0.0.1:3002 BalancerMember http://127.0.0.1:3003 BalancerMember http://127.0.0.1:3004 </Proxy> RewriteEngine On #Just for maintenance RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f RewriteCond %{SCRIPT_FILENAME} !maintenance.html RewriteRule ^.*$ /system/maintenance.html [L] RewriteRule ^/$ /index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://railsair_cluster%{REQUEST_URI} [P,QSA,L] AddOutputFilterByType DEFLATE text/html text/plain text/xml BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html ErrorLog "logs/www.domain.de.error.log" CustomLog "logs/www.domain.de.access.log" combined </VirtualHost>
The next thing is how does your mongrels cluster configuration looks like ?
mongrel_cluster_ctl status
?
Have you activated NameVirtualHosts ? in the apache configuration ?
Kind regards
Karl Heinz Marbaise
RE: Use apache to proxy Redmine and use .htaccess problem - Added by goicontini goi almost 13 years ago
When I go to do rake, I get this message:
rake aborted!
/home/redmine/config/environment.rb:12: syntax error, unexpected tCONSTANT, expecting kDO or '{' or '('
require File.join(File.dirname(FILE), 'boot')
Any idea how to fix it? I think that maybe this has something to do with the symlinks we installed...?
bicicletas de montaña
LIFE'S SHORT. If you don't look around once in a while you might miss it