You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1- sudo nano /etc/php/7.1/cli/php.ini
2- cgi.fix_pathinfo=0 (find cgi.fix_pathinfo and change from 1 to 0)
(or just run this command - sudo sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php.ini
)
3- sudo systemctl restart php7.1-fpm.service
Nginx
sudo vim /etc/nginx/sites-available/website.com
server{listen8000; # on which port you want to serve API
server_name website.com; #website or ip address
root /var/www/website/API/public;indexindex.php;location / {try_files$uri$uri/ /index.php?$query_string;}add_header X-Frame-Options "SAMEORIGIN";add_header X-XSS-Protection "1; mode=block";add_header X-Content-Type-Options "nosniff";location = /favicon.ico {access_log off;log_not_found off;}location = /robots.txt {access_log off;log_not_found off;}error_page404 /index.php;location~\.php$ {fastcgi_pass unix:/run/php/php7.1-fpm.sock;include snippets/fastcgi-php.conf;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;}location~ /\.ht {deny all;}}