Installation Issues on Dreamhost
Added by Andrew Hamilton almost 2 years ago
I'm hoping someone here can help me. I've installed Redmine on my DreamHost shared hosting account using the instructions here: http://www.redmine.org/wiki/redmine/RedmineInstall
Everything seemed to go well except I can't access the site unless I run 'ruby script/server -e production' to load up WEBrick, and then I can only access the site using port 3000, http://projects.mydomain.tld:3000. If I visit the installation with and without WEBrick running at http://projects.mydomain.tld, I get the following error:
Application error
Rails application failed to start properly
The WEBrick process seems to get killed every 5 or 10 minutes on the server, and I received an email from the DreamHost Policy Bot telling me the 'ruby script/server -e production' is against their policies, as they think it is a DoS attack script.
How can I get Redmine to run on my DreamHost account using the standard Apache server, or port 80, without needing to manually load WEBrick?
I know it can be done, as it appears to be working here on DreamHost: http://redmine.sofanaranja.com/
Thanks in advance,
/ Hami
Replies (4)
RE: Installation Issues on Dreamhost - Added by Andrew Hamilton almost 2 years ago
After talking with DreamHost Support I got it working, I was 90% there.
http://wiki.dreamhost.com/Ruby_on_Rails#Transferring_an_Existing_Rails_App
I thought some other users getting stuck might find this helpful.
After the installation I needed to do the following steps:
- Login into my DreamHost Shell Account
- Run
ruby redmine - Copy the
dispatch.fcgi,dispatch.rband for completenessdispatch.cgifromredmine/public/created in the root of your account to thepublicfolder of your actual Redmine installation - Change the permissions of the files you've just copied.
chmod 755 publicandchmod 755 public/dispatch.* - Got to your Redmine in browser, and all should be working.
/ Hami
RE: Installation Issues on Dreamhost - Added by Andrew Hamilton almost 2 years ago
Sorry - Step 2 is wrong, it should be:
2. Run rails redmine
/ Hami
RE: Installation Issues on Dreamhost - Added by Andrew Hamilton almost 2 years ago
To further this, you also need to replace the .htaccess file for the one that rail redmine creates.
The file should look like this:
# General Apache options
AddHandler fastcgi-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI
# If you don't want Rails to look in certain directories,
# use the following rewrite rules so that Apache won't rewrite certain requests
#
# Example:
# RewriteCond %{REQUEST_URI} ^/notrails.*
# RewriteRule .* - [L]
# Redirect all requests not available on the filesystem to Rails
# By default the cgi dispatcher is used which is very slow
#
# For better performance replace the dispatcher with the fastcgi one
#
# Example:
# RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
RewriteEngine On
# If your Rails application is accessed via an Alias directive,
# then you MUST also set the RewriteBase in this htaccess file.
#
# Example:
# Alias /myrailsapp /path/to/myrailsapp/public
# RewriteBase /myrailsapp
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
# In case Rails experiences terminal errors
# Instead of displaying this message you can supply a file here which will be rendered instead
#
# Example:
# ErrorDocument 500 /500.html
ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
You also need to repeat this whole procedure when you upgrade Redmine.
/ Hami
RE: Installation Issues on Dreamhost - Added by Travis Cunningham about 1 year ago
It looks like you have to login to your Dreamhost control panel and make sure you have fastcgi enabled for the domain as well.
(1-4/4)