nginx 的一些常见使用

nginx的web路径:

This is the default index.html page that is distributed with nginx on Fedora. It is located in /usr/share/nginx/html

nginx的配置路径:

You should now put your content in a location of your choice and edit the root configuration directive in the nginx configuration file /etc/nginx/nginx.conf

 

whereis nginx

/usr/sbin/nginx /usr/lib64/nginx /etc/nginx /usr/share/nginx

./nginx -t
查看nginx配置文件路径以及该文件语法是否正确

重启Nginx服务
1、进入nginx可执行目录sbin下,输入命令./nginx -s reload 即可
2、查找当前nginx进程号,然后输入命令:kill -HUP 进程号 实现重启nginx服务

 

你可能感兴趣的:(nginx,移动开发,mac,or,linux,命令,nginx)