node.js - https express - localhost not working -


i'm trying implement greenlock-express in app. here did.

 var lex = require('greenlock-express').create({   server: 'staging',   challengetype: 'http-01',   challenges: { 'tls-sni-01': require('le-challenge-fs').create({ webrootpath: '/tmp/acme-challenges' }) },   store: require('le-store-certbot').create({ webrootpath: '/tmp/acme-challenges' }),   approvedomains: approvedomains });  var approvedomains = function(opts, certs, cb) {    if (certs) {      opts.domains = certs.altnames;    } else {     opts.domains = ['www.domain.com', 'domain.com'];      opts.emails = 'email@domain.com';     opts.agreetos = true;     }    cb(null, { options: opts, certs: certs }); }   require('http').createserver(lex.middleware(require('redirect-https')())).listen(8080, function () {   console.log("listening acme http-01 challenges on", this.address()); });  // express app settings, router, etc...  require('https').createserver(lex.httpsoptions, lex.middleware(app)).listen(443, function () {   console.log("listening acme tls-sni-01 challenges , serve app on", this.address()); }); 

so followed steps in documentation , there no errors being returned. i'm doing right.

the problem happens when try access localhost:8080 redirects me https://localhost page blank. don't know why.

i checked if port blocked nestat -an , both of state set listening.

not sure going on.

thank you, mark


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -