Failed to start A high performance web server and a reverse
阿新 • • 發佈:2019-01-09
點選開啟連結
I am running nginx on Raspbian Jessie operating system.
I just created new virtual host and reloaded nginx service:
Turns out I can test if the configuration file is OK with:
And it says that it is not configured:
Its good now:
I am running nginx on Raspbian Jessie operating system.
I just created new virtual host and reloaded nginx service:
/etc/init.d/nginx restartNow I got:
[....] Reloading nginx configuration (via systemctl): nginx.serviceJob for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details. failed!
nginx -t -c /etc/nginx/nginx.confThis time it says:
nginx: [emerg] could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32nginx: configuration file /etc/nginx/nginx.conf test failedLets check what this setting is in config:
grep server_names_hash_bucket_size /etc/nginx/nginx.conf
# server_names_hash_bucket_size 64;OK lets increase this as it says:
sed -i "s/^.*server_names_hash_bucket_size..*;$/server_names_hash_bucket_size 64;/" /etc/nginx/nginx.confCheck again:
grep server_names_hash_bucket_size /etc/nginx/nginx.conf
server_names_hash_bucket_size 64;Lets test config file:
nginx -t -c /etc/nginx/nginx.confThis now says:
nginx: the configuration file /etc/nginx/nginx.conf syntax is oknginx: configuration file /etc/nginx/nginx.conf test is successfulGot to go:
/etc/init.d/nginx restartCheck out more fromnginx
再分享一下我老師大神的人工智慧教程吧。零基礎!通俗易懂!風趣幽默!還帶黃段子!希望你也加入到我們人工智慧的隊伍中來!https://blog.csdn.net/jiangjunshow