/go returns 404 error (Nginx)

asked Aug 25, 2014 by Chirag De (150 points)
Hi,

I've installed toaster on nginx. I ported the re-writes in .htaccess to nginx but it doesn't seem to have a re-direct for /go. DO you have the re-writes for nginx that I can use since it's a supported server?

1 Answer

answered Aug 25, 2014 by Andrey Budchenko (3,900 points)
selected Aug 25, 2014 by Chirag De
 
Best answer
Hello Chirag.

If you using nginx you're config should look like.

server {
    listen       80;
    server_name  website.com *.website.com;

    root   /home/path_to_website/;
    index  index.php index.html index.htm;


    location / {
        try_files $uri $uri/ /index.php$is_args$args;
    }

    # pass the PHP scripts to php-fpm socket
    #
    location ~ \.php$ {
        try_files      $uri     $uri/ =404;
        include        fastcgi_params;
        fastcgi_pass unix:/tmp/php5-fpm.sock;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME       $document_root$fastcgi_script_name;
    }

}

If you have still problem please send your config.

Thank you.
commented Aug 25, 2014 by Chirag De (150 points)
Yup, works, thanks!
...