I recently installed Laravel Herd for my Laravel projects. However, I encountered some issues:
Nginx log error:
2024/06/05 22:20:17 [emerg] 8764#8936: bind() to 127.0.0.1:80 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)
When running the php artisan serve command, I get the following output:
Failed to listen on 127.0.0.1:8000 (reason: ?)
Failed to listen on 127.0.0.1:8001 (reason: ?)
Failed to listen on 127.0.0.1:8002 (reason: ?)
Failed to listen on 127.0.0.1:8003 (reason: ?)
Failed to listen on 127.0.0.1:8004 (reason: ?)
Failed to listen on 127.0.0.1:8005 (reason: ?)
Failed to listen on 127.0.0.1:8006 (reason: ?)
Failed to listen on 127.0.0.1:8007 (reason: ?)
Failed to listen on 127.0.0.1:8008 (reason: ?)
Failed to listen on 127.0.0.1:8009 (reason: ?)
Failed to listen on 127.0.0.1:8010 (reason: ?)
Everything was working fine when I was using XAMPP and Composer, which I had installed manually.
However, after installing Laravel Herd for my Laravel projects, I encountered these issues. I have checked the ports.
PS C:WindowsSystem32> for ($port = 8000; $port -le 8010; $port++) {
>> $connections = Get-NetTCPConnection -LocalPort $port -ErrorAction SilentlyContinue
>> if ($connections) {
>> Write-Output "Port $port is in use."
>> } else {
>> Write-Output "Port $port is free."
>> }
>> }
>>
Port 8000 is free.
Port 8001 is free.
Port 8002 is free.
Port 8003 is free.
Port 8004 is free.
Port 8005 is free.
Port 8006 is free.
Port 8007 is free.
Port 8008 is free.
Port 8009 is free.
Port 8010 is free.
disabled and enable the firewall, check if my php.ini file is present(which it is) and I have also restarted my laptop
Nyanor Nathaniel Owusu Achiaw is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.