A few days ago with the Nginx proxy HTTPS, the application of redirect HTTPS to HTTP, resulting in the Web site can not access the problem, find a half-day on the internet, finally found a solution.
Although I resolved, I believe there are other friends have encountered this problem, so reprint share:
Cause Analysis
use Nginx (HTTPS) to do a reverse proxy for Tomcat (HTTP)
The company uses Tomcat to deploy a service that needs to be delivered externally via the Internet. In view of security considerations, the company requires the use of HTTPS external services, in the configuration of Nginx
Background:Recently because of work needs, need to do a proxy in the Web front end, to solve the needs of some users can not access, before the Nginx reverse proxy has been implemented to the Web proxy, but later found that there are sites for HTTPS, so find some information
Nginx forward proxy http and https in CentOS VM instancesForward proxy http
In the Directory/apps/conf/nginx/vhostsCreate a new file, such as a.test.com. The file content is as follows:
Server {listen 80; server_name a.test.com; location/{expires 302400 s; proxy_pass url; //
Nginx self-Signed https and reverse proxyScenario
The company's wiki Server and docker private registry are both on the company's desktop cloud. Due to the shortage of public IP resources, each of these servers cannot be configured with a public IP address and can only be accessed through one public IP address, therefore, you need to use Nginx as a reverse
Nginx reverse proxy https service
Background:
Recently, due to work requirements, you need to create a proxy on the Web Front-end to address the inaccessible needs of some users. Previously, Web Proxy has been implemented through Nginx
Nginx (https) reverse proxy tomcat (http) Implementation tutorial, nginxtomcat
Both nginx and tomcat are configured
The nginx. conf configuration is as follows:
Focus: proxy_set_header X-Forwarded-Proto $ scheme. In addition, because ngrok also requires port 80, the new ip a
Nginx when the proxy, the site through the proxy access to HTTPS will fail, and the reason for the failure is that the client and the Nginx Proxy server to establish a connection failure, not
The use of Nginx configuration HTTPS proxy is divided into two, one is the backend for the HTTP application when the front-end agent uses SSL certificate to configure HTTPS reverse proxy, the other is the back end for the HTTPS ap
Nginx can reverse proxy HTTP, also can proxy HTTPS, just need SSL certificate. A handy certificate is recommended here:Https://github.com/Neilpang/acme.sh/wiki/%E8%AF%B4%E6%98%8EThe steps are very detailed.Install Nginx Reference:http://mrdeng.blog.51cto.com/3736360/1735313T
Generate a certificate file
Generate a self-signed certificate and place it in the specified location
3650'/CN=odoo.youyun.com/' -nodes -newkey rsa:2048sudosudo mv server.key server.crt /etc/ssl/nginx
Configure Nginx
sudosudo vim /etc/nginx/sites-avalibale/odoo.conf
Delete the default Nginx defaults file and create a
An overseas top-up Interface (HTTPS) on the line is often interrupted by my network problem, I want to use HK's machine to do an HTTPS reverse proxy and no certificate.At firstAt first, the idea was to proxy with Nginx TCP forwarding:Add --with-stream option when compiling
Nginx Reverse Proxy HTTPSFirst, agent Nginx open 80,443 port############################################################################# cat/etc/nginx/conf.d/nginx_http.conf# set to go directly to HTTPS when accessing via HTTP domain nameserver {Listen 80;server_name www.me
this blog http://www.cnblogs.com/fengnovo/p/6230013.html2. Modify the next/usr/local/etc/nginx/nginx.conf file toThe server {} wrapped up the paragraph to the followingAdd_header access-control-allow-origin *;add_header access-control-allow-headers X-Requested-With;add_header Access-control-allow-methods Get,post,options;server { Listen 8000; Location/api { }The above three sentences are the clients that set the server side
The basic proxy configuration is not said now post configuration and highlight a few error-prone issues.User Nginx;Worker_processes 1;Error_log/var/log/nginx/error.log;Pid/var/run/nginx.pid;Events {Worker_connections 1024;}HTTP {Include/etc/nginx/mime.types;Default_type Application/octet-stream;Log_format Main ' $remot
NGINX -- configure HTTPS encrypted reverse proxy access-Self-Signed CA, nginxhttps
Reprinted please indicate the source: http://blog.csdn.net/l1028386804/article/details/46695495
For internal access considerations of the company, the CA used is generated by self-Signed Openssl on the local machine. Therefore, it cannot be verified by the Internet industry Root CA
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.