title: How to solve issue – Port 8040 the connection has timed out..why?
body: <p>I want to configure apache to listen on port 8040
  I added LISTEN 8040 directive in httpd.conf</p>
  
  <pre><code>Listen 8040
  ServerName localhost:8040
  </code></pre>
  
  <p>and assign this port number to my project in httpd-vhosts.conf</p>
  
  <pre><code>&lt;VirtualHost *:8040&gt;
      ServerAdmin "webmaster@dummy-host2.example.com"
      DocumentRoot "/opt/lampp/htdocs/project"
      ServerName "localhost:8040"
      ErrorLog "logs/error.log"
     CustomLog "logs/access.log" common
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>and restarted the server.</p>
  
  <p>but it shows this error</p>
  
  <p>The connection has timed out.The site could be temporarily unavailable or too busy.</p>
  
  <p>same process done for port number 80</p>
  
  <pre><code>Listen 80
  ServerName localhost:80
  </code></pre>
  
  <p>it's working fine.</p>
  
  <p>other port numbers not taking  why?</p>
  
  <p>what else do I need to configure???? Please help.</p>
  
  <p>If it matters, I use centOS server.</p>
  
  <p>any help is great appreciation. </p>