herd-community icon indicating copy to clipboard operation
herd-community copied to clipboard

[Bug]: Open port 80 shows AdminerEvo

Open Gnative opened this issue 1 year ago • 4 comments

Platform

macOS

Operating system version

MAx OSX Sonoma 14.5 (23F79)

System architecture

Intel (x86)

Herd Version

1.9.1

PHP Version

8.2.21

Bug description

Following on from this bug report - https://github.com/beyondcode/herd-community/issues/900

I change my herd.conf to open the :80 port for testing on my machine as it allows mobile devices to access my herd sites for API endpoints via my local IP. This is now not useable after my last Heard update and I'm not sure how to resolve it.

server { listen 80 default_server;

I've always followed this documentation as explained in this comment - https://github.com/beyondcode/herd-community/issues/276

  • I am not a Pro user.
  • I have no other configuration changes to the base installation of Herd (that i can remember)

Steps to reproduce

No response

Relevant log output

No response

Gnative avatar Aug 01 '24 09:08 Gnative

Problem is I don't know how to release that port from AdminerEvo to allow my local testing environment again

Gnative avatar Aug 01 '24 09:08 Gnative

@Gnative As a temporary solution you can edit all the config files in /Users/[USERNAME]/Library/Application Support/Herd/config/valet/Nginx/ and remove the localhost IP.

But this changes may be overwritten by herd, if you change some settings of the page like PHP-Version, etc.

from: 
listen 127.0.0.1:80;

to: 
listen 80;

emfMaddin avatar Aug 05 '24 08:08 emfMaddin

@Gnative As a temporary solution you can edit all the config files in /Users/[USERNAME]/Library/Application Support/Herd/config/valet/Nginx/ and remove the localhost IP.

But this changes may be overwritten by herd, if you change some settings of the page like PHP-Version, etc.

from: 
listen 127.0.0.1:80;

to: 
listen 80;

Thanks @emfMaddin unfortunately that directory is empty but it got me looking into this and I found a solution. In /Users/[USERNAME]/Library/Application Support/Herd/config/valet/Nginx/nginx.conf, down the bottom of the file, change the line

include "/Applications/Herd.app/Contents/Resources/config/pro/nginx/*.conf"; to include "/Applications/Herd.app/Contents/Resources/config/pro/nginx/debug.conf";

The reason for this is /Applications/Herd.app/Contents/Resources/config/pro/nginx/ contains 2 includes, one for debugging and another for AdminerEvo which is hijacking port 80.

But this might effect users on the Pro plan, I'm not subscribed so I don't know how this would effect them. I guess most "Pro" users will either user the CLI or a DB GUI

Gnative avatar Aug 05 '24 10:08 Gnative

@Gnative True, this also works out but you will loose AdminerEvo - no problem if you don't need it :-)

emfMaddin avatar Aug 05 '24 11:08 emfMaddin

Have to change this with the Heard version 1.11.0

You can comment out the last nginx include line in ~/Library/Application Support/Herd/config/valet/Nginx/nginx.conf I.E

    #include "/Applications/Herd.app/Contents/Resources/config/default-sites/*.conf";`

Gnative avatar Sep 14 '24 14:09 Gnative

@mpociot sorry, this is still a problem in 1.11.0

Gnative avatar Sep 14 '24 14:09 Gnative