Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 443 ssl;
- server_name myserver.com;
- ssl on;
- ssl_certificate /usr/local/etc/nginx/ssl/myserver.com/fullchain.pem;
- ssl_certificate_key /usr/local/etc/nginx/ssl/myserver.com/privkey.pem;
- ssl_client_certificate /usr/local/etc/nginx/ssl/letsencrypt-CA/DSTRootCAX3.crt;
- ssl_verify_client on;
- location / {
- proxy_pass http://127.0.0.1:4433;
- }
- var fs = require('fs');
- var https = require('https');
- var options = {
- hostname: 'myserver.com',
- port: 8443,
- path: '/',
- method: 'GET',
- cert: fs.readFileSync('myclient.com/cert.pem'),
- key: fs.readFileSync('myclient.com/privkey.pem'),
- ca: fs.readFileSync('myclient.com/DSTRootCAX3.crt'),
- };
- var req = https.request(options, function (res) {
- res.on('data', function (data) {
- process.stdout.write(data);
- });
- });
- req.end();
- req.on('error', function (e) {
- console.error(e);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement