Hi,
I deleted the docker environment and using now Pihole, NGINX and PHP via the software center installation.
Now again I wanted to use a local domain with NGINX. But it does not work for me.
I wanna use Grav CMS for a local website. I followed the tutorial on a german website: www.howtoforge.de/anleitung/wie-man-grav-cms-mit-nginx-auf-ubuntu-20-04-installiert/amp/
Everything worked fine until I used the domain, which was used in the conf file (/etc/nginx/conf.d/grav.conf):
server {
listen 80;
server_name grav.example.com;
root /var/www/html/grav;
index index.html index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~* /(\.git|cache|bin|logs|backup|tests)/.*$ { return 403; }
location ~* /(system|vendor)/.*\.(txt|xml|md|html|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ { return 403; }
location ~* /user/.*\.(txt|md|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ { return 403; }
location ~ /(LICENSE\.txt|composer\.lock|composer\.json|nginx\.conf|web\.config|htaccess\.txt|\.htaccess) { return 403; }
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
}
}
The NGINX installation was very new via the software center.
What can I do?