Well I was wondering from last couple of hours how to enable the clean url for drupal8 in my local nginx server. It is also works for drupal 7. Its very simple do edit the " /etc/nginx/sites-available/default " , Please type the following command on terminal. $ sudo gedit /etc/nginx/sites-available/default And search for the line text " try_files $uri $uri/ =404 " under location/ server configuration area and comment it . Then add these lines to below that, as like location/ { .......... ............ #try_files $uri $uri/ =404; <============= You need to comment this line expires max; try_files $uri $uri/ @rewrite; ...