[問題] apache 與 mongrel 連結
我現在的情況是 apache 本身有網站在執行,
然後我新增的 mongrel 實體來跑我的程式時,
我的設定會把 http://localhost/ 整個轉到 mongrel 下,
但是我想要的情況是 http://localhost/myapp/ 才會轉到我的 mongrel 下,
請問要怎麼設定我的 virtual host 才可以這樣跑,
或者是說有別種的方法來實現我的架構?
以下是我的 virtual host 的設定
<VirtualHost *:80>
AddDefaultCharset utf-8
ServerName *
DocumentRoot C:\ruby\workspace\myapp\public
ErrorDocument 500 /500.html
ErrorDocument 404 /404.html
ProxyPass / http://localhost:4000/
ProxyPassReverse / http://localhost:4000/
ProxyPass /images !
ProxyPass /stylesheets !
ProxyPass /javascripts !
#continue with other static files that should be served by apache
Alias /images C:\ruby\workspace\myapp\public\images
Alias /stylesheets C:\ruby\workspace\myapp\public\stylesheets
Alias /javascripts C:\ruby\workspace\myapp\public\javascripts
#continue with aliases for static content
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Directory C:\ruby\workspace\myapp\public\>
Options Indexes FollowSymLinks
Order allow,deny
allow from all
</Directory>
</VirtualHost>
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 219.86.97.171
推
09/10 01:10, , 1F
09/10 01:10, 1F
推
09/10 01:46, , 2F
09/10 01:46, 2F
→
09/10 01:47, , 3F
09/10 01:47, 3F
推
09/10 02:07, , 4F
09/10 02:07, 4F
→
09/10 02:08, , 5F
09/10 02:08, 5F
→
09/10 02:10, , 6F
09/10 02:10, 6F
→
09/10 02:11, , 7F
09/10 02:11, 7F
推
09/10 02:24, , 8F
09/10 02:24, 8F
推
09/10 02:29, , 9F
09/10 02:29, 9F
推
09/10 02:33, , 10F
09/10 02:33, 10F
推
09/10 02:35, , 11F
09/10 02:35, 11F
→
09/10 02:36, , 12F
09/10 02:36, 12F
→
09/10 02:36, , 13F
09/10 02:36, 13F
→
09/10 02:36, , 14F
09/10 02:36, 14F
→
09/10 12:16, , 15F
09/10 12:16, 15F
※ 編輯: dream1129 來自: 219.86.99.66 (09/10 14:19)
討論串 (同標題文章)
Ruby 近期熱門文章
PTT數位生活區 即時熱門文章