nginx | index.php is downloaded on access

Hello, when I call up my PHP website, it is automatically downloaded.
server {
listen 443 ssl;
server_name login.domain.de;
root /var/www/html_domain/projek/login;
ssl_certificate /etc/letsencrypt/live/domain.de/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domain.de/privkey.pem;
index index.html index.htm index.php;

location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

location ^~ /account/user2/ {
auth_basic "user2";
auth_basic_user_file /etc/nginx/login/.user2;
try_files $uri $uri/ =404;
}

location ^~ /account/user/ {
auth_basic "user";
auth_basic_user_file /etc/nginx/login/.user;
try_files $uri $uri/ =404;
}
}
server {
listen 443 ssl;
server_name login.domain.de;
root /var/www/html_domain/projek/login;
ssl_certificate /etc/letsencrypt/live/domain.de/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domain.de/privkey.pem;
index index.html index.htm index.php;

location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

location ^~ /account/user2/ {
auth_basic "user2";
auth_basic_user_file /etc/nginx/login/.user2;
try_files $uri $uri/ =404;
}

location ^~ /account/user/ {
auth_basic "user";
auth_basic_user_file /etc/nginx/login/.user;
try_files $uri $uri/ =404;
}
}
And yes, its the right path to php.
No description
0 Replies
No replies yetBe the first to reply to this messageJoin