Passenger is not displaying 404 page in production

23 views
Skip to first unread message

Joshua Partogi

unread,
Jun 1, 2010, 9:46:50 AM6/1/10
to phusion-...@googlegroups.com
Hi all,

I am currently running passenger 2.2.12 in production. When an
ActiveRecord::RecordNotFound exception is raised, rails is not
displaying the 404 page. This is a bit awkward because when I tried in
my local machine with rails production environment parameter being
passed, a 404 page will be displayed when an
ActiveRecord::RecordNotFound exception is raised. I also tried the
same test case with thin and it works. Is there anything that I need
to configure in passenger to display the 404 page from the public
folder?

Thank you so much for the assistance.

Kind regards,
Joshua

--
http://twitter.com/scrum8

Hongli Lai

unread,
Jun 3, 2010, 5:42:46 AM6/3/10
to phusion-...@googlegroups.com
On Tue, Jun 1, 2010 at 3:46 PM, Joshua Partogi <joshua....@gmail.com> wrote:
> Hi all,
>
> I am currently running passenger 2.2.12 in production. When an
> ActiveRecord::RecordNotFound exception is raised, rails is not
> displaying the 404 page. This is a bit awkward because when I tried in
> my local machine with rails production environment parameter being
> passed, a 404 page will be displayed when an
> ActiveRecord::RecordNotFound exception is raised. I also tried the
> same test case with thin and it works. Is there anything that I need
> to configure in passenger to display the 404 page from the public
> folder?

Works fine for me on both Mongrel and Phusion Passenger. What do you
see instead of the 404 page?

--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)

Joshua Partogi

unread,
Jun 3, 2010, 7:47:45 AM6/3/10
to Phusion Passenger Discussions
Hi Hongli Lai,

Thank you very much for your swift response. I am seeing Rails
exception page. Is there anything else I need to setup? I am using
nginx in production with passenger.

Kind regards,
Joshua

On Jun 3, 2:42 am, Hongli Lai <hon...@phusion.nl> wrote:
> On Tue, Jun 1, 2010 at 3:46 PM, Joshua Partogi <joshua.part...@gmail.com> wrote:
> > Hi all,
>
> > I am currently running passenger 2.2.12 in production. When an
> > ActiveRecord::RecordNotFound exception is raised, rails is not
> > displaying the 404 page. This is a bit awkward because when I tried in
> > my local machine with rails production environment parameter being
> > passed, a 404 page will be displayed when an
> > ActiveRecord::RecordNotFound exception is raised. I also tried the
> > same test case with thin and it works. Is there anything that I need
> > to configure in passenger to display the 404 page from the public
> > folder?
>
> Works fine for me on both Mongrel and Phusion Passenger. What do you
> see instead of the 404 page?
>
> --
> Phusion | The Computer Science Company
>
> Web:http://www.phusion.nl/
> E-mail: i...@phusion.nl

Joshua Partogi

unread,
Jun 3, 2010, 8:16:47 AM6/3/10
to Phusion Passenger Discussions
Hi Hongli Lai,

The example is shown here:
http://demo.projexionist.com/projects/PR/features/2



On Jun 3, 2:42 am, Hongli Lai <hon...@phusion.nl> wrote:
> On Tue, Jun 1, 2010 at 3:46 PM, Joshua Partogi <joshua.part...@gmail.com> wrote:
> > Hi all,
>
> > I am currently running passenger 2.2.12 in production. When an
> > ActiveRecord::RecordNotFound exception is raised, rails is not
> > displaying the 404 page. This is a bit awkward because when I tried in
> > my local machine with rails production environment parameter being
> > passed, a 404 page will be displayed when an
> > ActiveRecord::RecordNotFound exception is raised. I also tried the
> > same test case with thin and it works. Is there anything that I need
> > to configure in passenger to display the 404 page from the public
> > folder?
>
> Works fine for me on both Mongrel and Phusion Passenger. What do you
> see instead of the 404 page?
>
> --
> Phusion | The Computer Science Company
>
> Web:http://www.phusion.nl/
> E-mail: i...@phusion.nl

Hongli Lai

unread,
Jun 3, 2010, 8:21:51 AM6/3/10
to phusion-...@googlegroups.com
On Thu, Jun 3, 2010 at 1:47 PM, Joshua Partogi <joshua....@gmail.com> wrote:
> Hi Hongli Lai,
>
> Thank you very much for your swift response. I am seeing Rails
> exception page. Is there anything else I need to setup? I am using
> nginx in production with passenger.

Rails always displays an exception page if it detects that the request
is coming from localhost.

--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl

Joshua Partogi

unread,
Jun 3, 2010, 8:46:50 AM6/3/10
to Phusion Passenger Discussions
That is awkward. How could that be? This is deployed on remote host.
Rails would detect a request coming from localhost if the host is
localhost or 127.0.0.1.

Regards,
Joshua

On Jun 3, 5:21 am, Hongli Lai <hon...@phusion.nl> wrote:
> On Thu, Jun 3, 2010 at 1:47 PM, Joshua Partogi <joshua.part...@gmail.com> wrote:
> > Hi Hongli Lai,
>
> > Thank you very much for your swift response. I am seeing Rails
> > exception page. Is there anything else I need to setup? I am using
> > nginx in production with passenger.
>
> Rails always displays an exception page if it detects that the request
> is coming from localhost.
>
> --
> Phusion | The Computer Science Company
>
> Web:http://www.phusion.nl/
> E-mail: i...@phusion.nl
Reply all
Reply to author
Forward
0 new messages