Set mongrel cluster and apache for myShareBook.cn
5. 将mods-available下的如下文件移到mods-enabled下
6. 打开apache2.conf以下几行没有被注释
新加一行:
7. 进入rails app目录,执行
看到此信息说明成功
修改mongrel_cluster.yml
保存退出
8.进入rails app目录,执行
看到如下信息说明成功
9. 启动apache
10. 在浏览器输入http://localhost/,看能否访问你的rails运用
如有兴趣,欢迎过来测试一下实际效果
[url=http://mysharebook.cn/]交换闲置书籍[/url]
1. Insall mongrel
2. Install apache
3. Create file in apache_root/myConf/my_share_book.conf
4. Config apache_conf
5. 将mods-available下的如下文件移到mods-enabled下
proxy.load
proxy.conf
proxy_http.load
proxy_balancer.load
rewrite.load
6. 打开apache2.conf以下几行没有被注释
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
Include /etc/apache2/sites-enabled/
新加一行:
Include /etc/apache2/myConf/my_share_book.conf7. 进入rails app目录,执行
mongrel_rails cluster::configure看到此信息说明成功
Writing configuration file to config/mongrel_cluster.yml.修改mongrel_cluster.yml
---
group: mysharebook.cn
address: 127.0.0.1
log_file: log/mongrel.log
port: "8000"
cwd: /var/www/apps/bookShare
environment: production
user: mysharebook.cn
pid_file: /var/www/apps/bookShare/tmp/pids
servers: 10
保存退出
8.进入rails app目录,执行
mongrel_rails cluster::start看到如下信息说明成功
starting port 8000
starting port 8001
starting port 8002
starting port 8003
starting port 8004
starting port 8005
starting port 8006
starting port 8007
starting port 8008
starting port 8009
9. 启动apache
sudo /etc/init.d/apache2 restart10. 在浏览器输入http://localhost/,看能否访问你的rails运用
如有兴趣,欢迎过来测试一下实际效果
[url=http://mysharebook.cn/]交换闲置书籍[/url]
本文详细介绍了如何使用Mongrel和Apache部署Rails应用的具体步骤,包括安装Mongrel集群、配置Apache等,并提供了启动服务的示例。
229

被折叠的 条评论
为什么被折叠?



