403 Forbidden error serverwide on all multi-site subdomains

jessica01

Verified User
Joined
Apr 19, 2020
Messages
12
Hi.

On my old server i had several wordpress multi-sites, each with subdomains. For the subdomains i made a wildcard ("*") entry in the directadmin dns management.

I restored now all backups from my old server on the new server with all this multi-sites. Now i get on all the subdomains a "403 forbidden - nginx" error.

Any idea what could be wrong configurated on the server, so that i can fix that problem?

Greets
 
2022/10/28 06:15:33 [error] 3969822#0: *1535990 access forbidden by rule, client: 179.43.175.204, server: mydomain.com, request: "GET /.git/config HTTP/1.1", host: "mydomain.com"
2022/10/28 06:15:34 [error] 3969821#0: *1536124 access forbidden by rule, client: 159.223.170.253, server: mydomain.com, request: "GET /.env HTTP/1.1", host: "mydomain.com"
2022/10/28 06:15:34 [error] 3969821#0: *1536122 access forbidden by rule, client: 159.223.170.253, server: mydomain.com, request: "GET /.git/config HTTP/1.1", host: "mydomain.com"
2022/10/28 06:15:34 [error] 3969821#0: *1536139 access forbidden by rule, client: 167.172.246.222, server: mydomain.com, request: "GET /.env HTTP/1.1", host: "www.mydomain.com"
2022/10/28 06:15:34 [error] 3969822#0: *1536158 access forbidden by rule, client: 167.172.246.222, server: mydomain.com, request: "GET /.git/config HTTP/1.1", host: "www.mydomain.com"
2022/10/28 06:15:34 [error] 3969818#0: *1536200 access forbidden by rule, client: 212.71.255.156, server: mydomain.com, request: "GET /.git/config HTTP/1.1", host: "mydomain.com"
2022/10/28 06:15:34 [error] 3969819#0: *1536204 access forbidden by rule, client: 212.71.255.156, server: mydomain.com, request: "GET /.env HTTP/1.1", host: "mydomain.com"
2022/10/28 06:15:36 [error] 3969827#0: *1536364 access forbidden by rule, client: 172.105.98.145, server: mydomain.com, request: "GET /.git/config HTTP/1.1", host: "www.mydomain.com"
2022/10/28 06:15:36 [error] 3969827#0: *1536366 access forbidden by rule, client: 172.105.98.145, server: mydomain.com, request: "GET /.env HTTP/1.1", host: "www.mydomain.com"
2022/10/28 08:06:22 [error] 3969827#0: *1681368 access forbidden by rule, client: 185.83.146.154, server: mydomain.com, request: "GET /.env HTTP/1.1", host: "mydomain.com"
2022/10/28 08:06:23 [error] 3969846#0: *1681370 access forbidden by rule, client: 185.83.146.154, server: mydomain.com, request: "GET /.env HTTP/1.1", host: "mydomain.com"


Greets
 
Last edited:
My guess is your subdomains folders have either wrong permissions or user/group ownership. You might check in Directadmin file manager for the particular domain/subdomain.
 
If others are also looking for the solution: In my case the problem had been that i shared the IP on the server, but this is then a conflict with multi-sites. The IP must be "owned" to one user on the server.

Greets
 
My guess is your subdomains folders have either wrong permissions or user/group ownership. You might check in Directadmin file manager for the particular domain/subdomain.
Thanks for your help, because the NGINX log errors had been a good tip to start the search for the error.
 
Back
Top