This happens when we use two services on the same port, usually the 80
port. This creates a conflict and the code ends up not being a process by any of them. To fix it we need to change their port, in this case, give preference to change the WampServer port, since it starts automatically, without the need to configure it every time.
Changing the port in WampServer
To change the port for this service, we need to change a file. For this we can access the config
of Apache folder. This - usually - stays in C:\wamp\bin\apache\apache<versão>\conf
. When you find it, just open the file httpd.conf
and find the code below:
Listen 0.0.0.0:80
Listen [::0]:80
Once you've done this, just change the :80
values to another value between 0
and 65537
, for example:
Listen 0.0.0.0:8080
Listen [::0]:8080
Once you've done that, just restart the server.
Check if there are no other services running on the port.
Tip: Another way is to click the WampServer icon next to the Windows clock > > Apache > link
Using other ports in artisan
In the artisan is simpler, just run the command below.
php artisan serve --port=8080