Nginx Tomcat HTTPS configuration scheme

Source: Internet
Author: User

Nginx Directory Configuration:

Add a certificate and password under the SSL directory,

Modify the configuration file under/ETC/NGINX/CONF.D

# # Basic Reverse proxy Server # #
# # Apache backend for www.zjydjf.com # #
Upstream ZJYDJF {
Server 127.0.0.1:8080; #Apache
}

# # Start www.zjydjf.cn # #
server {
Listen 80;
server_name zjydjf.com www.zjydjf.com;
return 301 Https://zjydjf.com$request_uri;
Access_log Logs/zjydjf.access.log Main;
Error_log Logs/zjydjf.error.log;
root HTML;
Index index.html index.htm index.php;

# # Send request back to Apache # #
Location/{
Proxy_pass HTTP://ZJYDJF;

#Proxy Settings
Proxy_redirect off;
Proxy_set_header Host $host;
Proxy_set_header X-real-ip $remote _addr;
Proxy_set_header x-forwarded-for $proxy _add_x_forwarded_for;
Proxy_next_upstream Error timeout Invalid_header http_500 http_502 http_503 http_504;
Proxy_max_temp_file_size 0;
Proxy_connect_timeout 90;
Proxy_send_timeout 90;
Proxy_read_timeout 90;
Proxy_buffer_size 4k;
Proxy_buffers 4 32k;
Proxy_busy_buffers_size 64k;
Proxy_temp_file_write_size 64k;
}
}

Nginx Tomcat HTTPS configuration scheme

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.