Apache2+Passenger在Ubuntu上部署-创新互联

先 安装RVM Ruby Rails

目前创新互联已为上1000家的企业提供了网站建设、域名、网络空间、网站托管维护、企业网站设计、大庆网站维护等服务,公司将坚持客户导向、应用为本的策略,正道将秉承"和谐、参与、激情"的文化,与客户和合作伙伴齐心协力一起成长,共同发展。

1. Install Apache2

sudo apt-get install apache2

2. Install Passenger
gem install passenger

3. 将passenger集成进Apache
passenger-install-apache2-module

4. 将步骤3安装成功后的提示信息加入Apach3 配置文件/etc/apache2/httpd.conf,如果没有,创建一个
LoadModule passenger_module /home/abbuggy/.rvm/gems/ruby-1.9.2-p320/gems/passenger-3.0.18/ext/apache2/mod_passenger.so PassengerRoot /home/abbuggy/.rvm/gems/ruby-1.9.2-p320/gems/passenger-3.0.18 PassengerRuby /home/abbuggy/.rvm/wrappers/ruby-1.9.2-p320/ruby

5. 配置根目录和端口号,/etc/appach3/httpd.conf 例如
ServerName localhost

ServerName localhost:80 # !!! Be sure to point DocumentRoot to 'public'!
DocumentRoot /var/www//public
/public> # This relaxes Apache security settings.
AllowOverride all # MultiViews must be turned off.
Options -MultiViews

6. 在apache2.conf 文件中,添加 # Include all the user configurations:
Include httpd.conf
重启Apache 服务
service apache2 restart

7. 查看日志
tail -f /var/log/apache2/access.log
tail -f /var/log/apache2/error.log

8. 修改端口
/etc/apache2/httpd.conf
/etc/apache2/ports.conf

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


文章题目:Apache2+Passenger在Ubuntu上部署-创新互联
转载注明:http://scyanting.com/article/ddsiso.html