In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
1. Install [root@localhost ~] # yum-y install gcc wget pcre-devel openssl-devel# sticky third-party extension module for session binding More powerful than the session binding module implemented by nginx by default [root@localhost ~] # wget https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/get/master.tar.gz[root@localhost ~] # wget http://nginx.org/download/nginx-1.14.2.tar.gz[root@localhost ~] # tar xvf nginx-1.14.2.tar.gz [root@localhost ~] # tar xvf master.tar.gz [root@localhost ~ ] # cd nginx-1.14.2 [root@localhost ~] #. / configure-- prefix=/opt/nginx-1.14.2-- user=nginx-- group=nginx-- with-http_ssl_module-- with-http_stub_status_module-- with-http_realip_module\-- add-module=../nginx-goodies-nginx-sticky-module-ng-08a395c66e42/ [root@localhost] # make-j $(cat / proc/cpuinfo | grep-c processor) & & make install [root@localhost] # ln-s / opt/nginx-1.14.2/ / opt/nginx [root@localhost ~] # echo 'PATH=$ {PATH}: / opt/nginx/sbin/' > / etc/profile.d/nginx.sh [root@localhost ~] # useradd-M-s / sbin/nologin nginx2. Configure user nginx;worker_processes 6 include mime.types; default_type application/octet-stream; server_names_hash_bucket_size computers 000001 000010 000100 001000 010000 100000 logs/nginx.pid;events {include mime.types; default_type application/octet-stream; server_names_hash_bucket_size 10240;} http {include mime.types; default_type application/octet-stream; server_names_hash_bucket_size 512; pid 512 Log_format main'$http_x_real_ip $remote_addr $http_host-$remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer"$http_user_agent"; sendfile on; keepalive_timeout 120; client_max_body_size 15m; proxy_store off; proxy_redirect off; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for Proxy_set_header X-Real-IP $http_x_real_ip; proxy_set_header Host $http_host; proxy_connect_timeout 120; proxy_read_timeout 120; proxy_send_timeout 120; upstream test {sticky expires=30d name=test1; server 192.168.1.1 http_host; proxy_connect_timeout 80; server 192.168.1.2 http_host; proxy_connect_timeout 80; server 192.168.1.3 http_host; proxy_connect_timeout 80 } # Force http to jump to https # if ($server_port = 80) {# return 301 https://$host$request_uri; #} server {listen 80; server_name http.test.com; access_log logs/access.log main; location / {proxy_pass https://test; }} server {listen 443 ssl; server_name https.test.com; access_log logs/access.log main; ssl_certificate "/ PATH/xxxxx.crt"; ssl_certificate_key "/ PATH/xxxxx.key"; ssl_session_cache shared:SSL:1m; ssl_session_timeout 10m; ssl_ciphers High Ssl_prefer_server_ciphers on; location / {proxy_pass https://test;} 3. Create UnitFile file [root@localhost ~] # cat > / usr/lib/systemd/system/nginx.service
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.