I made an app with laravel and nuxt. I deployed it to server with nginx. My nginx code is like this
server {
listen 80;
root /home/anjaan/desijewel/api/public;
index index.php index.html index.htm index.nginx-debian.html;
server_name 206.189.142.151;
location /api {
try_files $uri $uri/ /index.php?$query_string;
}
location / {
// Reverse proxy code from nuxtjs.org
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
location ~ /\.(?!well-known).* {
deny all;
}
location /phpmyadmin {
alias /home/anjaan/desijewel/;
index index.php;}}
I linked phpmyadmin to /home/anjaan/desijewel. But now it showing 403 error.
It works fine when I link this to /api/public(Laravel Folder). And nginx error log showing -
access forbidden by rule, client: 1.39.244.47, server: 206.189.142.151, request: "GET /jyoteshdb/ HTTP/1.1", host: "206.189.142.151"