I have set up nginx on Ubuntu 20.4 and installed PHP 7.4.3.
Here is the content of /etc/nginx/sites-available/default
server {
listen 80;
server_name www.example.com;
rewrite ^(.*) http://example.com$1 permanent;
}
server {
listen 80;
server_name example.com;
index index.html index.php;
root /home/me/wp1/;
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; allow all; }
location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
expires max;
log_not_found off;
}
location / {
#try_files $uri $uri/ =404;
try_files $uri $uri/ /home/me/wp1/index.php$is_args$args;
}
}
when I type my domain in my firefox browser, I see this downloading page 
In addition to that, www did not redirect to the domain without it. I am not sure if this is a separate issue.
Aucun commentaire:
Enregistrer un commentaire