Welcome! Log In Create A New Profile

Advanced

error_page without content type

Svoop
May 14, 2013 05:50PM
Hi

I'm setting a custom 404 page with:

server {
...
error_page 404 /errors/not-found.html;
}

And the page looks as follows:

<!DOCTYPE html><html lang="de"><head><meta charset="utf-8" /><link
href="/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon"
/><link href="/assets/application-5432c43a667ce7273e0604560a540d71.css"
media="all" rel="stylesheet" type="text/css" /></head><body><div
id="main"><div id="page"><img alt="Wmkt-logo"
src="/assets/wmkt-logo-fdb0e2494a44ea8b38242b1bf1ae5f9a.png" /><br /><br
/><h2>Seite nicht gefunden</h2><p>Die angeforderte Seite existiert
nicht.</p><hr /><h2>Page non trouvée</h2><p>Cette page n'éxiste pas.</p><hr
/><h2>Page Not Found</h2><p>This page does not exist.</p><hr
/></div></div></body></html>

This is what I get with "curl -i http://wemakeit.ch/cache/doesnotexist":

HTTP/1.1 404 Not Found
Transfer-Encoding: chunked
Connection: keep-alive
Keep-Alive: timeout=20
Status: 404 Not Found
X-Request-Id: 6fc3d91efbddf9a5f9dbf32f6d4aff32
X-Runtime: 0.002343
Date: Tue, 14 May 2013 21:46:48 GMT
X-Rack-Cache: miss
X-Content-Type-Options: nosniff
X-Powered-By: Phusion Passenger 4.0.2
Server: nginx/1.2.6 + Phusion Passenger 4.0.2

There's not Content-Type header, which is why Chrome shows the page source
instead of rendering the HTML.

Any idea what I'm doing wrong here?

Thanks!

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

error_page without content type

Svoop May 14, 2013 05:50PM

Re: error_page without content type

Richard Stanway May 14, 2013 06:10PM

Re: error_page without content type

Svoop May 15, 2013 07:22AM

Re: error_page without content type

Andre Jaenisch May 15, 2013 09:10AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 310
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready