Nginx server installation and configuration 1. installation 1) install and download nginx for windows in windows, decompress the package, enter the directory, and run the following command: startnginx: nginx-s [stop | quit | reopen | reload] 2) in linux... nginx server installation and configuration 1. installation 1) install and download nginx for windows in windows, decompress it, enter the directory, and run the following command: start nginx: nginx-s [stop | quit | reopen | reload]
2) install tar zxvf pcre-8.21.tar.gz in linux (nginx installation required ). /configure www.2cto.com make install cp/usr/local/lib/libpcre. so.1/usr/lib tar zxvf nginx .... /tar.gz cd nginx .... /configure make install 2. nginx startup
Linux command:/usr/local/nginx/sbin/nginx-c/usr/local/nginx/conf/nginx. conf
(-C indicates the configuration file.) 3. nginx stop ps-ef | grep nginx find master process id kill-QUIT nginx id quickly stop kill-TERM nginx id force stop all nginx processes pkill-9 nginx 4. nginx restart 1) Check whether the configuration file is correct/usr/local/nginx/sbin/nginx-t-c/usr/local/nginx/conf/nginx. conf 2) restart kill-HUP Nginx. if the configuration file is incorrect, nginx still uses the configuration file www.2cto.com before modification. conf configuration file structure mainly consists :.... events {...} http {.... server {...} server {...}...} virtual Host Configuration # server {# listen 8000; # server_name localhost; # server_name somename alias another. alias; # location/{# root html; # index index.html index.htm; #} www.2cto.com #}# server {# listen 8080; # server_name localhost; # server_name somename alias another. alias; # location/{# root html; # index index.html index.htm ;#}#} by Chen Jianhong
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service