SEF / Friendly URL - 404 Page not found

vmbeliz nginx-forum at nginx.us
Fri Nov 6 01:00:50 UTC 2015


Hi guys, 
Please i need help.
i have a server with Centos 6.5 + Nginx + PHP-FPM.
I use a website with joomla.
I configured to use Friendly url (SEF) in joomla, and worked, but if i enter
something that do not exist like www.example.com/asdasdad, so the server
redirect me back to index (www.example.com); but should show me the joomla
error page. If i disable the SEF, and test, so i can see the joomla error
page. What i need to do ?

I'll send my vhost.conf.

#####################
VHOST.CONF:

server {
        server_name  example.com;
        return 301 $scheme://www.example.com$request_uri;
}

 server {
listen       80;
server_name  www.example.com;
    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;
    root /usr/share/nginx/html;

    location / {
        index index.html index.htm index.php;
        try_files $uri $uri/ /index.php?$args;
autoindex on;
   }

    location ~ \.php$ {
        try_files $uri =404;
        include /etc/nginx/fastcgi_params;
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME
/usr/share/nginx/html$fastcgi_script_name;
  fastcgi_connect_timeout        120;
  fastcgi_send_timeout          500;
  fastcgi_read_timeout          500;
  fastcgi_buffer_size          128k;
  fastcgi_buffers            4 256k;
  fastcgi_busy_buffers_size    256k;
  fastcgi_temp_file_write_size 256k;

 fastcgi_param PHP_VALUE "
        post_max_size=50M
        upload_max_filesize=50M
        ";
   }
}
###############################

Thank you all!

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,262625,262625#msg-262625



More information about the nginx mailing list