I configured a proxy server on nginx, but I can’t understand if it works because nothing has changed, the access.log file in / var / log / nginx is empty, I go to https://site.ru
server { # IP, который мы будем слушать listen 443 ssl; server_name site.ru; keepalive_timeout 60; ssl_certificate _address_/site.ru.crt; ssl_certificate_key _address_/site.ru.key; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers "HIGH:!RC4:!aNULL:!MD5:!kEDH"; add_header Strict-Transport-Security 'max-age=604800'; location / { # IP и порт, на которых висит node.js proxy_pass http://127.0.0.1:3000; } } Do I specify proxy_pass correctly if I start node 3000 server on node.js?
Server node code:
var http = require('http'); http.createServer(function (req, res) { console.log('Test'); res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }).listen(3000); console.log('Server running at port 3000');