Home >Backend Development >PHP Tutorial >80, 433http, https coexist on one Nginx server host

80, 433http, https coexist on one Nginx server host

WBOY
WBOYOriginal
2016-07-29 09:01:481721browse

If a site requires both 80 http access and 443 https access.

To allow https and http to coexist, you cannot use ssl on in the configuration file. Configure listen 443 ssl; index index.html index.htm index.php;

root /home/wwwroot/www.iamle.com/;

#ssl on; Comment out

ssl_certificate /usr/local/nginx/conf/www_iamle_com.crt;

ssl_certificate_key /usr/local/nginx/conf/www_iamle_com.key;

#The following configuration is omitted


}


Reprinted from: http://www.iamle.com/archives/1231.html

http://nginx .org/en/docs/http/configuring_https_servers.html#single_http_https_server

The above introduces the coexistence of 80, 433 http and https on a Nginx server host, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn