Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have finally got port forwarding working on my system, it's been a real challenge because my Modem and Router were both trying to do the job, I have now bridged my modem and it is all handled by my router.

I am trying to run Apache webserver from my IP. To get it working I had to change my port forwarding to use port 8080 instead of port 80.

So in my Apache httpd.conf file I had to change Listen 80 to Listen 8080 and ServerName localhost:80 to ServerName localhost:8080

As a result, I can now access my server from my external IP address as long as I add :8080 to the end of the IP but I can no longer access it with localhost instead I have to use localhost:8080

So my question, is there anyway to make localhost work without the need of adding :8080 to the end of it? Also with my IP address, I would like to not have to add :8080 to the end of it?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

No. But you can add 80 to another Listen directive to have it listen on both, and then create a new virtual host that unconditionally redirects to port 8080 of the same host using mod_rewrite.

share|improve this answer
    
Thanks I will look into this, for now I added another Listen 80 and this make my `localhost' work again so that's a big step thanks –  jasondavis Aug 25 '12 at 17:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.