Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a local webserver that is mapped to port 80 (Windows, XAMPP http://www.apachefriends.org/en/xampp.html) and a domain "mydomain.com" that directs to the local webserver's IP. Everything works nicely. Now I'm trying to set up another program with an inbuilt webserver that runs on port 8080.

Ideally I don't want to expose both port 80 & port 8080 on my router to this machine. I could, but what I want to do is enter mydomain.com/application or app.mydomain.com instead of mydomain.com:8080. Nice and clean, that way only port 80 needs to be forwarded. I have no idea how to do this or if it's even possible.

Open to all suggestions & apache/htaccess/php/perl/port forwarding tricks. My googlefu fails me.


share|improve this question

2 Answers 2

Why don't you just switch the ports? Let xampp run on port 8080 and the other webserver on port 80.

share|improve this answer
My aim is to only have 1 port open, thanks for the reply though! –  Zeromus Jan 11 '13 at 1:20

You need to configure a Virtual Host for your app. Within this one you can configure a reverse proxy.

share|improve this answer
Thanks for the reply. This looks like exactly what I need - cheers! –  Zeromus Jan 11 '13 at 1:18

Your Answer


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.