Configure HTTPS encrypted reverse proxy access in NGINX-Self-Signed CA
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. Therefore, the website is not trusted or the security certificate is invalid, skip this step and access it
NGINX configuration HTTPS encryption reverse proxy access-Self-Signed CA, nginxhttpsFor 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. Therefore, the website is not trusted or the security certificate is invalid, skip this step
Forward Proxy HTTPserver {Listen 81;Location/{Resolver 8.8.8.8;Proxy_pass http://$http _host$request_uri;}}Forward proxy HTTPSserver {Listen 82;Location/{Resolver 8.8.8.8;Proxy_pass https://$http _host$request_uri;}In particular, when using an HTTPS proxy, you need to change
First, HTTPS parsingHTTPS encryptionPrivatePublicThe HTTP handshake is to confirm that the network is connected.HTTPS handshake is an encrypted process encryption diagramII. deployment of HTTPS services using Nginx1. Certificate Generation command (https://gist.github.com/Jokcy/5e73fd6b2a9b21c142ba2b1995150808) Copy commands are run on git2. Configure the
, not the strict meaning of the server certificate Serverca, the real serverca is the need to use this rootca and then to the server signed out of the certificate to calculate But we're just here to talk about how to implement SSL encryption for Web pages. So I used the ROOTCA directly. It is also possible to implement the encryption function normally.Nginx configuration Enable HTTPS and configure the crypto reverse proxywatermark/2/text/ahr0cdovl2jsb
https://my.oschina.net/duxuefeng/blog/275179Just found this article, two years ago, I think I need to point out that the text end of Nginx does not support HTTPS proxy is wrong.650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M01/8A/FA/wKiom1g_8kPDCfqFAAAX5GHr6qo480.jpg "title=" 1.jpg " alt= "Wkiom1g_8kpdcfqfaaax
. Your domain name. net;Root/home/webroot/static /;Index. php index.html;#...} Sever {Listen 80;Sever_name upload. Your domain name. net;Root/home/webroot/upload /;Index. php index.html;#...} Server {Listen 443;Server_name www. Your domain name. net img. Your domain name. net static. Your domain name. net upload. Your domain name. net;Ssl on;Ssl_certificate/usr/local/nginx/conf/your domain name. net. crt;Ssl_certificate_key/usr/local/
#定义代理缓存路径, cache file save path cache initial size and maximum cache time
Proxy_cache_path d:\code\cache levels=1:2 keys_z max_size=20m inactive=1m;
Location/{
#配置上面定义的keys_zone的值Proxy_cache cache1;
#配置url中包括哪个参数的时候不去缓存中查询Proxy_cache_bypass $arg _name;
#定义缓存的keyProxy_cache_key $host $uri$is_args$args;
#缓存时间, if there is cache-control in the header information in response, the cache time in the header will prevail.Proxy_cache_valid 2m;
#当缓存失效后回源出错的时候可以使用缓存中旧数据, the old is better than wron
Node development phase, generally used
httpModule to start a local server, easy to debug.
It's probably like this:
varrequire("http");var server = http.createServer();server.listen(8888);
So the question is, how do I deploy my application to the VPS? You can't use it http://10.88.77.66:8888 to access it? Yes, the title of the article is the solution.
My environment is roughly the same centos 6 lnmp一键部署 . As lnmp for how to operate, I will not write. Google for yourself
Suppose my domain name is
Through Nginx reverse proxy, will not get the real IP, is to obtain the Nginx IP, to get the real IP to be configured nginx configuration file: nginx.conf
Proxy_set_header X-real-ip $remote _addr;
For example:
######################################################################## #要转发地域名: Upstream t.csdn.com {
of the PHP-FPM listener
Fastcgi_pass 127.0.0.1 This format when you specify a listener address
vim /data/wwwroot/test.com/example.phpWritecurl -x127.0.0.1:80 test.com/example.phpFour, nginx agentcd /usr/local/nginx/conf/vhostdig www.baidu.com //查找一个网站的ipIf the dig command does not existyum install -y curl -x127.0.0.1:80 www.baidu.com/robots.txtvim proxy.conf //加入如下内容server{ listen 80
Nginx https encryption and nginx log configuration and managementAdvantages of using NginxAs a WEB server, Nginx is highly efficient in processing static files, index files, and automatic indexes.As a proxy server, Nginx can imple
One, the scene:Some Linux servers are in the intranet, and there is no public network IP, so you want to communicate with the external network can only be HTTP/HTTPS through the way of NAT or proxy. NAT server has the restriction of network segment, and HTTP/HTTPS proxy agent is not, it is convenient to use. However, t
:/tmp/php-fcgi.sock;Fastcgi_index index.php;Fastcgi_param Script_filename/data/wwwroot/test.com$fastcgi_script_name;}Fastcgi_pass used to specify the address or socket of the PHP-FPM listener[Email protected] ~]# vi/data/wwwroot/test.com/3,phpFour, nginx agentCd/usr/local/nginx/conf/vhostVim proxy.conf//Add the following:Server{Listen 80;server_name ask.apelearn.com;Location/{Proxy_pass http://121.201.9.155
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.