Public | Automated Build

Last pushed: 2 years ago
Short Description
Full Description

the IP(s) on which your node server is running. I chose port 3000.

upstream app_yourdomain {
keepalive 8;

the nginx server instance

server {
server_name yourdomain;
access_log /var/log/nginx/yourdomain.log;

# pass the request to the node.js server with the correct headers
# and much more can be added, see nginx config options
location / {
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header Host $http_host;
  proxy_set_header X-NginX-Proxy true;

  proxy_pass http://app_yourdomain/;
  proxy_redirect off;


cd /etc/nginx/sites-enabled/
ln -s /etc/nginx/sites-available/yourdomain yourdomain

var http = require('http');

http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(3000, "");
console.log('Server running at');

docker run --name some-wordpress --link some-mysql:mysql -p -v "$PWD/wordpress":/var/www/html/wp-content -d wordpress

Docker Pull Command
Source Repository