Running apache on a private port

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Running apache on a private port

Postby nirosilva » 27. September 2009 20:54

Hi Guys,

I'm a newbie to xampp and apache and I'm starting to build a website for my personal use. The problem is that I'm currently connected to the university network at my graduate school and they do not allow me to run webservers on their network. I just need to run xampp to test my website before putting it live on a third party host. I emailed them about this and they said as long as I'm using a private port for my apache web server( so that outsiders can't get into the network through my webserve ), I will be fine. So, now I need to know how I can run xampp (apache) on a private port, not on port 80. How do I do that? Please let me know. Also, if I do that, will I be able to test my website properly before putting it live on my host server?

Thanks in advance.
nirosilva
 
Posts: 2
Joined: 27. September 2009 20:48

Re: Running apache on a private port

Postby Izzy » 27. September 2009 22:44

Open xampp\apache\conf\httpd.conf file in your text editer (notepad for example) and find this line:
Listen 80

and change it to any private port from 49152 through 65535 for example:
Listen 50000

You would then save the file and restart Apache so it can read the new configuration.


IANA defines the Dynamic and/or Private Ports as those from 49152 through 65535.

Now when you access the Apache server in XAMPP from a browser you would type this:
http://localhost:50000

Every time you access any web page through the Apache server in XAMPP you must add :50000 at the end of the domain name part of the address for example:
http://localhost:50000/mysite/index.php
http://mysite:50000/index.php
http://localhost:50000/phpmyadmin

Note.
The Apache Admin... button in the XAMPP Control Panel (XCP) may no longer work after changing the Listen port.
Also the XCP may show port 80 is in use as this is hard coded into the XCP but can be ignored.

Good luck.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: Running apache on a private port

Postby nirosilva » 27. September 2009 23:41

Thanks so much izzy. I'll try that out and see how it goes.
nirosilva
 
Posts: 2
Joined: 27. September 2009 20:48


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 140 guests