nginx server configuration returns php code
问题 I have a nginx server and all seems to work finde but when I add a auth for a directory the server returns the php code as download. server { listen 80 default_server; listen [::]:80 default_server; listen 443 ssl; root /var/www/html; index index.php index.html index.htm; server_name _; location ^~ /auth/ { try_files $uri $uri/ =404; auth_basic "Auth"; auth_basic_user_file /etc/nginx/.htpasswd; } location / { try_files $uri $uri/ =404; } location ~ /\. { deny all; } location ~ \.php$ {