今天下载了InstantRails,解压,启动server,cookbook和typo都能正常的访问。
于是打开instanRails目录,了解他的结构。
看了下apache/conf/下的httpd.conf文件,发现cookbook和typo都是通过设置apache的虚拟主机定义的。
但是却没有看到配置虚拟主机的DocumentRoot参数。
两个例子程序中htaccess文件 也没有看到相关配置。
想请问高人这个rails程序难道是个妖怪,不用配置DocumentRoot?
[b]问题补充:[/b]
to:open2ye 如果只负责代理。
那么就是在mongrel中定义的。可是我也是没有找到相应定义。能否说明mongrel是如何找到instantRailes\rails_apps\cookbook作为主目录的。谢谢。
看似
InstantRails-2.0-win
目录约定
InstantRails-2.0-win\rails_apps\project_name
所置
x:\InstantRails-2.0-win\conf_files\httpd.conf
[code="java"]
ServerName www.mycookbook.com
ProxyPass / http://localhost:3001/
ProxyPassReverse / http://localhost:3001
[/code]
这里apache 只负责代理, 所以不用 DocumentRoot