NGINX PathInfo Issue
On NGINX servers, in general, no custom configuration is required for WISECP. However, some NGINX servers may have the “PATH_INFO” feature disabled. In this case, the WISECP url structure will not work, resulting in appearance problems and URL access problems.
The following steps should be followed for the solution. You must have root access to your server in order to perform these processes. If you do not have root access to the server or do not have knowledge and experience in such matters, we recommend that you get support from the company from which you receive server service or a server management expert.
1) Open your NGINX configuration file.
(Usually located in /etc/nginx/sites-available/example.com or similar)
Add the following codes or change them if any:
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; # You should set it according to your PHP-FPM socket.
include fastcgi_params;
}
You should change the fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; line in the above codes according to the PHP version you are using.
2) Open your PHP-FPM configuration file.
(Usually located in /etc/php/8.1/fpm/php.ini or similar)
Find the line below:
;cgi.fix_pathinfo=1
(If the line above does not exist, you can add the following line to any field).
Replace with the following:
cgi.fix_pathinfo=1
3) Restart NGINX and PHP-FPM services with the following commands.
sudo service nginx restart
sudo service php8.1-fpm restart # Adjust according to your PHP version.