开发者

Where to store Rails sites on an Apache server?

开发者 https://www.devze.com 2023-02-14 01:19 出处:网络
I successfully installed passenger on my Apache server and have a rails site running successfully. I\'m very new to server management, and I have a very simple question that I开发者_开发百科 can\'t se

I successfully installed passenger on my Apache server and have a rails site running successfully. I'm very new to server management, and I have a very simple question that I开发者_开发百科 can't seem to find an answer to. Where to store my Rails apps? I understand Passanger can reach applications anywhere on the server, so where should the apps be?


I haven't been able to find any one agreed on universal answer to this. Create a user and store in that home dir seems reasonable to me.

Another philosophy is that it should be a systemwide location and there's a reasonable logic behind that too, especially if there are several administrators of the system.

My practice is to install Apache via RPM packages (on CentOS Linux) and deploy Rails apps to Apache's default dir of /var/www/application_name.


Debian's passenger install recommends installing your app to /usr/share/%APP%/ and symlinking the /public dir of the app to /var/www or a subdirectory. I like this method for its cleanliness, though it is a fair bit more work than pretty much every other method out there.


create a user for your apps is a good practice , i will usualy setup a "rails" user .
store the production apps in /home/rails/ remmeber that passenger exec your app with the grant of the files your code belongs!
it's also helpfull if you use rvm.
here an article with some reference

have a nice day

0

精彩评论

暂无评论...
验证码 换一张
取 消