Issue
I am having a weird issue where Laravels routing system is overriding my phpMyAdmin. When I first setup the server my nginx setup for phpMyAdmin worked perfectly, then after installing Laravel the only thing I changed in my nginx config was the root. and now instead of going to phpmyadmin it is going to "whoops something went wrong" in laravel, which is laravel saying there is no route for that page. Any idea on how to force nginx to not use laravel for that URL? here is my current config.

Solution
Edit to bring attention to Xavier Lucas' correction:
The ~ \.php$ location is taking precedence because it is a regular expression. Add ^~ to the top-level /phpmyadmin location (making it a regex location as well) allowing it to take precedence if matched.
location ^~ /phpmyadmin {
...
}
location ~ \.php$ {
...
}
The ~ \.php$ location block is handling requests ending in ".php" before they reach /phpmyadmin.
Try reversing the two blocks:
location /phpmyadmin {
...
}
location ~ \.php$ {
...
}
Answered By - wolfemm
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.