Nginx Error File - Unable to guess which file it calls
A line in, sites-available/site.conf
Code:
error_page 404 404.html Site is working without any problem But if i type some wrong url, it is not showing File is not available. 404.html has that line. I changed the error_page to 404.php and i deleted 404.html from server But i am still getting the same error message for wrong urls I did a grep -r "File is not available" / I didnt get any output. Where does the error message comes from? |
Hi,
The correct notation is Code:
error_page 404 /404.php; Regards |
Thanks a lot. A slash changed everything.
I was wasting a lot of time :) I tried to check site.com/wrongurl.some_ext. It is working correctly. I tried to check again site.com/some_folder/wrong_url It works, but the styles are gone. |
Code:
<link type="text/css" media="all" href="../style.css" rel="stylesheet"> Is there a way to fix it on the nginx config? I need to set one more error page for images. uploads/2013(year)/month/date/image.gif|jpg|png -> if the image is not found i need to show unavailable image. But i already have Code:
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ { I have done this image error page properly. |
I have a problem with error rewrite.
It shows the error page when the url is not related with .php site.com/err.php is still showing "File not found" text. site.com/any.extention shows error page! Where does it call this "file not found" text? If it is a php call, then it throws the following error in nginx/error.log Code:
Code:
Internet explorer is showing "Most likely causes: •There might be a typing error in the address. •If you clicked on a link, it may be out of date. " |
fastcgi_intercept_errors on
it solved the problem. Thanks for your help. Code:
location ~ ^/uploads/(\d+)/(\d+)/(\d+)/(\d+)/(.*)$ { I want to show that missing.gif if only the file is not available. |
All times are GMT -5. The time now is 11:43 PM. |