Running rails application from subDir on Apache using Passenger

I have already spent several hours trying carefully to find the answer. The guys at Site5, who provide hosting, hit the wall.

What I'm trying to do: run the reils application from playplanit [dot] com / sfcal, and not from playplanit [dot] com /.

Current setting: - The application itself is here: / home / playplan / apps / ppi / current / - In the .htaccess file PassengerEnabled on PassengerAppRoot / home / playplan / apps / ppi / current - Public files are in public_html (previously they were here / home / playplan / apps / ppi / current / public and public_html were a symbolic link, but I changed this because the whole thing is to make this change so that I can run the Wordpress blog in docRoot

What has been tested: - Creating a symbolic link: sfcal / -> / home / playplan / apps / ppi / current / public - Adding RailsBaseURI / sfcal to the .htaccess file - Attempting to change all the "paths" to route.rb Here the route routes are displayed after the ways that I could think of changing where they were changed: http://cl.ly/2N2Q2z0N332v2B2F3r38 - I thought maybe map.root needed to be changed somehow, but couldn’t, and then one of technicians helped me add this line to environment.rb: config.action_controller.relative_url_root = "/ sfcal" - I don’t need to change anything in the httpd.conf file - I also tried to restart the application by creating a restart.txt file in tmp /

, sym- , - , subDir 404, "" .

, ?

!

+3
1

URI URI.

EDIT

, , . public.

, rails, /home/playplan/apps/ppi/current /home/playplan/public_html, Apache:

<VirtualHost *:80>
  ServerName playplanit.com
  DocumentRoot /home/playplan/public_html
  <Directory /home/playplan/public_html>
    Allow from all
  </Directory>
</VirtualHost>

http://playplanit.com/sfcal, :

  • , Apache Options FollowSymLinks AllowOverride Options httpd.conf VirtualHost .

  • sfcal public_html, rails public.

ln -s /home/playplan/apps/ppi/current/public /home/playplan/public_html/sfcal

  • /home/playplan/public_html/.htaccess

    :
    RailsBaseURI /sfcal
    
  • /home/playplan/public_html/sfcal/.htaccess

    Options -MultiViews
    
+1

All Articles