I have a problem where my laravel project is accessed by my static IP on Azure but not from the domain that I linked it with:
I use nginx and ufw
This is the error.log for my Nginx:
nginx configuration
server {
listen 80;
listen [::]:80;
server_name domain;
root /var/www/app/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
index index.php;
charset utf-8;
location / {
try_files $uri /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
}
What should I do? what rule should I add?
2022/05/19 11:25:42 [error] 586486#586486: *1562 access forbidden by rule, client: 51.79.29.48, server: domain, request: "GET /.env HTTP/1.1", host: "ip"
2022/05/19 11:32:22 [error] 586486#586486: *1563 access forbidden by rule, client: 69.162.243.124, server: domain, request: "GET /.env HTTP/1.1", host: "ip"
2022/05/19 11:45:07 [error] 586486#586486: *1604 access forbidden by rule, client: 185.254.196.223, server: domain, request: "GET /.env HTTP/1.1", host: "ip"
2022/05/19 12:38:43 [notice] 600838#600838: signal process started```
To Action From
-- ------ ----
22/tcp (OpenSSH) ALLOW IN Anywhere
80/tcp (Nginx HTTP) ALLOW IN Anywhere
80 ALLOW IN Anywhere
443 ALLOW IN Anywhere
22/tcp (OpenSSH (v6)) ALLOW IN Anywhere (v6)
80/tcp (Nginx HTTP (v6)) ALLOW IN Anywhere (v6)
80 (v6) ALLOW IN Anywhere (v6)
443 (v6) ALLOW IN Anywhere (v6)