Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Bug]: Herd 1.30.1 – nginx fails to start when Herd.app is not installed directly in /Applications (hardcoded path in config/pro/nginx/debug.conf)

Đã đóng Phù hợp với người mới
#1,761 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
76/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, nginx
Lĩnh vực
backend

Hướng nghiên cứu

Bắt đầu với config/pro/nginx/debug.conf và so sánh đường dẫn js_import với đường dẫn bundle thực tế và cấu hình nginx được tạo như mô tả trong issue. Kiểm tra cách nginx phân giải phần include này, sau đó xác minh nginx khởi động khi Herd.app được cài đặt trong một thư mục con của /Applications.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

macOS
Platform

macOS

Operating system version

macOS 26.7

System architecture

ARM64 (M1, M2, etc)

Herd Version

1.30.1

PHP Version

No response

Bug description

I'm running into a startup failure of nginx after installing Herd in a subfolder of /Applications. Details below.

Environment

  • Herd 1.30.1 (build 67), Pro features enabled
  • macOS 26.7 (arm64, Apple Silicon)
  • Herd installed at: /Applications/Development/Herd.app
    (not at /Applications/Herd.app)

Symptom
nginx does not start. The Herd log shows:

2026/10/07 01:06:59 [emerg] 46104#9609806: SyntaxError: Cannot find module
"/Applications/Herd.app/Contents/Resources/config/pro/njs/detect.js"
in /Users//Library/Application Support/Herd/config/nginx/:1

php-fpm and dnsmasq start fine; only nginx is affected.

Root cause
All user-side configs that Herd generates correctly use the actual install path, e.g.

~/Library/Application Support/Herd/config/nginx/nginx.conf
include "/Applications/Development/Herd.app/Contents/Resources/config/pro/nginx/.conf";
include "/Applications/Development/Herd.app/Contents/Resources/config/default-sites/
.conf";
~/Library/Application Support/Herd/config/nginx/herd.conf
fastcgi_param SCRIPT_FILENAME "/Applications/Development/Herd.app/Contents/Resources/valet/server.php";
~/Library/Application Support/Herd/config/php/*/php.ini
extension=/Applications/Development/Herd.app/Contents/Resources/herd-ext/herd-84-arm64.so

However, the Pro nginx config shipped inside the app bundle has the default install path hardcoded:

/Applications/Development/Herd.app/Contents/Resources/config/pro/nginx/debug.conf
js_import "/Applications/Herd.app/Contents/Resources/config/pro/njs/detect.js";

Since nginx.conf includes that file, nginx fails at config parse time whenever the bundle is not located at /Applications/Herd.app. The detect.js file itself exists at the correct location
(/Applications/Development/Herd.app/Contents/Resources/config/pro/njs/detect.js).

Expected behaviour
The js_import path in config/pro/nginx/debug.conf should be resolved relative to the actual bundle location (as is already done for all other generated configs), or the file should be templated/generated into the user config directory with the real path.

Workaround
Creating a symlink /Applications/Herd.app -> /Applications/Development/Herd.app makes nginx start again. Moving the app to /Applications also works, but defeats the purpose of organizing apps in subfolders.

Happy to provide further logs or test a build.

Best regards,

Steps to reproduce

No response

Relevant log output

Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
123
Fork
1
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của beyondcode/herd-community

Tất cả issue của beyondcode/herd-community

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.