This forum is no longer active. Please post your questions to our new community site
Rewriting the Redmine URL on Windows
|
|
Hi, I have a Redmine installation running on Windows Server 2008. The default BitNami native installation works perfectly but I would like to do as so many others on this forum have done: I would like my users to be able to access http://myserver/ rather than http://myserver/redmine/. I have followed the instructions found in this post http://bitnami.com/forums/forums/redmine/topics… with no success. At one point I managed to get Redmine to load in the browser (from http://myserver/) but with no stylesheets or javascript. When this happened, the Apache error log contained several lines similar to “No protocol handler was valid for the URL /favicon.ico. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.” I am not very familiar with using .htaccess and seem to be completely unable to fathom this problem out. Can someone with a working solution on Windows please walk me through the process step by step (including which files need to be altered)? Many thanks, |
|
|
Could you check in the Apache extensions if the rewrite modules are enabled? Check you /apache2/conf/httpd.conf file that the following lines are not commented:
|
|
|
Hi beltran, I’ve checked the httpd.conf file and all the rewrite modules are are enabled. As I mentioned above, I did manage to get the rewrite to work by doing the following: 1. changed /apps/redmine/conf/redmine.conf file (note: I added the spaces after http:// below so that the text would be displayed and not mangled by the forum) to: ProxyPass / balancer://redminecluster ProxyPassReverse / balancer://redminecluster <Proxy balancer://rubystackcluster> BalancerMember http:// 127.0.0.1:3001 BalancerMember http:// 127.0.0.1:3002 </Proxy> 2. Edited the /apps/redmine/scripts/serviceinstall.bat and removed the prefix entry " —prefix /redmine" 3. Reinstalled and restarted the services. When I go to http://localhost/ I can see the contents of the Redmine application home page but it isn’t formatted at all by the CSS; the page looks very old school: in other words, it displays as a simple list of links, with an editbox. Looking in the Apache error log I have the following lines: This suggests that something is missing from the Apache.conf file or the redmine.conf. My guess is that Apache knows how to handle the rewrites for the *.html files but not the rest (i.e. *.css, *.js, *.htc, etc.). I’ve also noticed that clicking on any of the links on the Redmine home page generates a “500 Internal Server Error” with an error message of: Internal Server Error |
|
|
The following line have an extra space “BalancerMember http:// 127.0.0.1:3001”. It should not have any space between http:// and 127.0.0.1:3001. |
|
|
Hi beltran, Yes I know about the extra spaces – I did it deliberately so that the forum can display it. As I said above, the extra spaces do not exist in my actual redmine.conf file…. |
|
|
Oh sorry. Have you tried other configuration posted in the same thread? |
|
|
Yep, I’ve tried them all. No dice! I still think that it’s got something to do with the .conf files but really don’t know mod_rewrite well enough to work it out on my own. |
|
|
Right, I’ve finally managed to get this working through sheer trial and error! Most of it is based on the examples found in the thread http://bitnami.com/forums/forums/redmine/topics… but with several errors corrected and some stuff removed. If you’re running a native BitNami Redmine installation on Windows and you want to change the way that you access the Redmine web pages from http://your_server_name/redmine to http://your_server_name then you should follow these steps: 1) Stop and uninstall the BitNami Redmine Stack services: > CD \<installdir> 2) Edit <installdir>/apps/redmine/scripts/serviceinstall.bat and remove the prefix entry " —prefix /redmine" 3) Edit <installdir>/apps/redmine/conf/redmine.conf file so that it looks like the following:
<VirtualHost *:80>
ServerAdmin webmaster@your_server_name
ServerName your_server_name.your_domain_name.local
ServerAlias your_server_name
# this not only blocks access to .svn directories, but makes it
# appear as though they aren't even there, not just that they are
# forbidden
<DirectoryMatch "^/.*/\.svn/">
ErrorDocument 403 /404.html
Order allow,deny
Deny from all
Satisfy All
</DirectoryMatch>
# This passes through remote_user to mongrel
RewriteEngine On
# Redirect non-static requests to cluster
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://redminecluster%{REQUEST_URI} [P,QSA,L]
</VirtualHost>
ProxyPass / balancer://redminecluster
ProxyPassReverse / balancer://redminecluster
<Proxy balancer://redminecluster>
BalancerMember http:// 127.0.0.1:3001
BalancerMember http:// 127.0.0.1:3002
</Proxy>
4) Install and restart the BitNami Redmine Stack services: > CD \<installdir> PLEASE NOTE: Also, I’m pretty sure that the <DirectoryMatch “^/.*/\.svn/”> bit can be left out if you have no intention of upgrading your Redmine installation to the latest Redmine trunk. |
|
|
Thanks for posting the solution, I’m sure that this will be helpful for other users. |
|
|
Thank you very much Cord for your detailed post, I got it working this way. I’d like to re-emphasize what got it working for me: No trailing slash in the BalancerMember lines. (Otherwise, every request will be a 404 served by the app.) |
|
|
That is all good now. But how to access phpMyAdmin when redmine is linked to the root directory? |
|
|
While I am still interested in your solution, here is my version of it: in apps/phpmyadmin/conf/phpmyadmin.conf add this block: so if you access localhost it will redirect you to phpmyadmin, otherwise to redmine |
|
|
Thanks for posting your solution. |
|
|
I’m running redmine on BitNami RubyStack on windows 7 and I try your solution for configure phpmyadmin I change DocumentRoot but no sucess! ICan you help me? |
|
|
Hi, Take a look at the following guide to know how to change the Redmine URL. I hope it helps |
|
|
Hi, I already follow the guide and I manage to set redmine on default URL but then I can’t acess phpmyadmin. I also try antulik posted solution for configure phpmyadmin but no sucess. |
|
|
I have to poste my solution! I just change redmine.conf like this ProxyPass /redmine balancer://redminecluster <Proxy balancer://redminecluster> and I edit /apps/redmine/scripts/serviceinstall.bat and remove the prefix entry " —prefix /redmine" and make > CD \ and > CD \ now my redmine is running on localhost:3001 and I can sill access phpmyadmin on localhost/phpmyadmin. Regards |
|
|
Thanks for posting your solution. This will be helpful for other BitNami users. |

