Changing Apache port number does not update control panel

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

Changing Apache port number does not update control panel

Postby bac240sx » 29. July 2009 12:50

Hello all,

Just downloaded XAMPP for the first time. I tried to change Apache's port number by editing /apache/conf/httpd.conf as follows:

ServerName localhost:8080
...
Listen 8080

Following this edit, I shut down and restart XAMPP (many times actually). I need to do this b/c my ISP block port 80.

OK. Weird thing is this sorta works. The webserver appears to be up and running on port 8080. I can connect to it just fine both internally and externally and port 80 appears to be vacant. However, when I launch the XAMPP control panel, it claims: Apache started [Port 80]. Here is the annoying part. When I use the control panel and click "Admin..." it will not connect to the revised port number. Rather, it always trys to connect to http://localhost/ instead of http://localhost:8080/. I can manually connect to http://localhost:8080 and everything appears to be working, but it's becomming very time consuming.

Any ideas on how to get the control panel to update to the revised port? Am I missing something else?

Thanks in advance!
--Bac240sx

P.S. Neither the forum search or Google appeared to know the answer to my particular problem.
bac240sx
 
Posts: 1
Joined: 29. July 2009 12:33

Re: Changing Apache port number does not update control panel

Postby Nobbie » 29. July 2009 12:52

>it claims: Apache started [Port 80]

Yes, the control box does not read httpd.conf, the above message is a constant string inside the control box. There is no way to change that.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: Changing Apache port number does not update control panel

Postby Izzy » 29. July 2009 19:17

There is a way of having the XAMPP Control Panel (XCP) display [Port 8080] instead of [Port 80] but remember that no matter what port you have set Apache to Listen on in the httpd.conf file the XCP will start Apache listening on that port.

So if you set Listen 8080 in your httpd.conf file then the XCP will start Apache Listening on that port 8080 and clicking on the ...Admin button in the XCP should load the XAMPP Welcome Page.

To display Apache started [Port 8080] in the XCP instead of Apache started [Port 80] all the time, open your text editor and create a new text file and add the following at the very top of the file:
[PORTS]
apache = 8080


Save the file into the same folder as the xampp-control.exe with the file name xampp.ini

Now when you start the XCP and then click on Start Apache it will display Apache started [Port 8080] instead of Apache started [Port 80] but will make no difference to the port that is configured and used by Apache in the httpd.conf file, it is only a cosmetic change in the XCP code.


TEST
If you have the default Listen 80 configured in the httpd.conf file and you create the xampp.ini file above with [PORTS] apache = 8080 then after you start Apache the XCP will still display Apache started [Port 8080] instead of Apache started [Port 80] which proves that the XCP does not read the httpd.conf file but that it does read the xampp.ini file.


BTW the full XAMPP.INI file looks like this but is not required for only the Apache started [Port 80] issue and as yet I have not been able to ascertain what the other settings might do, if anything, when starting the XCP.
Code: Select all
[START]
hide   = 1
apache = 1
mysql  = 1

[EXIT]
apache = 1
mysql  = 1

[PORTS]
apache = 80
mysql  = 3306

[XAMPP]
setup  = 1
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: Changing Apache port number does not update control panel

Postby theSshow » 04. April 2010 01:24

Hmm, I think bac240sx was more concerned with how to change the target of the "Admin" button in the Control Panel. I, too, am having the same issue. If we change the port setting for Apache, how do we make the "Admin" button in XCP reflect the target with the new port setting?
theSshow
 
Posts: 1
Joined: 04. April 2010 01:17

Re: Changing Apache port number does not update control panel

Postby Narrowboyy » 04. April 2010 08:51

theSshow wrote:Hmm, I think bac240sx was more concerned with how to change the target of the "Admin" button in the Control Panel. I, too, am having the same issue. If we change the port setting for Apache, how do we make the "Admin" button in XCP reflect the target with the new port setting?

This is an old topic and over time the versions of XAMPP have changed, as have the Control Panel versions.

In answer to your question - In the latest XAMPP versions the Control Panel is closed source and hard wired and can't be changed by a user.

The Control Panel does not read the httpd.conf file and so has no idea that the Listen port has been changed.

This obviously means that any files linked from the Control Panel relies on the default XAMPP settings that are hard wired into the Control Panel code.

Email the developer and point out your concerns (but I am sure that the developer is quite aware of this issue already).

Also an advanced forum search would have revealed that this issues has been discussed before in this forum.
Narrowboyy
 
Posts: 64
Joined: 16. February 2009 02:56


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 139 guests