[英]Ruby on rails running multiple apps one server and ip
I own my own testing sever and was wondering how you would go about hosting two apps with two different domains names that they are linked to. 我拥有自己的测试服务器,并想知道如何托管两个链接有两个不同域名的应用程序。 I am using passenger with apache2.
我正在使用apache2的乘客。
At this point I need to keep the code separate for each app, as a proof of concept. 在这一点上,我需要将每个应用程序的代码分开,作为概念证明。 I have the first on set up with these settings in the conf file.
我首先在conf文件中设置了这些设置。
<VirtualHost *:80>
ServerName website.camp
ServerAlias www.website.camp
ServerAdmin webmaster@localhost
DocumentRoot /home/ruby/app_name/public
RailsEnv development
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory "/home/ruby/app_name/public">
Options FollowSymLinks
Require all granted
</Directory>
</VirtualHost>
And I am not sure if this is at all a good idea. 而且我不确定这是否是个好主意。 Any opinions and comments would be much appreciated.
任何意见和评论将不胜感激。
virtual host
指令是我一直在寻找的答案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.