I am using an Nginx server.
If I access index.pl
it downloads the file instead of executing it.
I'm pretty sure this is to do with /etc/nginx/sites-available/default
Here is a copy
listen 80;
listen [::]:80;
server_name domain.com;
root /var/www/domain.com;
index index.html index.php index.pl;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
# With php-fpm (or other unix sockets):
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
# With php-cgi (or other tcp sockets):
#fastcgi_pass 127.0.0.1:9000;
}
As you can see, I have already added index.pl
to the end of the index
list.
What else do I need to get it working?