2

I wish I didn't have a server running WAMP but I do. On Linux I'd just do sudo service restart httpd or apache2 or whatever. But with WAMP? I have no clue.

There's an icon in the notification area of the taskbar that, when clicked on, shows a menu:

enter image description here

If I click "Stop All Services" or "Put Offline" and then visit http://127.0.0.1/ in Firefox I still see the website being served up.

https://stackoverflow.com/a/5065551/569976 says to do cd C:/wamp/bin/apache/apache2.2.8/bin; httpd --start. Doing so gives me this error:

[Tue Sep 29 17:06:11 2015] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
(OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted.  : make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

I also tried httpd --restart and got the same error.

When I do Start -> Run -> services.msc I don't see an Apache service. I see a wampapache service, however it's status is not "Started".

When I do netstat -a -b I see this:

  Proto  Local Address          Foreign Address        State           PID
  TCP    MYSERVER:http           MYSERVER.MYCOMPANY.local:0   LISTENING       4168
  [httpd.exe]

That's cool. I have no idea where that httpd.exe file lives however. I would have thought it was living at C:/wamp/bin/apache/apache2.2.8/bin but I have no idea.

Any ideas?

1
  • Are you sure when you stopped the service and went to the browser you weren't being shown a cached page? Try "stop all services" in the menu and clearing your browser cache before trying again. Did you do that netstat command after restarting the service? C:/wamp/bin/apache/apache2.2.8/bin; httpd --start looks like it would start the service, not stop it. Sep 30, 2015 at 1:26

2 Answers 2

3

There are various ways to start and stop Apache and or MySQL using WAMPServer

From the menu system, which is wampmanager :

wampmanager -> Apache -> Service -> Start/Resume service
wampmanager -> Apache -> Service -> Stop service
wampmanager -> Apache -> Service -> Restart service

wampmanager -> MySQL -> Service -> Start/Resume service
wampmanager -> MySQL -> Service -> Stop service
wampmanager -> MySQL -> Service -> Restart service

These menu options even enable and disable themselves depending on whether the service is currently running or not, so by looking at the availability you can see if a service is currently running or not.

Alternatively if you like to use the command line :

net start wampapache
net start wampmysqld

net stop wampapache
net stop wampmysqld

of course if you are using the 64bit WAMPServer and therefore the 64 bit Apache, the commands will be

net start wampapache64
net start wampmysqld64

net stop wampapache64
net stop wampmysqld64

The error message of course means that you have configured Apache incorrectly. Check you config changes.

The Put Online menu option is irrelevant, in this case, as all that does is amend the httpd.conf file to change the allowed access to your server, from "Offline" just local access and "Online", allow from any ip.

3
  • The net commands don't work for me (wamp on windows 10): > net stop wampapache The service name is invalid. More help is available by typing NET HELPMSG 2185.. That last command won't work either. Using cmd.exe.
    – Julien
    Apr 26, 2021 at 19:36
  • 1
    @Julien Did you start the cmd windows using "Run as Administrator"? If you did, maye you are using the 64 bit wampserver so it would be net stop wampapache64
    – RiggsFolly
    Apr 26, 2021 at 20:52
  • You are right. Running as administrator and using wampapache64 instead of wampapache works. Thanks!
    – Julien
    Apr 26, 2021 at 21:43
5
  • Press ⊞ Win + R
  • Type "services.msc" > OK
  • Find "wampapache" & "wampmysqld", right click on it/them > Start/Stop/Restart

    Restart Apache

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .