资源预览内容
第1页 / 共39页
第2页 / 共39页
第3页 / 共39页
第4页 / 共39页
第5页 / 共39页
第6页 / 共39页
第7页 / 共39页
第8页 / 共39页
第9页 / 共39页
第10页 / 共39页
亲,该文档总共39页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
Nginx基础精品文档Nginx基础主页:http:/nginx.org/文档:http:/nginx.org/en/docs/下载:http:/nginx.org/en/download.htmlMainline versionCHANGESnginx-1.11.3pgpnginx/Windows-1.11.3pgpStable versionCHANGES-1.10nginx-1.10.1pgpnginx/Windows-1.10.1pgp标签云:Nginx(engine x) Igor Sysoev Rambler.ru 0.1.0.2004.10.4 2-clause BSD-like license Web Server Load Balance Reverse Proxy Proxy http mail streamLightweight Highly Concurrent如上所示,Nginx可作为http服务器(优势是静态资源),还可以用作http反向代理及负载均衡,最后是代理(如mail和tcp等)。作为基础文档,主要是http相关,即前两部分。Nginx安装1、下载地址:http:/nginx.org/download/nginx-1.10.1.zip2、解压后得到nginx.exe,运行3、浏览器访问目录结构tree /fFolder PATH listing for volume 新加卷Volume serial number is 361F-A9D3D:. nginx.execonf fastcgi.conf fastcgi_params koi-utf koi-win mime.types nginx.conf scgi_params uwsgi_params win-utfcontrib geo2nginx.pl README unicode2nginx koi-utf unicode-to-nginx.pl win-utf vim ftdetect nginx.vim indent nginx.vim syntax nginx.vimdocs CHANGES CHANGES.ru LICENSE OpenSSL.LICENSE PCRE.LICENCE README zlib.LICENSEhtml 50x.html index.htmllogs access.log error.log nginx.pidtemp client_body_temp fastcgi_temp proxy_temp scgi_temp uwsgi_temp控制台命令D:nginx-1.10.1nginx -hnginx version: nginx/1.10.1Usage: nginx -?hvVtTq -s signal -c filename -p prefix -g directivesOptions: -?,-h : this help -v : show version and exit -V : show version and configure options then exit -t : test configuration and exit -T : test configuration, dump it and exit -q : suppress non-error messages during configuration testing -s signal : send signal to a master process: stop, quit, reopen, reload -p prefix : set prefix path (default: NONE) -c filename : set configuration file (default: conf/nginx.conf) -g directives : set global directives out of configuration file其他,结束进程:taskkill /F /IM nginx.exe默认配置文件(nginx.conf)#user nobody;worker_processes 1;#error_log logs/error.log;#error_log logs/error.log notice;#error_log logs/error.log info;#pid logs/nginx.pid;events worker_connections 1024;http include mime.types; default_type application/octet-stream; #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; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; server listen 80; server_name localhost; #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 /50x.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 to .htaccess files, if Apaches document root # concurs with nginxs 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 ssl; # server_name localhost; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; #
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号