In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to configure the Nginx server under the Windows system". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to configure the Nginx server under the Windows system.
Start nginx
Cd d:cd nginx-1.2.4start nginx
Check that there will be nginx processes in Task Manager.
When you enter http://127.0.0.1 in the browser, the welcome interface of nginx will appear, indicating that nginx has been started successfully.
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.commercial support is available at nginx.com.thank you for using nginx.
Other actions:
Nginx-s stop / / stop nginxnginx-s reload / / reload configuration file nginx-s quit / / exit nginx
Configuration file:
# user nobody; worker_processes # threads started: number of kernels * 2 # incorrect 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 per process} http {include mime.types; default_type application/octet-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 access_log logs/host.access.log main;# # request time # gzip on; enable gzip compression # server set virtual machine, you can set multiple server {listen 80th # listening port server_name localhost;# listening domain name # charset koi8-r; # access_log logs/host.access.log main;# the virtual machine log storage location 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 500502503504 / 50x.html; location = / 50x.html {root html } # proxy the php scripts to apache listening on 127.0.0.1 php$ 80 # # location ~. Php$ {# proxy_pass http://127.0.0.1; #} # pass the php scripts to fastcgi server listening on 127.0.1 # location ~. Php$ {# root html; # fastcgi_pass 127.0.1 # fastcgi_index index.php; # fastcgi_param script_filename / scripts$fastcgi_script_name; # include fastcgi_params; #} # deny access to .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 # server_name localhost; # ssl on; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_timeout 5m; # ssl_protocols sslv2 sslv3 tlsv1; # ssl_ciphers highrig Md5; # ssl_prefer_server_ciphers on; # location / {# root html; # index index.html index.htm #} #}}
Tips:
Run nginx-v to see which modules are supported by the compiled version of the platform. My result here is:
Nginx version: nginx/0.7.65 tls sni support enabled configure arguments:-- builddir=objs.msvc8-- crossbuild=win32-- with-debug-- prefix=-- conf-path=conf/nginx.conf-- pid-path=logs/nginx.pid-- http-log-path=logs/access.log-- error-log-path=logs/error.log-- sbin-path=nginx.exe-- http-client-body-temp-path=temp/client_body_temp -http-proxy-temp-path=temp/proxy_temp-- http-fastcgi-temp-path=temp/fastcgi_temp-- with-cc-opt=-dfd_setsize=1024-- with-pcre=objs.msvc8/lib/pcre-7.9-- with-openssl=objs.msvc8/lib/openssl-0.9.8k-- with-openssl-opt=enable-tlsext-- with-zlib=objs.msvc8/lib/zlib-1.2.3-- with-select_module With-http_ssl_module-- with-http_realip_module-- with-http_addition_module-- with-http_sub_module-- with-http_dav_module-- with-http_stub_status_module-- with-http_flv_module-- with-http_gzip_static_module-- with-http_random_index_module-- with-http_secure_link_module With-mail-with-mail_ssl_module-with-ipv6 nginx version: nginx/0.7.65 tls sni support enabled configure arguments:-builddir=objs.msvc8-crossbuild=win32-with-debug-prefix= conf-path=conf/nginx.conf pid-path=logs/nginx.pid http-log-path=logs/access.log error-log-path=logs/error.log- -sbin-path=nginx.exe-http-client-body-temp-path=temp/client_body_temp-- http-proxy-temp-path=temp/proxy_temp-- http-fastcgi-temp-path=temp/fastcgi_temp-- with-cc-opt=-dfd_setsize=1024-- with-pcre=objs.msvc8/lib/pcre-7.9-- with-openssl=objs.msvc8/lib/openssl-0.9.8k-- with-openssl-opt=enable-tlsext-- with -zlib=objs.msvc8/lib/zlib-1.2.3-with-select_module-- with-http_ssl_module-- with-http_realip_module-- with-http_addition_module-- with-http_sub_module-- with-http_dav_module-- with-http_stub_status_module-- with-http_flv_module-- with-http_gzip_static_module-- with -http_random_index_module-with-http_secure_link_module-with-mail-with-mail_ssl_module-with-ipv6
View nginx processes
Tasklist / fi "imagename eq nginx.exe"
As shown below:
At this point, I believe you have a deeper understanding of "how to configure the Nginx server under the Windows system". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.