HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine)
Added by Jack Kurzecki almost 15 years ago
For all Windows users wanting to quickly get started using Redmine:
HowTo Install Redmine in a sub-URI on Windows with Apache
This wiki page covers a complete installation process on Windows XP/2003 x86/x64:
- Install Apache HTTP server 2.2.x
- Install MySQL 5.1.x
- Install MySQL GUI Tools for MySQL 5.0
- Install Ruby 1.8.7
- Install RubyGems
- Additional gems
- Install Rake
- Install Rails
- Install Mongrel
- Install mysql gem
- Install mongrel-service + win32-service gems
- Install Redmine
- Setup windows services
- Configure Apache 2.2.x as proxy to Mongrel cluster
Replies (33)
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Diego Felipe about 14 years ago
I am facing the same problem as Grabriela.
But i am using Apache2 and Passenger.
I find this solution under the passenger guide:
Some people experience broken images and other broken static assets when they deploy their application to a sub-URI (i.e. http://mysite.com/railsapp/). The reason for this usually is that you used a static URI for your image in the views. This means your img source probably refers to something like /images/foo.jpg. The leading slash means that it’s an absolute URI: you’re telling the browser to always load http://mysite.com/images/foo.jpg no matter what. The problem is that the image is actually at http://mysite.com/railsapp/images/foo.jpg. There are two ways to fix this.
The first way (not recommended) is to change your view templates to refer to images/foo.jpg. This is a relative URI: note the lack of a leading slash). What this does is making the path relative to the current URI. The problem is that if you use restful URIs, then your images will probably break again when you add a level to the URI. For example, when you’re at http://mysite.com/railsapp the browser will look for http://mysite.com/railsapp/images/foo.jpg. But when you’re at http://mysite.com/railsapp/controller. the browser will look for http://mysite.com/railsapp/controller/images/foo.jpg. So relative URIs usually don’t work well with layout templates.
The second and highly recommended way is to always use Rails helper methods to output tags for static assets. These helper methods automatically take care of prepending the base URI that you’ve deployed the application to. For images there is image_tag, for JavaScript there is javascript_include_tag and for CSS there is stylesheet_link_tag. In the above example you would simply remove the <img> HTML tag and replace it with inline Ruby like this:
<%= image_tag("foo.jpg") %>
This will generate the proper image tag to $RAILS_ROOT/public/images/foo.jpg so that your images will always work no matter what sub-URI you’ve deployed to.
These helper methods are more valuable than you may think. For example they also append a timestamp to the URI to better facilitate HTTP caching. For more information, please refer to the Rails API docs.
Do I really need to refactor all the code?
Thanks.
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Arnaud Martel about 14 years ago
Diego Felipe wrote:
Do I really need to refactor all the code?
I don't think so... My redmine instance works perfectly using apache, passenger and a sub-uri.
I remember that I had the same troubles (on a linux box) until I created THE symbolic link (see passenger's documentation : http://www.modrails.com/documentation/Users%20guide%20Apache.html#deploying_rails_to_sub_uri)
On windows box, there is no symbolic link but you can try to copy your redmine/public folder in your apache root folder. It may solve your problem...
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Diego Felipe about 14 years ago
Arnaud Martel wrote:
I don't think so... My redmine instance works perfectly using apache, passenger and a sub-uri.
It is a relieve know that. I am using linux too(SUSE LSE 11).
Martel, do you mind answer a few questions about your configurations through email? If you don't, mail me diegosps@gmail.com
Thanks in advance.
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Diego Felipe about 14 years ago
Besides all the configurations inside vhosts and mod configs, this is what I did:
I create a symlink from /redmine/public to /htdocs/redmine/public
And also copy all the contents from /redmine/public to /htdocs/redmine
Now everything is displayed correctly, but i don't know the impacts of this configuration.
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Ivan Cenov about 14 years ago
Hi,
Where to find how to install Redmine as apache name-based virtual host? par examaple
http://redmine.mycompany.com
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Mike Kokhanov over 13 years ago
Hello,
I've completed the guide, and it worked perfect, up till I restarted my PC. After that - no activity on my http://localhost:3001 etc.
I wasn't making settings regarding (hope that's not a big deal):
Redmine::Utils::relative_url_root = "/redmine"my configuration:
- Windows Vista
- Apache 2.0.63
- MySQL 5.1.91
- Ruby 1.8.7
- gem list:
- actionmailer (2.3.5)
- actionpack (2.3.5)
- activerecord (2.3.5)
- activeresource (2.3.5)
- activesupport (2.3.5)
- cgi_multipart_eof_fix (2.5.0)
- gem_plugin (0.2.3)
- i18n (0.4.2)
- mongrel (1.1.5 x86-mingw32)
- mongrel_service (0.3.4 i386-mswin32)
- mysql (2.8.1 x86-mingw32)
- rack (1.0.1)
- rails (2.3.5)
- rake (0.9.0)
- rubygems-update (1.3.7)
- win32-service (0.5.2 mswin32)
I did made a named virtual-host proxy config, and it worked for my with my Apache 2.0.63 (I wasn't using balancer here)
%WINDIR\system32\drivers\etc\hosts 127.0.0.1 VHost 127.0.0.1 redmine.local
app.redmine.conf:
<VirtualHost VHost:80> ServerName redmine.local ServerAlias redmine.local <Location /> ProxyPass http://localhost:3001/ ProxyPassReverse http://localhost:3001/ </Location> </VirtualHost>
mongrel service was installed and it's running, RAILS_ENV was configured, but I have nothing, while trying to get to my http://localhost:3001/ any idea, whay I might done wrong?
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Mike Kokhanov over 13 years ago
Ok, I removed everything from my hard drive. Simple delete, the redmine app, was not touched.
I redone every step of the installation guide. But that didn't worked.
What I did to make it work - I had to run the following - I've removed the existing db, and made this step again:
rake db:migrate
And this solved my problem. BUT
I have an hMailServer installed on my local system, PHP default email configuration works fine, and I have my emails. Buy I couldn't make redmine app work with it, I've tried :sendmail, :smtp withour auth, and :smpt with plain auth - and got nothing.
Had anyone made this work? Can you tell how?
Mike Kokhanov wrote:
Hello,
my configuration:
I've completed the guide, and it worked perfect, up till I restarted my PC. After that - no activity on my http://localhost:3001 etc.
I wasn't making settings regarding (hope that's not a big deal):
[...]
- Windows Vista
- Apache 2.0.63
- MySQL 5.1.91
- Ruby 1.8.7
- gem list:
- actionmailer (2.3.5)
- actionpack (2.3.5)
- activerecord (2.3.5)
- activeresource (2.3.5)
- activesupport (2.3.5)
- cgi_multipart_eof_fix (2.5.0)
- gem_plugin (0.2.3)
- i18n (0.4.2)
- mongrel (1.1.5 x86-mingw32)
- mongrel_service (0.3.4 i386-mswin32)
- mysql (2.8.1 x86-mingw32)
- rack (1.0.1)
- rails (2.3.5)
- rake (0.9.0)
- rubygems-update (1.3.7)
- win32-service (0.5.2 mswin32)
I did made a named virtual-host proxy config, and it worked for my with my Apache 2.0.63 (I wasn't using balancer here)
[...]app.redmine.conf:
[...]
mongrel service was installed and it's running, RAILS_ENV was configured, but I have nothing, while trying to get to my http://localhost:3001/ any idea, whay I might done wrong?
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Budi Usman over 13 years ago
Hi All,
Following the guide to the letter and successfully install redmine, but i'am having problem right now.
The redmine db was a backup form another installation using redmine + glassfish which i can't duplicate, so my only solution was using this guide and it work. i can login and access the content, but whenever i try to create a new issue, redmine will throw error like this
Internal error
An error occurred on the page you were trying to access.
If you continue to experience problems please contact your redMine administrator for assistance.
please help me, cause i am really a newbie in ruby and apache config
also how to create a new redmine website using this guide ?
my first redmine web -> http://localhost/mpc
and my second is -> http://localhost/spc
whenever i'll try to access the http://localhost/spc it will always thown to the http://localhost/mpc
any help will be appriciated
- « Previous
- 1
- 2
- Next »