updates to static server
This commit is contained in:
parent
d50f2507cf
commit
f818b79c7a
|
@ -0,0 +1 @@
|
||||||
|
hello
|
|
@ -1,7 +1,10 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
var path = require('path');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
server: "https://acme-staging.api.letsencrypt.org/directory"
|
server: "https://acme-staging.api.letsencrypt.org/directory"
|
||||||
, tlsSni01Port: 5001
|
, tlsSni01Port: 5001
|
||||||
, http01Port: 80
|
, http01Port: 80
|
||||||
|
, webrootPath: path.join(__dirname, "acme-challenge")
|
||||||
};
|
};
|
||||||
|
|
|
@ -37,7 +37,7 @@ app.use('/', function (req, res, next) {
|
||||||
// handle static requests to /.well-known/acme-challenge
|
// handle static requests to /.well-known/acme-challenge
|
||||||
app.use(
|
app.use(
|
||||||
'/.well-known/acme-challenge'
|
'/.well-known/acme-challenge'
|
||||||
, express.static(path.join(__dirname, 'acme-challenge'), { dotfiles: undefined })
|
, express.static(config.webrootPath, { dotfiles: undefined })
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
curl http://localhost:80/.well-known/acme-challenge/hello
|
||||||
|
curl https://localhost.daplie.com:5001/.well-known/acme-challenge/hello
|
Loading…
Reference in New Issue