My domain is:
powerstarportals.com www.powerstarportals.com
I ran this command:
1. certbot --nginx (obtain the new one)
2. certbot certonly --nginx (set up config by myself)
3. certbot --manual (create acme-challenge file manually)
all of them are not working for me
It produced this output:
Which names would you like to activate HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: powerstarportals.com
2: www.powerstarportals.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter ‘c’ to cancel):
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for powerstarportals.com
http-01 challenge for www.powerstarportals.com
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. powerstarportals.com (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://powerstarportals.com/.well-known/acme-challenge/fZSITY6mRTc-54WaELSmDjbMoTQT-EFC23fUAooUJ9A [184.168.131.241]: “\n\n\n\n Power Star”, www.powerstarportals.com (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://www.powerstarportals.com/.well-known/acme-challenge/_5Arg0cWnDI-w8MEWijMjPyPGtpruglDD0suDs8qTpM [184.168.131.241]: “\n\n\n\n Power Star”
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: powerstarportals.com
Type: unauthorized
Detail: Invalid response from
http://powerstarportals.com/.well-known/acme-challenge/fZSITY6mRTc-54WaELSmDjbMoTQT-EFC23fUAooUJ9A
[184.168.131.241]: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML
4.01//EN\"\n
\"http://www.w3.org/TR/html4/strict.dtd\">\n<html>\n\n<head>\n
<title>Power Star"
Domain: www.powerstarportals.com
Type: unauthorized
Detail: Invalid response from
http://www.powerstarportals.com/.well-known/acme-challenge/_5Arg0cWnDI-w8MEWijMjPyPGtpruglDD0suDs8qTpM
[184.168.131.241]: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML
4.01//EN\"\n
\"http://www.w3.org/TR/html4/strict.dtd\">\n<html>\n\n<head>\n
<title>Power Star"
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.
The operating system my web server runs on is (include version):
Ubuntu 18.04
My hosting provider, if applicable, is:
I can login to a root shell on my machine (yes or no, or I don’t know):
Yes
I’m using a control panel to manage my site (no, or provide the name and version of the control panel):
N/A
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you’re using Certbot):
certbot 0.31.0
my nginx conf file:
server {
listen 127.0.0.1:80;
root /var/www/powerstarportals.com;
# Add index.php to the list if you are using PHP
index index.php;
server_name powerstarportals.com www.powerstarportals.com;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ = 404;
}
# pass PHP scripts to FastCGI server
#
location ~ \.php$ {
include snippets/fastcgi-php.conf;
# With php-fpm (or other unix sockets):
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
}
# settings for SSL
location ~ /.well-known {
allow all;
default_type 'text/plain';
root /var/www/powerstarportals.com/;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
# listen 94.237.60.121:443 ssl; # managed by Certbot
# ssl_certificate /etc/letsencrypt/live/powerstarportals.com/fullchain.pem; # managed by Certbot
# ssl_certificate_key /etc/letsencrypt/live/powerstarportals.com/privkey.pem; # managed by Certbot
# include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
nginx.conf file (/etc/nginx/nginx.conf):
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
command lsof -i:80
return:
nginx 2479 root 6u IPv4 43831 0t0 TCP *:http (LISTEN)
nginx 2480 www-data 6u IPv4 43831 0t0 TCP *:http (LISTEN)
nginx 2481 www-data 6u IPv4 43831 0t0 TCP *:http (LISTEN)
command ufw status
return:
To Action From
– ------ ----
[ 1] Nginx HTTP ALLOW IN Anywhere
[ 2] Nginx HTTPS ALLOW IN Anywhere
[ 3] OpenSSH ALLOW IN Anywhere
[ 4] Nginx HTTP (v6) ALLOW IN Anywhere (v6)
[ 5] Nginx HTTPS (v6) ALLOW IN Anywhere (v6)
[ 6] OpenSSH (v6) ALLOW IN Anywhere (v6)
Chrome browser can display file with extension http://www.powerstarportals.com/.well-known/acme-challenge/test.txt (return test file is OK), but not http://www.powerstarportals.com/.well-known/acme-challenge/test.
DNS settings:
|Type|Name|Value|TTL|Actions|
|A|@|184.168.131.241|600 seconds||
|CNAME|www|@|1 Hour|Edit|
|CNAME|_domainconnect|_domainconnect.gd.domaincontrol.com|1 Hour|Edit|
|NS|@|ns49.domaincontrol.com|1 Hour||
|NS|@|ns50.domaincontrol.com|1 Hour||
|SOA|@|Primary nameserver: ns49.domaincontrol.com.|1 Hour|
I tried to add a A record forward all the traffic to hosting server IP, I managed to generate a problematic SSL certificate, by which means the browser will recognise the address with www. or without it, sometimes it works with both or neither.
Apology for offending your policy and generate so many certificate during my debug:https://transparencyreport.google.com/https/certificates?cert_search_auth=&cert_search_cert=&cert_search=include_subdomains:false;domain:powerstarportals.com&lu=cert_search. I am banging my head and trying to find a solution, but the posts on site cannot solve my issue. Any tips or help from you will be really appreciated!