Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
My domain is: api.queinfotech.com
I ran this command: sudo certbot certonly -d api.queinfotech.com --server "https://acme-v02.api.letsencrypt.org/directory"
It produced this output:
root@Queinfotech:~/QueInfoTechWebsite/server# sudo certbot certonly -d api.queinfotech.com --server "https://acme-v02.api.letsencrypt.org/directory"
Saving debug log to /var/log/letsencrypt/letsencrypt.log
How would you like to authenticate with the ACME CA?
1: Nginx Web Server plugin (nginx)
2: Runs an HTTP server locally which serves the necessary validation files under
the /.well-known/acme-challenge/ request path. Suitable if there is no HTTP
server already running. HTTP challenge only (wildcards not supported).
(standalone)
3: Saves the necessary validation files to a .well-known/acme-challenge/
directory within the nominated webroot path. A seperate HTTP server must be
running and serving files from the webroot path. HTTP challenge only (wildcards
not supported). (webroot)
Select the appropriate number [1-3] then [enter] (press 'c' to cancel): 1
Requesting a certificate for api.queinfotech.com
Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems:
Domain: api.queinfotech.com
Type: unauthorized
Detail: 191.101.233.46: Invalid response from http://api.queinfotech.com/.well-known/acme-challenge/f2Ats3qttmeTji5JcNSGSvC-DfvNPYKr0iA4wRS94i8: 404
Hint: The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot. Ensure the listed domains point to this nginx server and that it is accessible from the internet.
Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
root@Queinfotech:~/QueInfoTechWebsite/server#
My web server is (include version):
root@Queinfotech:~/QueInfoTechWebsite/server# nginx -v
nginx version: nginx/1.18.0 (Ubuntu)
The operating system my web server runs on is (include version):
Current OS: Ubuntu 22.04 64bit with CyberPanel
IP address: 191.101.233.46
My hosting provider, if applicable, is:
i purchase 'queinfotech.com' domain from google domains and VPS from hostinger
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):
no
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot):
root@Queinfotech:~/QueInfoTechWebsite/server# certbot --version
certbot 2.6.0
root@Queinfotech:~/QueInfoTechWebsite/server#
for your information:
I have LiteSpeed and nginx both are up and running on same server same time. 80 port using by LiteSpeed.
i deployed api on nginx and only 8080 port available for nginx.
API is working fine at url : http://api.queinfotech.com:8080/auth
this is my nginx server config
server {
listen 8080;
server_name api.queinfotech.com;
location / {
proxy_pass http://191.101.233.46:3001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type';
}
location ^~ /.well-known/acme-challenge/ {
root /root/QueInfoTechWebsite/server;
allow all;
}
}
guide me to generate and access the api on
https://api.queinfotech.com:8080/auth