passenger - Multiple Ruby apps on one port, RackBaseURI help -


i'm trying 2 ruby apps work same port. don't know server technology @ all, forgive ignorance. i've tried follow doc:

http://www.modrails.com/documentation/users%20guide%20apache.html

sections 4.1 - 4.3, keep messing up. i've tried simplify little, here situation. have 2 simple rackup apps here:

/users/dan/webapps/test1 /users/dan/webapps/test2

they each have "config.ru" file, public/ folder, , tmp/ folder "restart.txt", directed. both work on own.

i have following in httpd.conf file:

<virtualhost *:80>   servername localhost   documentroot /users/dan/webapps   <directory /users/dan/webapps>       allow   </directory>   rackbaseuri /test1   <directory /users/dan/webapps/test1>     options -multiviews   </directory>   rackbaseuri /test2   <directory /users/dan/webapps/test2>     options -multiviews   </directory> </virtualhost> 

i start apache, , put in browser: http://localhost/test1. get:

forbidden

you don't have permission access /test1 on server.

i'm not surprised doesn't work, because supposed set symlink don't know how apply setup. here example doc:

ln -s /webapps/rackapp/public /websites/phusion/rack

can tell me how set symlinks, , let me know if see else wrong? please give "for dummies" answer, stuff boggles mind. thanks!

to create symlinks, try this:

ln-s /users/dan/webapps/test1 /users/dan/webapps/test1/public ln-s /users/dan/webapps/test2 /users/dan/webapps/test2/public 

however, chris polzer mentioned, should check apache user can read directories.

if don't know how that, post output of these commands:

ls -l /users/dan/webapps/test1 ls -l /users/dan/webapps/test2. ps -aux | grep http ps -aux | grep apache 

you may need check permissions of parent directories. i.e. /users, /users/dan, , /users/dan/webapps. see: http://www.modrails.com/documentation/users%20guide%20apache.html#_deploying_to_a_virtual_host_8217_s_root_2


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -