Nginx can be a web server or a reverse proxy server, but it is a pain to have to write a configuration file for each configuration.
And after each modification, you have to restart, this visualization and convenience are not as good as windows
1. nginx common commands
nginx -s stop quickly shuts down Nginx, may not save relevant information, and quickly terminates the web service. Nginx -s quit Shut down Nginx smoothly, save relevant information, and end the web service in a planned manner. nginx -s reload is reloaded because the configuration related to Nginx has been changed and the configuration needs to be reloaded. nginx -s reopen reopens the log files. nginx -c filename Specifies a configuration file for Nginx instead of the default one. nginx -t does not run, but just tests the configuration file. nginx will check the syntax of the configuration file for correctness and try to open the files referenced in the configuration file. nginx -v shows the version of nginx. nginx -V Displays the nginx version, compiler version and configuration parameters.
2. Site configuration in nginx
Reference URL: https://www.cnblogs.com/rlann/p/7427714.html
3.nginx: command not found solution
You need to configure the nginx path to the system variable
vim is also a pain in the ass
Reference URL
https://blog.csdn.net/zxc_user/article/details/74936059
4. The js file packaged by vue is very large, and nginx is very slow to load, so gzip needs to be turned on
However, there are problems with the configuration on the network, and gzip cannot be performed on js.
The "application/javascript" of the gzip_types item needs to be added
Reference URL:
https://www.cnblogs.com/qiangweikang/p/gzip_on.html
https://www.cnblogs.com/youlechang123/p/5345852.html
http://pagespeed.webkaka.com/youhua/gzip/