Closed aerrata closed 1 year ago
When I cat /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
, the "daemon off;" string seems strange.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>homebrew.mxcl.nginx</string>
<key>LimitLoadToSessionType</key>
<array>
<string>Aqua</string>
<string>Background</string>
<string>LoginWindow</string>
<string>StandardIO</string>
<string>System</string>
</array>
<key>ProgramArguments</key>
<array>
<string>/opt/homebrew/opt/nginx/bin/nginx</string>
<string>-g</string>
<string>'daemon off;'</string> <------- :\
</array>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>/opt/homebrew</string>
</dict>
</plist>
https://github.com/laravel/valet/issues/1110 seems similar to this issue, but it's already 1 year old now. Any ideas?
Thanks.
I thought it was only me. I was just resolved it by reinstalling all stuff. But, still there are some issues left, like certificate (.crt) is missing and php isolate not working anymore.
I have the same problem, might it be connected to this PR in homebrew?
https://github.com/Homebrew/homebrew-core/pull/121021
It seems to change some of the code discussed in the old ticket: https://github.com/laravel/valet/issues/1110
I have the same problem, might it be connected to this PR in homebrew?
It seems to change some of the quotes discusses in the old ticket: #1110
It didn't work for me though. The only way just let valet do the rest installation. But, do clean install.
Reinstalling didn't work for me unfortunately:
valet uninstall
valet install
valet uninstall --force
valet install
I also tried modifying the .plist files in:
~/Library/LaunchAgents/homebrew.mxcl.nginx.plist
/opt/homebrew/Cellar/nginx/1.23.3/homebrew.mxcl.nginx.plist
From
<string>'daemon off;'</string>
To
<string>daemon off;</string>
But keep on getting:
brew services list
nginx error 256 root ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist
And
cat /opt/homebrew/var/log/nginx/error.log
2023/01/26 14:04:46 [emerg] 45882#0: unexpected end of parameter, expecting ";" in command line
I already do factory reset 3 times today 😅, but to no avail.
This is most likely the issue https://github.com/Homebrew/homebrew-core/pull/121021/files
I commented on their commit issue, waiting for response.
Dont forget to remove all valet config files within ~/.config/valet
And then remove valet from global composer as well.
Same error after doing fresh install today on Intel Mac 13.2, nginx error.log
showing :
[emerg] 63287#0: unexpected end of parameter, expecting ";" in command line
A workout to get Nginx running for me has been to run sudo nginx
in terminal for some reason that then allows nginx to work for me with Valet.
I still get the error in Brew services however it lets me still get my work done. Seems like a core Homebrew issue.
A workout to get Nginx running for me has been to run
sudo nginx
in terminal for some reason that then allows nginx to work for me with Valet.I still get the error in Brew services however it lets me still get my work done. Seems like a core Homebrew issue.
It only works for non-secure links. But it will do the job while waiting for a patch 👍
I have fixed this error at my place. I don't want to duplicate, but I've provided a link to a comment where I pointed out what I did and now I no longer have this problem.
https://github.com/Homebrew/homebrew-core/pull/121021#issuecomment-1405330022
I'm facing the same issue, to be able to continue my work, I run in the terminal sudo nginx
on every system restart.
@xartuu this fixed the problem. Hopefully they can have a release that contains a fix for this.
I have fixed this error at my place. I don't want to duplicate, but I've provided a link to a comment where I pointed out what I did and now I no longer have this problem.
Perfect, thanks @xartuu, now it works with the secure links with your temporary fix 👍
Referring to this PR https://github.com/Homebrew/homebrew-core/pull/121639.
I can confirm that this issue has been fixed, nginx starts normally now.
Consider running brew update && brew reinstall nginx
. Thanks 👍🏻
Description:
I'm doing a fresh install on my M1 Mac, unfortunately after running
valet install
, nginx is not starting up.Running
less /opt/homebrew/var/log/nginx/error.log
, returns:Steps To Reproduce:
brew install php
brew install composer
composer global require laravel/valet
valet install
The output
Diagnosis
sw_vers
valet --version
cat ~/.config/valet/config.json
cat ~/.composer/composer.json
composer global diagnose
composer global outdated
ls -al /etc/sudoers.d/
brew config
brew services list
brew list --formula --versions | grep -E "(php|nginx|dnsmasq|mariadb|mysql|mailhog|openssl)(@\d\..*)?\s"
brew outdated
brew tap
php -v
which -a php
php --ini
nginx -v
curl --version
php --ri curl
~/.composer/vendor/laravel/valet/bin/ngrok version
ls -al ~/.ngrok2
brew info nginx
brew info php
brew info openssl
openssl version -a
openssl ciphers
sudo nginx -t
which -a php-fpm
/opt/homebrew/opt/php/sbin/php-fpm -v
sudo /opt/homebrew/opt/php/sbin/php-fpm -y /opt/homebrew/etc/php/8.2/php-fpm.conf --test
ls -al ~/Library/LaunchAgents | grep homebrew
ls -al /Library/LaunchAgents | grep homebrew
ls -al /Library/LaunchDaemons | grep homebrew
ls -al /Library/LaunchDaemons | grep "com.laravel.valet."
ls -aln /etc/resolv.conf
cat /etc/resolv.conf
ifconfig lo0
sh -c 'echo "------\n/opt/homebrew/etc/nginx/valet/valet.conf\n---\n"; cat /opt/homebrew/etc/nginx/valet/valet.conf | grep -n "# valet loopback"; echo "\n------\n"'
sh -c 'for file in ~/.config/valet/dnsmasq.d/*; do echo "------\n~/.config/valet/dnsmasq.d/$(basename $file)\n---\n"; cat $file; echo "\n------\n"; done'
sh -c 'for file in ~/.config/valet/nginx/*; do echo "------\n~/.config/valet/nginx/$(basename $file)\n---\n"; cat $file | grep -n "# valet loopback"; echo "\n------\n"; done'