Install and configure nginxwindows

Source: Internet
Author: User
Install and configure nginxin windows: Installing...
Nginx windows installation and configuration: d: cd nginx-1.2.4start nginx view Task Manager contains nginx process www.2cto.com in the browser input http: // 127.0.0.1 at this time nginx welcome interface, it indicates that nginx is successfully started. Welcome to nginx! If you see this page, the nginx web server is successfully installed and working. further configuration is required. for online documentation and support please refer to nginx.org. specified cial support is available at nginx.com. thank you for using nginx.
Other operations: nginx-s stop // stop nginxnginx-s reload // reload the configuration file nginx-s quit // exit the nginx www.2cto.com configuration file: [plain] # user nobody; worker_processes 1; # number of threads started: number of cores in a book * 2 [plain] # error location and level # error_log logs/error. log; # error_log logs/error. log notice; # error_log logs/error. log info; # pid logs/nginx. pid; # pid process file location events {worker_connections 1024; # maximum number of connections for each process} http {include mime. types; default_type application/o Ctet-stream; # nginx log format definition, you can reference # log_format main '$ remote_addr-$ remote_user [$ time_local] "$ request"' # '$ status $ body_bytes_sent "$ http_referer"' # '"$ http_user_agent" "$ http_x_forwarded_for "'; # access_log logs/access. log main; # log path sendfile on; # tcp_nopush on; # keepalive_timeout 0; keepalive_timeout 65; # Request time # gzip on; enable gzip compression # server as the virtual machine set, multiple server {listen 80; # listener Port server_name loc Alhost; # listening domain name # charset KOI8-R; # access_log logs/host. access. log main; # location/{root html; index index.html index.htm;} # error_page 404/404 .html; # redirect server error pages to the static page/50x.html # error_page 500 502 503 504/50 x.html; location =/50x.html {root html;} # proxy the PHP scripts to Apache listening on 127.0.0.1: 80 ## location ~ \. Php $ {# proxy_pass http://127.0.0.1 #}# Pass the PHP scripts to FastCGI server listening on 127.0.0.1: 9000 ## location ~ \. Php $ {# root html; # fastcgi_pass 127.0.0.1: 9000; # fastcgi_index index. php; # fastcgi_param SCRIPT_FILENAME/scripts $ fastcgi_script_name; # include fastcgi_params; #}# deny access. htaccess files, if Apache's document root # concurs with nginx's one # location ~ /\. Ht {# deny all ;#}# another virtual host using mix of IP-, name-, and port-based configuration # server {# listen 8000; # listen somename: 8080; # server_name somename alias another. alias; # location/{# root html; # index index.html index.htm; #}#}# HTTPS server # server {# listen 443; # server_name localhost; # ssl on; # ssl_certificate cert. pem; # ssl_certificate_key cert. key ;# Ssl_session_timeout 5 m; # ssl_protocols SSLv2 SSLv3 TLSv1; # ssl_ciphers HIGH :! ANULL :! MD5; # ssl_prefer_server_ciphers on; # location/{# root html; # index index.html index.htm ;#}} under www.2cto.com linux: start nginx: /installation directory/nginx-c configuration file directory.-c is used to load the configuration file. the default value is conf/nginx under the installation directory. conf: force stop: kill-9 nginx easy stop: kill-QUIT 'cat nginx pid Directory 'Quick stop: kill-TERM 'cat nginx pid Directory 'or kill-INT 'cat nginx pid Directory: kill-HUA 'cat nginx pid Directory '(for smooth restart, check whether the configuration file is correct:/installation directory/nginx-t-c)

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.