It seems that when I try to access phpmyadmin, the index file is downloaded. I don't understand the reason. I have installed php and also have configured it in the configuration.
# Expires map
map $sent_http_content_type $expires {
default off;
text/html epoch;
text/css max;
application/javascript max;
~image/ max;
}
server {
root /var/www/hostitor.com/html;
index index.html index.htm index.nginx-debian.html index.php;
server_name hostitor.com www.hostitor.com;
location / {
try_files $uri $uri/ =404;
}
location ^~ /blog {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:2368;
}
location ^~ /phpmyadmin {
alias /var/www/hostitor.com/html/phpmyadmin;
try_files $uri $uri/ =404;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/hostitor.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/hostitor.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
expires $expires;
}
server {
if ($host = www.hostitor.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = hostitor.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name hostitor.com www.hostitor.com;
return 404; # managed by Certbot
}