Failed: Nginx nginx-1.10.1 Error
-
Laragon cannot start properly when I start it. And when I reload nginx. It says
Service Nginx can not start. Reason :nginx[emerg] could not build server_names_hash
to be specific here's the picture's link! https://gyazo.com/1e1aa8494d105a6e972feda9e101ea8f
-
@abrhambas02 : Your project name is longer than the server_names_hash value in Nginx's configuration. You can fix it easily. Check this topic:
https://forum.laragon.org/topic/250/error-service-nginx-can-not-start/7
-
@leokhoa @administrators Why does when i type nginx -t. It says
λ nginx -t
nginx: [alert] could not open error log file: CreateFile() "logs/error.log" failed (3: The system cannot find the path specified)
2017/04/22 10:46:37 [emerg] 18124#14972: CreateFile() "C:\laragon\www/conf/nginx.conf" failed (3: The system cannot find the path specified)
nginx: configuration file C:\laragon\www/conf/nginx.conf test failed
-
this one's done. How to mark it as solved ? .
This link works : http://charles.lescampeurs.org/2008/11/14/fix-nginx-increase-server_names_hash_bucket_size
-
@abrhambas02 : You must cd to nginx folder and run the command
I'll mark this topic as Solved
-
@leokhoa I couldn't Solve a "nginx -s reload" from PHP File. Because of below
nginx: [alert] could not open error log file: CreateFile() "logs/error.log" failed (3: The system cannot find the path specified)
2020/03/18 00:00:00 [emerg] 18124#14972: CreateFile() "C:\laragon\www/conf/nginx.conf" failed (3: The system cannot find the path specified)
nginx: configuration file C:\laragon\www/conf/nginx.conf test failedBut I could run same command on CLI.
Please let me know how to run on PHP File.
-
@mk333 : You must cd to nginx folder, then run the command:
cd "C:\laragon\bin\nginx"