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:
*2037 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream
Code:
server_name .site.com;
root /var/www/site.com;
error_page 404 /404.php;
access_log /var/log/nginx/site.access.log;
index index.html index.php;
if ($http_host != "www.site.com") {
rewrite ^ http://www.site.com$request_uri permanent;
}
location ~* \.php$ {
# try_files $uri = 404;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:xxxx;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_read_timeout 240;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
chrome and firefox are showing "File not found."
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.
"