Subscribe to groovyPost.com

Apache Server Project :: groovyPost.com

A few months back I ran into the to configure my private Web Site running on Apache to use multiple ports.  Essentially the Internet provider for my home began to block inbound Port 80 so I had to configure Apache to use an alternate port.  The process was VERY simple and since I was recently asked “how” on my blog, I figured I’d document the process real quick for all the readers.

 

Context: In my example, I run Apache on Port 80 on a single IP however I need Apache to Listen on and serve my web site on port 8080 as well.  Although I chose Port 8080, you can use any Port (however I recommend a port over 1000).  Ok, let’s get into it.

 

Step 1: Open Apache configuration File httpd.conf (on my windows host, it’s location here: “c:\Program Files\Apache Group\Apache2\conf”)

 

Step 2: Find the line: Listen 80 and Type Listen 8080 on the next line:

Note, your config might look different but you should get the point

Configure Apahce to use Multiple Ports :: groovyPost.com

 

Step 3: Find the VirtualHost portion for your Web Site config and Add *:8080 as shown below:

Configure Apahce to use Multiple Ports :: groovyPost.com

Note, your config file might not look exactly like mine.  Instead of *:80 you might see an IP address:80 – it really depends but this should give you the general idea.  You can also just replace the old port number with the new one if you don’t need your site accessible on both Ports.

 

 

 

 

Step 4: Restart Apache Web Service

 

ALL DONE! Your Web Site should be accessible using either Port.

 

Be sure to test your work by hitting your web site on the new Port number: http://www.yoursite.com:8080.

 

Tags: , ,

Email Updates

Just enter your Email Address Below to Receive our Groovy How-To Tutorials Daily, Free and Easy:


Related Articles


9 Responses to “Configure Apache Web Site to Use Multiple Ports”

  1. cruiser77 says:

    hi mrgroove. love the site. i’m still having problems after following the advice step by step. i posted the issue in the forum here: http://www.groovypost.com/forum/change-apache-port-from-80-to-8080-t92215.html

    im stuck. thanks

  2. cruiser77 says:

    you can ignore. poneil helped me with my issue in the forum :)
    thanks everyone!

  3. MrGroove says:

    @Cruiser77 – Welcome to the site!

    Ah… my favorite type of problem, a RESOLVED one! :)

    A big thank you out to all the readers who help resolve problems (thanks pOneil!). Wow, looks like a small community is forming! Excellent!

  4. Raju says:

    Hi, you made the work really simple than ever. And the best part of your articles is hitting on the right point instead of bla bla bla.. stuff which we see very regularly on so many websites.

    Thanks a lot…My apache running now on new port as well.

  5. Andres says:

    Thank you it work prefect

  6. Creems says:

    Hi Mr Groove,

    I have IIS running a couple of our intranets on port 80 and also need Apache to run some other applications (Self Study CDs).
    When I installed Apache to run on port 8080, which I think it’s kind of limited to the current user … It works on the machine but when I tried to view from other machine it doesn’t work.

    Can you please assist me here.

    Regards.
    Creems

  7. Sarvesh says:

    Hi Mr Groove,

    I tried this, my Apache is on SSL (port 443), so I tried to change it to port 8443 in ssl.conf … it does not work on changing the two directives in ssl.conf.. any clue ?

Leave a Reply

For faster support, please post technical questions in our Community Forum, not the comments.