signin redirect doesn't work from behind Apache proxy
Added by Craig Yoshioka about 11 years ago
I installed redmine 2.3 using nginx+passenger on a new server under the base uri /redmine. Everything works fine when accessing this server directly.
I then proxied to this server from our externally accessible Apache server, also under /redmine.
Everything works fine when using redmine through the proxy server except that the redirect on login is broken. Can't figure out how to fix this.
I added this line to my apache config:
ProxyPass /redmine http://charon.nimgs.com/redmine
I think Apache is doing something funny with escaping the proxied URL? Any suggestions?
Thanks.
Replies (1)
RE: signin redirect doesn't work from behind Apache proxy - Added by Paresh Patel about 11 years ago
hi,
Warming up
We will first need to install basic packages:
apt-get install ruby rubygems libruby libapache2-mod-passenger ruby-dev
Download the latest version of Redmine (2.1.2 in our case) and untar it, then move it to /usr/local/share
cd /usr/local/share/
wget http://rubyforge.org/frs/download.php/76495/redmine-2.1.2.tar.gz
tar -xzvf redmine-2.1.2.tar.gz
ln -s /usr/local/share/redmine-2.1.2 /usr/local/share/redmine
chown -R root:root /usr/local/share/redmine-2.1.2
Install development libraries for MySQL and Imagick:
apt-get install libmysqlclient-dev libmagickcore-dev libmagickwand-dev (install shitload of packages)
Edit
Running the Gem stuff
Install Bundler (removing useless module, which would otherwise create dependencies):
gem install bundler
cd /usr/local/share/redmine/
bundle install --without development test postgresql sqlite
Edit
Creating the database
On a new installation you need to create the database and a user for redmine.
Open a mysql command prompt:
mysql -u root -p
At the mysql prompt enter the mysql commands:
create user 'redmine' identified by 'redmine';
set password for 'redmine''localhost' = password('my_password');
'localhost';
grant all on *.* to 'redmine'
create database redmine;
quit;
Edit
Configuration
Copy config/database.yml.example to config/database.yml and edit this file in order to configure your database settings for "production" environment.
Example for a MySQL database using ruby1.8 or jruby:
production:
adapter: mysql2 (note: For Rails < 3.1 use mysql instead of mysql2)
database: redmine
host: localhost
username: redmine
password: my_password
Generate a session store secret:
rake generate_secret_token
Generate the database structure:
RAILS_ENV=production rake db:migrate
Generate default configuration data:
RAILS_ENV=production rake redmine:load_default_data
(using “es” for Spanish language in terminal prompt)
Setup config file in config/configuration.yml
Change database_ciphr_key: *
rake db:encrypt RAILS_ENV=production
Edit
Apache
Setup Apache’s VirtualHost config
- 8080 in this case is because we use a reverse proxy before Apache. Otherwise simply use "*:80"
<VirtualHost *:8080>
ServerName redmine.example.com
DocumentRoot /usr/local/share/redmine/public
<Directory /usr/local/share/redmine/public>
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
Once you enable this virtual host (a2ensite redmine.example.com) and reload Apache (apache2ctl graceful), you should see your site running on http://redmine.example.com.
The default login/password is admin/admin (don't forget to change this).
-==============================================================================
or
=================================================================================
this link follow
http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_in_a_sub-URI
http://www.javanna.net/2011/07/redmine-behind-apache-with-passenger/