Document root showing up instead of redmine site <SOLVED>

Added by Sunny Jassal over 7 years ago

Hello,

I had successfully installed redmin via http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_on_Ubuntu_step_by_step on one of my machines. However on a new server, I followed instructions on http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_212_in_Ubuntu_1210_and_Apache_Passenger, so I can access redmine via redmine.mysite.com vs mysite.com/redmine. Everything went well in the install accept now when I go to http://redmine.mysite.com, the site comes up with the document root of /usr/local/share/redmine/public rather than the redmine site.

Any help in the matter would be appreciated as I am stuck at this point :)

Thanks for your help in advance

Replies (7)

RE: Document root showing up instead of redmine site - Added by Jan Niggemann (redmine.org team member) over 7 years ago

Please post your apache and passenger config files

RE: Document root showing up instead of redmine site - Added by Sunny Jassal over 7 years ago

Thanks for your reply. Each time I try to post up the contents of apache2.conf the server rejects the content as spam. I will try different alterations so the redmine server can accept it. Meanwhile by passenger configuration which files do you mean? The files under /usr/local/share/redmine/config?

RE: Document root showing up instead of redmine site - Added by Sunny Jassal over 7 years ago

Below are the contents of the file redmine.mysite.com. Please note I have left the default file alone.

<VirtualHost *:80>
ServerName redmine.mysite.com
DocumentRoot /usr/local/share/redmine/public
<Directory /usr/local/share/redmine/public>
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>

RE: Document root showing up instead of redmine site - Added by Sunny Jassal over 7 years ago

Here are the contents of apache2.conf. Please note I had to get rid of all comments (lines starting with #), so the post does not get marked for spam

LockFile ${APACHE_LOCK_DIR}/accept.lock

PidFile ${APACHE_PID_FILE}

Timeout 300

KeepAlive On

MaxKeepAliveRequests 100

KeepAliveTimeout 5

<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>

<IfModule mpm_worker_module>
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxClients 150
MaxRequestsPerChild 0
</IfModule>

<IfModule mpm_event_module>
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxClients 150
MaxRequestsPerChild 0
</IfModule>

User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

AccessFileName .htaccess

<Files ~ "^\.ht">
Order allow,deny
Deny from all
Satisfy all
</Files>

DefaultType None

HostnameLookups Off

ErrorLog ${APACHE_LOG_DIR}/error.log

LogLevel warn

Include mods-enabled/*.load
Include mods-enabled/*.conf

Include ports.conf

LogFormat "%v:%p h %l %u %t \"%r\" %>s %O \"{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h l %u %t \"%r\" %>s %O \"{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h l %u %t \"%r\" %>s %O" common
LogFormat "
{Referer}i -> U" referer
LogFormat "
{User-agent}i" agent

Include conf.d/

Include sites-enabled/

NameVirtualHost *:80

<IfModule mod_ssl.c>
NameVirtualHost *:443
</IfModule>

RE: Document root showing up instead of redmine site - Added by Sunny Jassal over 7 years ago

configuration.yml

default:
email_delivery:
delivery_method: :smtp
smtp_settings:
address: smtp.example.net
port: 25
domain: example.net
authentication: :login
user_name: ""
password: "redmine"

attachments_storage_path:
autologin_cookie_name:
autologin_cookie_path:
autologin_cookie_secure:
scm_subversion_command:
scm_mercurial_command:
scm_git_command:
scm_cvs_command:
scm_bazaar_command:
scm_darcs_command:
database_cipher_key: MYKEY
production:

development:

RE: Document root showing up instead of redmine site - Added by Sunny Jassal over 7 years ago

database.yml:

production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: MYPASSWORD
encoding: utf8

development:
adapter: mysql
database: redmine_development
host: localhost
username: root
password:
encoding: utf8

test:
adapter: mysql
database: redmine_test
host: localhost
username: root
password:
encoding: utf8

test_pgsql:
adapter: postgresql
database: redmine_test
host: localhost
username: postgres
password: "postgres"

test_sqlite3:
adapter: sqlite3
database: db/test.sqlite3

RE: Document root showing up instead of redmine site <SOLVED> - Added by Sunny Jassal over 7 years ago

For anyone looking at this post. I got this to work by adding

RailsEnv production
RailsBaseURI /redmine

to apache2.conf file.

Also, I changed permissions via:
sudo chown -R root:root redmine
sudo chown -R root:root redmine-YOURVERSION

Also enable passenger:
sudo a2enmod passenger

(1-7/7)