linux web服务器怎么配置ssl
2个回答
展开全部
每种web服务器不太一样,配置https默认为443端口。需要准备ssl证书。
1、java相关比如tomcat/weblogic等,需要keystore文件包含ssl证书,例如tomcat需要在conf/server.xml配置
<Connector port="443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" keystoreFile="keystore.jks" keypass="123456" URIEncoding="UTF-8"/>
2、apache/nginx等需要用key和pem证书,例如nginx
server {
listen 443;
server_name localhost;
ssl on;
ssl_certificate www.pem;
ssl_certificate_key www.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 SSLv2 SSLv3;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+SSlv3:+EXP;
ssl_prefer_server_ciphers on;
location /{
/www;
include proxy.conf;
}
}
3、例如IIS,需要PFX或P12证书,配置https,443端口,指定ssl证书即可
4、netstat -ntlp检查443端口是否开启
1、java相关比如tomcat/weblogic等,需要keystore文件包含ssl证书,例如tomcat需要在conf/server.xml配置
<Connector port="443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" keystoreFile="keystore.jks" keypass="123456" URIEncoding="UTF-8"/>
2、apache/nginx等需要用key和pem证书,例如nginx
server {
listen 443;
server_name localhost;
ssl on;
ssl_certificate www.pem;
ssl_certificate_key www.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 SSLv2 SSLv3;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+SSlv3:+EXP;
ssl_prefer_server_ciphers on;
location /{
/www;
include proxy.conf;
}
}
3、例如IIS,需要PFX或P12证书,配置https,443端口,指定ssl证书即可
4、netstat -ntlp检查443端口是否开启
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询