Webserver output is coming, when doing validation challenge


Below are my environment details:

Domain name: test1.telebu.io
Certificate provider: sslforfree.com
OS: Cent OS 7.x
NodeJS (Web server) version: 8.x
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

I installed NodeJS and running the node server with an example application as below:
const http = require(‘http’);
function handler(req, res) {
res.end(‘Hello World!’);

I also setup the “authbind” to run my node server on standard ports i.e. 80 and 443. Now, I run this command: authbind node server.js

Now, my node server is running successfully. When I open the " http://test1.telebu.io " in the browser, “Hello World!” string is displaying successfully.

Now, coming to the Letsencrypt topic. As you suggested, I created the “.well-known” folder in my home folder and then created “acme-challenge” folder in side the “.well-known” folder and uploaded the generated file by you in to " /home/chandramouli/.well-known/acme-challenge/ " folder.

Now, I need to validate. When I am trying to open " http://test1.telebu.io/.well-known/acme-challenge/filename " in the browser, I am getting “Hello World!” string (NodeJS application output), instead of your file output.

Please note that when I try to do “wget test1.telebu.io/.well-known/acme-challenge/” from any other system", I am getting the uploaded file successfully. For your information, I am new to NodeJS.

Please help me to resolve the issue.

Thanks in advance.

Best Regards,

You will probably want to select a router library before you go any further, so you can delegate certain HTTP paths to different request handlers.

Maybe read a basic express.js tutorial or something.

Are you sure? Thanks.

There are a number of Let’s Encrypt clients specifically for node.js / express - I haven’t personally used any of them but I guess you might possibly have better luck with one of those than with a web-based client like sslforfree (especially if you want automated renewals).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.