title: node.js server getting Error: listen EACCES : PERMISSION denied 0.0.0.0.80 while using port 80 or 443 instead of 3000 in godaddy vps linux server
body: <p>js website , everything is good in local system while i am using the port 3200 and 80 , When i deployed the code to the godaddy vps linux Server i am getting errors </p>
  
  <h3>Error: listen EACCES : PERMISSION denied 0.0.0.0.80 ###</h3>
  
  <p>while using port 80 or 443 instead of 3000 in godaddy vps linux server</p>
  
  <pre><code>
  console.log('Welcome to Node Server... ');
  
  var process = require('process');
  var http = require('http');
  var https = require('https');
  var url = require('url');
  
  
  const mysql = require('mysql');
  const express = require('express');
  // var router = express.Router();
  const app = express();
  const bodyParser = require('body-parser');
  const path = require('path');
  const fs = require('fs');
  const multer = require('multer');
  
  app.use(bodyParser.urlencoded({ extended: true }));
  app.use(bodyParser.json());
  
  
  
  var connection = require('./db.js');
  const cors = require('cors');
  // app.use(cors())
  // app.use(cors({ origin: "http://localhost:4200", credentials: true }));
  
  
  
  app.use((req, res, next) =&gt; { res.send('&lt;h1&gt;Hello from HowTags!!!&lt;/h1&gt;'); });
  
  const options = {
    // key: fs.readFileSync('server.key'),
    // cert: fs.readFileSync('server.cert'),
    cert: fs.readFileSync('./ssl/7f16b8c7268c5ae5.crt'),
    // key: fs.readFileSync('./ssl/generated-private-key.txt'),
    pem: fs.readFileSync('./ssl/7f16b8c7268c5ae5.pem'),
  };
  
  
  
  http.createServer(app).listen(80, null, null, () =&gt; { console.log('Server started listening on port ' + 80); });
  
  https.createServer(options, app).listen(443, null, null, () =&gt; { console.log('Server started listening on port ' + 443); });
  
  // Code Ends ..................................................
  </code></pre>
  
  <p>i am also tried with .htaccess re-directions but it will not working </p>
  
  <pre><code>RewriteEngine On
  
   RewriteRule ^$ http://howtags.com:8000 [P,L]
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ https://howtags.com:443$1 [P,L]
   RewriteRule (.*) http://howtags.com:80/$1 [L,P,QSA]   
  
  +++++++++++++++++++++++++
  PassengerBaseURI /
  PassengerAppRoot /home/howtags/howtags/node
  PassengerAppType node
  PassengerStartupFile index.js
  </code></pre>
  
  <p>if anyone find anything wrong in the code please tell me ...
  if anyone know better solution please tell me ....</p>