Custom Httpd Configuration > blocking /phpmyadmin with custom entries

lukgier

Verified User
Joined
Mar 16, 2025
Messages
29
Hi,

When I add blocking /phpmyadmin for only for one domain in custom httpd configuration like this:

httpd > custom 1

Code:
<Location /phpMyAdmin>

    Require all denied

</Location>

nginx > custom 3

Code:
location = /phpMyAdmin {

    return 403;

}

location ^~ /phpMyAdmin/ {

    return 403;

}

I get Forbidden - You don't have permission to access this resource. for all domains on server for */phpmyadmin urls:

Code:
curl -I -H "Host: localhost" http://127.0.0.1:8080/phpMyAdmin/

HTTP/1.1 301 Moved Permanently

Date: Fri, 24 Oct 2025 15:01:14 GMT

Server: Apache/2

Location: https://localhost/phpMyAdmin/

Content-Type: text/html; charset=iso-8859-1

Why doesn't it work like this? I just want to block /phpmyadmin for some domains?

Cheers,
Luke
 
Last edited:
Back
Top