In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to install Nginx to add SSL module and configure port 443 service, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.
Nginx installs the SSL module and forwards the request to the background api:
The first step to install the SSL module: first check the nginx version and compile and install those modules on the server: [root@jacklin /] # / usr/local/nginx/sbin/nginx-Vnginx version: nginx/1.1.10built by gcc 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) configure arguments: step 2: if the SSL module is not installed, enter the nginx installation directory and execute the following command: # enter the original directory of the installed nginx Execute. / configure-- prefix=/usr/local/nginx-- with-http_stub_status_module-- with-http_ssl_module# and then execute the make command make
Execution of. / configure may appear. / configure: error: SSL modules require the OpenSSL library.
As a workaround, execute the following command:
Yum-y install openssl openssl-devel
Then execute. / configure-prefix=/usr/local/nginx-with-http_stub_status_module-with-http_ssl_module
Success:
Step 3: close nginx# to view nginx for ps-ef | grep nginx# kills process kill-9 PID (Nginx process ID) step 4: back up the nginx startup program and copy the newly generated obj directory to the nginx directory file # the program started before backup, backup to the current directory cp / usr/local/nginx/sbin/nginx nginx.bak# to copy obj newly generated launcher Overwrite to previous nginxcp / usr/local/src/nginx-1.1.10/objs/nginx / usr/local/nginx/sbin/nginx step 5: boot nginx# startup code format: nginx installation directory address-c nginx configuration file address / usr/local/nginx/sbin/nginx-c / usr/local/nginx/conf/nginx.conf# execution of the above command may encounter port occupation problem If it is, You can solve the problem by executing the following command # check the port corresponding to netstat-ntlpkill step 6: check again whether nginx compiles and installs the SSL module: [root@iz2zeg4xqcv95kl86o2w9bz objs] # / usr/local/nginx/sbin/nginx-Vnginx version: nginx/1.1.10built by gcc 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) TLS SNI support enabled# the following indicates that the SSL module has been successfully installed Block configure arguments:-- prefix=/usr/local/nginx-- with-http_stub_status_module-- with-http_ssl_moduleNginx configuration port 443 service # HTTPS server server {listen 443 ssl The domain name to which the server_name xcx.uxianhu.com; # certificate is bound, that is, the address pointed to on port 443The file name ssl_certificate_key / usr/local/nginx/conf/cert/3674337__uxianhu.com.key of the certificate root html; ssl_certificate / usr/local/nginx/conf/cert/3674337__uxianhu.com.pem; # # the key file name of the certificate is ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; the key file name of the certificate is ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; the key file name of the certificate is ECDH _ Location / wx {proxy_pass https://xcx.uxianhu.com:8082; # https address proxy_set_header Host xcx.uxianhu.com; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for Add_header Access-Control-Allow-Origin * # Cross-domain access Settings}} Thank you for reading this article carefully. I hope the article "how to add SSL module and configure port 443 service after installation of Nginx" shared by the editor will be helpful to you. At the same time, I hope you will support it and pay attention to the industry information channel. More related knowledge is waiting for you 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.