Asked  7 Months ago    Answers:  5   Viewed   79 times

This is my Apache httpd.conf settings :

Listen 8012
ServerName localhost:8012

Every time I start Apache via XAMPP I see this message:

Status Check OK
Busy…
Apache Started [Port 80]

Anybody, please help me can I change any other settings ?

 Answers

99

To answer the original question:

To change the XAMPP Apache server port here the procedure :

1. Choose a free port number

The default port used by Apache is 80.

Take a look to all your used ports with Netstat (integrated to XAMPP Control Panel).

Screenshot of xampp control netstat

Then you can see all used ports and here we see that the 80port is already used by System.

screenshot netstat port 80

Choose a free port number (8012, for this exemple).

2. Edit the file "httpd.conf"

This file should be found in C:xamppapacheconf on Windows or in bin/apache for Linux.:

Listen 80
ServerName localhost:80

Replace them by:

Listen 8012
ServerName localhost:8012

Save the file.

Access to : http://localhost:8012 for check if it's work.

If not, you must to edit the http-ssl.conf file as explain in step 3 below. ?

3. Edit the file "http-ssl.conf"

This file should be found in C:xamppapacheconfextra on Windows or see this link for Linux.

Locate the following lines:

Listen 443
<VirtualHost _default_:443>
ServerName localhost:443

Replace them by with a other port number (8013 for this example) :

Listen 8013
<VirtualHost _default_:8013>
ServerName localhost:8013

Save the file.

Restart the Apache Server.

Access to : http://localhost:8012 for check if it's work.

4. Configure XAMPP Apache server settings

If your want to access localhost without specify the port number in the URL
http://localhost instead of http://localhost:8012.

  • Open Xampp Control Panel
  • Go to Config ? Service and Port Settings ? Apache
  • Replace the Main Port and SSL Port values ??with those chosen (e.g. 8012 and 8013).
  • Save Service settings
  • Save Configuration of Control Panel
  • Restart the Apache Server xampp apache setting port It should work now.

4.1. Web browser configuration

If this configuration isn't hiding port number in URL it's because your web browser is not configured for. See : Tools ? Options ? General ? Connection Settings... will allow you to choose different ports or change proxy settings.

4.2. For the rare cases of ultimate bad luck

If step 4 and Web browser configuration are not working for you the only way to do this is to change back to 80, or to install a listener on port 80 (like a proxy) that redirects all your traffic to port 8012.

To answer your problem :

If you still have this message in Control Panel Console :

Apache Started [Port 80]

  • Find location of xampp-control.exe file (probably in C:xampp)
  • Create a file XAMPP.INI in that directory (so XAMPP.ini and xampp-control.exe are in the same directory)

Put following lines in the XAMPP.INI file:

[PORTS]
apache = 8012

Now , you will always get:

Apache started [Port 8012]

Please note that, this is for display purpose only. It has no relation with your httpd.conf.

Tuesday, June 1, 2021
 
e_i_pi
answered 7 Months ago
84

you can also fix it by editing your host file usually located in %systemroot%system32driversetchosts

first of all backup your hosts file

comment this line by adding # at the beginning of the line(if its already their)

#::1 localhost 

add this line in the end of the file

127.0.0.1       localhost

save it and restart your pc

if you face any problem just restore your hosts file

Wednesday, March 31, 2021
 
Manju
answered 9 Months ago
38

Follow the steps that are described on this answer just instead of using the drop down, type the port (8787) in "port range" an then "Add rule".

Go to the "Network & Security" -> Security Group settings in the left hand navigation

enter image description here Find the Security Group that your instance is apart of Click on Inbound Rules enter image description here Use the drop down and add HTTP (port 80) enter image description here Click Apply and enjoy

Wednesday, June 9, 2021
 
turik
answered 6 Months ago
27

solved by editing httpd.conf

I have got this working. As per http://www.acwolf.com/blog/2009/February/xampp-virtual-hosts-mac, in OSX it is necessary to make two changes to httpd.conf, first, uncomment

#Include /Applications/xampp/etc/extra/httpd-vhosts.conf

and second, change the user from nobody to the username you use to log into OSX. You may also need to delete your browser's cache.

Sunday, August 1, 2021
 
StampyCode
answered 4 Months ago
23

"could not bind to address 0.0.0.0:80" means that, when it starts up, it tries to bind to port 80 on all available network interfaces. As IIS already has hogged one (or more) IPs to bind to, apache cannot get any and so will fail.

(I'm not sure if it will bind to any available IPs if you've configured it to bind to all, but one is already taken.)

So, configure Apache to bind to a different port (if you only have 1 IP address), or to bind to a different IP or range of IPs.

You do this by changing the binding. First find the Listen directive in the configuration file (httpd.conf) and change it. Currently it will say "Listen 80" (meaning all IPs), change it to say "Listen 192.168.0.2:80" to make it bind to that specified IP address.

You may have to edit the IIS configuration too to tell it to only bind to a single IP address too.

Wednesday, October 27, 2021
 
tiny
answered 1 Month ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :  
Share