Bonjour à tous,

pourriez vous m'aider s'il vous plaît.
J'aimerais dire à nginx de laisser passer les url du type /module/erp/.*.php car malheureusement j'en est besoin même si c'est pas propre
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
server
{
    listen 80;
    root /var/www/html/public;

    location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg)$ {
      access_log off;
      add_header Cache-Control "no-cache";
    }

    location / {
      # try to serve file directly, fallback to index.php
      try_files $uri /index.php$is_args$args;
    }

    location ~ ^/index\.php(/|$) {
        fastcgi_pass fpm:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;

        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        fastcgi_param DOCUMENT_ROOT $realpath_root;
        internal;
    }

    # return 404 for all other php files not matching the front controller
    # this prevents access to other php files you don't want to be accessible.
    location ~ \.php$ {
        return 404;
    }

    error_log  /proc/self/fd/2;
    access_log /proc/self/fd/1;
}
J'ai le
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
    location ~ \.php$ {
        return 404;
    }
qui retourne une 404

Comment dire pour les url /module../.*php tu laisses passer cette url?

Merci