PDA

View Full Version : linking rails application to web directory


SHY
09-07-2006, 11:07 PM
hey, my shared hosting allows me to run rails from shell, but the admin recommended me to not place the application within the web directory. actually, this is how the dir structure looks like after i log in:

/logs
/sub
/web
/rails

logs is clear, sub contains subdomain dirs (as soon as i create /sub/my, i can easily access my.domain.com), web is the main www directory and rails contains my rails application (rails/mydomain/* to be precise).

the thing is that i somehow need to link the /sub/dev directory to /rails/mydomain/public, so that when i access dev.domain.com, the rails application appears. i tried to link it using ln -sfn but it gives me "You don't have permission to access / on this server." error. i guess it might be something with .htaccess to do, but i cant really thing of anything smart right now.

any ideas? :(

jkd
09-08-2006, 12:45 AM
From that base directory:
ln -s ./sub/dev ./rails/mydomain/public

maybe?

SHY
09-08-2006, 11:46 AM
yes, that worked ;)

the exact thing i typed was the following (being inside of the /sub directory)

ln -s ../rails/myapp/public dev