I successfully configured LetsEncrypt to my domain which is domain.com.ar but now it resolves to my server ip and not to the page.
this is the config file in /etc/nginx/sites-available
server {
listen 80;
server_name www.domain.com.ar domain.com.ar;
include snippets/letsencrypt.conf;
return 301 https://$host$request_uri;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
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 ~ \.php {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
}
}
}
server {
listen 443 ssl http2;
server_name www.domain.com.ar;
root /var/www/wordpress;
index index.php index.html;
ssl_certificate /etc/letsencrypt/live/domain.com.ar/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domain.com.ar/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/domain.com.ar/chain.pem;
include snippets/ssl.conf;
return 301 https://domain.com.ar$request_uri;
}
server {
listen 443 ssl http2;
server_name domain.com.ar;
ssl_certificate /etc/letsencrypt/live/domain.com.ar/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domain.com.ar/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/domain.com.ar/chain.pem;
include snippets/ssl.conf;
include snippets/letsencrypt.conf;
}
More info:
Ubuntu 18.04
Nginx
I cannot enter to wp-admin any more to change wordpress option but I can modify the .php files inside the server. I surfed the net all day but cannot make it work