I have an issue with the clean urls check. When I test there is an error in the Nginx log:

2017/10/06 09:49:01 [error] 468#468: *199 open() 
"/usr/share/nginx/html/drupal-7/admin/config/search/clean-urls/check" failed
 (2: No such file or directory), client:, server: localhost,
 request: "GET /drupal-7/admin/config/search/clean-urls/check HTTP/1.0",
 host: "localhost".

I don't know if it is a nginx problem or a Drupal problem.

update : i change some things in the nginx.conf now i have an error in the log of nginx : 2017/10/14 21:55:08 [error] 4804#4804: *1 directory index of "/usr/share/nginx/html/drupal-7/" is forbidden, client:, server: localhost, request: "GET /drupal-7/?q=admin/config/search/clean-urls HTTP/1.1", host: "localhost". Here is my nginx.conf :

http {
include       mime.types;
default_type  application/octet-stream;

#log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
#                  '$status $body_bytes_sent "$http_referer" '
#                  '"$http_user_agent" "$http_x_forwarded_for"';

#access_log  logs/access.log  main;

sendfile        on;
#tcp_nopush     on;

#keepalive_timeout  0;
keepalive_timeout  65;

#gzip  on;
# set client body size to 200M #
client_max_body_size 200M;

server {
    listen 443 ssl http2;
    server_name toniozz75.fr;
    root /usr/share/nginx/html;
    index index.html index.htm;

location = /favicon.ico {
            log_not_found off;
            access_log off;

location = /robots.txt {
            allow all;
            log_not_found off;
            access_log off;

location @rewrite {
    rewrite ^/(.*)$ /index.php?q=$1;

location ~ \.(php|html|htm)$ {
         root           /usr/share/nginx/html;
         fastcgi_pass   unix:/run/php-fpm/php-fpm.sock;
         fastcgi_index  index.php;
         try_files $uri $uri/ /index.php?$args;
         include        fastcgi.conf;

1 Answer 1


You are missing some configuration for clean URLs. Try adding this snippet above the location @rewrite snippet.

 location / {
    try_files $uri /index.php?$query_string; # For Drupal >= 7

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.