2

I am getting this error while installing valet on my mac machine. Could somebody help?

Nginx cannot start; please check your nginx.conf [1: nginx: [emerg] unknown  
   directive "http2_push_preload" in /Users/sujitbista/.config/valet/Nginx/dg  
  demo.test:13                                                                 
  nginx: configuration file /usr/local/etc/nginx/nginx.conf test failed        
  ].   
Sujit
  • 61
  • 3
  • 7
  • Can you run `brew update`? – senty Jan 05 '20 at 16:35
  • Yep, I can run a brew update. But I have installed MAMP on my machine and I have added PHP path of MAMP in my .bash_profile. Does that caused the problem? – Sujit Jan 05 '20 at 16:54
  • Take a look here - https://github.com/laravel/valet/pull/573 - I'm not sure why you are experiencing this problem, my guess is because your nginx is old. – senty Jan 05 '20 at 17:14
  • Thank you for your help. I have removed the valet directory in .config file and reinstalled it. Then it started working – Sujit Jan 06 '20 at 04:46

4 Answers4

7

Remove the valet configurations, reinstall and start.

rm -r ~/.config/valet
valet install
valet start
3

Warning: nginx 1.19.6 is already installed, it's just not linked. To link this version, run:

  brew link nginx

..solved my problem.

Milla Sense
  • 931
  • 5
  • 4
1

checking nginx install on your local machine >> which nginx

if not found please install nginx >> brew install nginx

then follow these instructions

rm -r ~/.config/valet valet install valet start

Fairuz Sulaiman
  • 151
  • 1
  • 7
0

Update NGINX

    brew upgrade nginx
Basem Olimy
  • 767
  • 7
  • 10