收录日期:2020/05/27 18:09:33 时间:2009-08-07 16:05:03 标签:ruby-on-rails

I had issues when I tried to deploy my Rails site

when i start mongrel and start my app and rewrite and start with Apache

the application has ben displayed

but when i link to http://myapp.com/account/login

Not Found

The requested URL /account/login was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

when i try default myapp.com:12007/

it was normal, i can link

what is the problem ?

just for information

the problem is @ .httaccess file

@ folder public_html/

just need edited like this :

RewriteEngine on
RewriteCond %{HTTP_HOST} ^myapp.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.myapp.com$
RewriteRule ^.*$ "http\:\/\/127\.0\.0\.1\:12007%{REQUEST_URI}" [P,QSA,L]

Try add NameVirtualServer *:12007 to the end of your apache2.conf file