forgot password?


   
 
[SOLVED] Installing on a subdir with Apache
Posted: 16 September 2010 11:08 AM   [ Ignore ]  
Newbie
Rank
Total Posts:  16
Joined  2010-07-27

Hi

I’ve been trying to install tracks on a subdir. I can’t use a virtual host (my server is already one). Try as I might, all I’ve managed was to get it working but with no images and CSS. I’ve searched around but can’t find someone that got it working in the end. They either give up (or don’t report report how got it working) or use virtual host.

I’m using Ubuntu 10.04, Apache, MySQL and Tracks 1.7.

Thanks in advance

Profile
 
 
Posted: 20 September 2010 07:37 AM   [ Ignore ]   [ # 1 ]  
Sr. Member
RankRankRankRank
Total Posts:  882
Joined  2006-10-05

How are you delegating from apache to tracks? Are you using passenger? Or are you running tracks as a separate server?

Profile
 
 
Posted: 21 September 2010 06:22 PM   [ Ignore ]   [ # 2 ]  
Newbie
Rank
Total Posts:  16
Joined  2010-07-27
Reinier Balt - 20 September 2010 07:37 AM

How are you delegating from apache to tracks? Are you using passenger? Or are you running tracks as a separate server?

No, tracks is running on apache only. I tried to configure apache with

Alias /tracks /var/www/tracks
<Directory /var/www/tracks>
        
Options +FollowSymLinks
        AllowOverride All
        order allow
,deny
        allow from all
</Directory

I’ve also uncommented

subdir"/tracks" 

on site.yml.

I also tried to remove the space between ‘‘subdir:’’ and ‘‘“tracks’‘. The furthest I got was a log in window with no graphcis.

Profile
 
 
Posted: 21 September 2010 09:16 PM   [ Ignore ]   [ # 3 ]  
Sr. Member
RankRankRankRank
Total Posts:  882
Joined  2006-10-05

how is it running on apache? fcgi?
In that case you need to change the .htaccess to get it working with subdirs. There are some examples floating around on forum.

Profile
 
 
Posted: 22 September 2010 03:37 PM   [ Ignore ]   [ # 4 ]  
Newbie
Rank
Total Posts:  16
Joined  2010-07-27
Reinier Balt - 21 September 2010 09:16 PM

how is it running on apache? fcgi?
In that case you need to change the .htaccess to get it working with subdirs. There are some examples floating around on forum.

No. I’m using passenger. What do I need to do in that case?

Here’s the things I’ve tried


1 - Configure apache
On ‘’/etc/apache2/sites-available/default’’ I have

Alias /tracks"/var/www/tracks/public/"
    
<Directory "/var/www/tracks/public">
        
Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow
,deny
        allow from all
    
</Directory

2 - Edit site.yml
If I edit ‘‘config/site.yml’’ and uncomment

subdir"tracks" 

The error I get on the browser is

Application error
Rails application failed to start properly

Looking into apache error logs I have

Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit if necessary. Use ‘LogLevel debug’ to get a backtrace.

3 - Edit htaccess
If after this, on ‘‘public/.htaccess’’ I add the line

RewriteBase /tracks 

I get the contents of ‘‘public/dispacth.fcgi’’ on the browser

Profile
 
 
Posted: 23 September 2010 06:59 AM   [ Ignore ]   [ # 5 ]  
Sr. Member
RankRankRankRank
Total Posts:  882
Joined  2006-10-05

if you are using passenger, you can delete .htaccess. This file is used by CGI or fCGI

in your passenger config, you need to set the subdir too. See http://www.modrails.com/documentation/Users guide.html#deploying_rails_to_sub_uri

Profile
 
 
Posted: 23 September 2010 11:15 AM   [ Ignore ]   [ # 6 ]  
Newbie
Rank
Total Posts:  16
Joined  2010-07-27

Thank you very much! This solved my problem. It was much simpler than I thought. I wrote an howto on the Tracks wiki and another on the Ubuntu forums.

Profile
 
 
Posted: 24 September 2010 12:05 PM   [ Ignore ]   [ # 7 ]  
Sr. Member
RankRankRankRank
Total Posts:  882
Joined  2006-10-05

great! thanks

Profile