At my hosting control panel I set up my server api for server name (let it be dev.domainname.com
).
dev.domainname.com
config:
server {
listen 80;
#listen [::]:80;
root /var/www/dev.domainname.com/public;
# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;
server_name dev.domainname.com;
location / {
try_files $uri $uri/ =404;
}
}
After I open dev.domainname.com brower receive a file called "download". Actually I checked that file - it is my index.php
inside /public
.
What's wrong?
Some additional info: I've installed SSL-certificate using certbot
. https://dev.domainname.com
isn't available too, I got ERR_CONNECTION_TIMED_OUT
.
sudo tail -n 20 /var/log/nginx/error.log
doesn't have any errors for the last hour.
hosts
file contains one row:
127.0.0.1 domainname domainname
sudo nginx -t
is also ok.