Keywords: WordPress + NGINX + SSL - Google Cloud Platform - Technical issue - Secure Connections (SSL/HTTPS)
bnsupport ID: e3fd7d74-c922-5f8a-5791-e052f6c76ebe
Description:
Error installing SSL on site says that it was installed successfully but when doing the test it appears
www.example.com
I have always used the Bitnami commands, I already have them stored in a notepad, they no longer work, they updated something or what happened it does not work letsencrypt
These are the commands I used until December 2020
sudo /opt/bitnami/letsencrypt/scripts/generate-certificate.sh -m myuser@domain.com -d www.domain.com -d domain.com
sudo / opt / bitnami / letsencrypt / lego --tls --email=user@domain.com --domains = domain.com --domains = www.domain.com --path = "/ opt / bitnami / letsencrypt" run
sudo /opt/bitnami/letsencrypt/scripts/generate-certificate.sh -m user@vdomain.com -d www.domain.com -d domain.com --path = "/ opt / bitnami / letsencrypt" run
if you can help me it would be great.
This is output:
root@agro-export-us-2021-vm:~# sudo /opt/bitnami/letsencrypt/lego --tls --email=rudy@virtualsigma.com --domains=agroexport.us --domains=www.agroexport.us --path="/opt/bitnami/letsencrypt" run
2021/01/11 17:35:54 No key found for account rudy@virtualsigma.com. Generating a P256 key.
2021/01/11 17:35:54 Saved key to /opt/bitnami/letsencrypt/accounts/acme-v02.api.letsencrypt.org/rudy@virtualsigma.com/keys/rudy@virtualsigma.com.key
2021/01/11 17:35:55 Please review the TOS at https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf
Do you accept the TOS? Y/n
y
2021/01/11 17:35:57 [INFO] acme: Registering account for rudy@virtualsigma.com
!!!! HEADS UP !!!!
Your account credentials have been saved in your Let's Encrypt
configuration directory at "/opt/bitnami/letsencrypt/accounts".
You should make a secure backup of this folder now. This
configuration directory will also contain certificates and
private keys obtained from Let's Encrypt so making regular
backups of this folder is ideal.
2021/01/11 17:35:57 [INFO] [agroexport.us, www.agroexport.us] acme: Obtaining bundled SAN certificate
2021/01/11 17:35:57 [INFO] [agroexport.us] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/9999689782
2021/01/11 17:35:57 [INFO] [www.agroexport.us] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/9999689783
2021/01/11 17:35:57 [INFO] [agroexport.us] acme: use tls-alpn-01 solver
2021/01/11 17:35:57 [INFO] [www.agroexport.us] acme: use tls-alpn-01 solver
2021/01/11 17:35:57 [INFO] [agroexport.us] acme: Trying to solve TLS-ALPN-01
2021/01/11 17:36:03 [INFO] [agroexport.us] The server validated our request
2021/01/11 17:36:03 [INFO] [www.agroexport.us] acme: Trying to solve TLS-ALPN-01
2021/01/11 17:36:10 [INFO] [www.agroexport.us] The server validated our request
2021/01/11 17:36:10 [INFO] [agroexport.us, www.agroexport.us] acme: Validations succeeded; requesting certificates
2021/01/11 17:36:11 [INFO] [agroexport.us] Server responded with a certificate.
root@agro-export-us-2021-vm:~# sudo /opt/bitnami/ctlscript.sh start
/opt/bitnami/mysql/scripts/ctl.sh : mysql started at port 3306
/opt/bitnami/php/scripts/ctl.sh : php-fpm started
/opt/bitnami/nginx/scripts/ctl.sh : Nginx started
This is Bitnami.Conf
# HTTP server
server {
listen 80;
server_name localhost;
#include "/opt/bitnami/nginx/conf/bitnami/phpfastcgi.conf";
include "/opt/bitnami/nginx/conf/bitnami/bitnami-apps-prefix.conf";
}
# HTTPS server
server {
listen 443 ssl;
server_name localhost;
ssl_certificate server.crt;
ssl_certificate_key server.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
#include "/opt/bitnami/nginx/conf/bitnami/phpfastcgi.conf";
include "/opt/bitnami/nginx/conf/bitnami/bitnami-apps-prefix.conf";
}
include "/opt/bitnami/nginx/conf/bitnami/bitnami-apps-vhosts.conf";
# Status
server {
listen 80;
server_name local-stackdriver-agent.stackdriver.com;
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
location / {
root /dev/null;
}
}
This is NGINX. conf
index index.php index.html index.htm;
if ($request_uri !~ "^/phpmyadmin.*$")
{
set $test A;
}
if ($request_uri !~ "^/bitnami.*$")
{
set $test "${test}B";
}
if (!-e $request_filename)
{
set $test "${test}C";
}
if ($test = ABC) {
rewrite ^/(.+)$ /index.php?q=$1 last;
}
# Deny access to any files with a .php extension in the uploads directory
location ~* /(?:uploads|files)/.*\.php$ {
deny all;
}
# Disable logging for not found files and access log for the favicon and robots
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
include "/opt/bitnami/apps/bitnami/banner/conf/banner-substitutions.conf";
include "/opt/bitnami/apps/bitnami/banner/conf/banner.conf";
# Deny all attempts to access hidden files such as .htaccess or .htpasswd.
location ~ /\. {
deny all;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_read_timeout 30000;
fastcgi_pass unix:/opt/bitnami/php/var/run/www.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
}
location ~* \.(ogg|ogv|svg|svgz|eot|otf|woff|woff2|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
expires 10d;
}
client_max_body_size 23000M;
location / {
try_files $uri $uri/ /index.php?$args;
}