nginx切换https证书上线
发表于:2025-12-02 作者:千家信息网编辑
千家信息网最后更新 2025年12月02日,server { listen 80; rewrite ^(.*)$ https://$server_name$1 permanent;
千家信息网最后更新 2025年12月02日nginx切换https证书上线
server { listen 80; rewrite ^(.*)$ https://$server_name$1 permanent; server_name example.com; if ( "$host" != 'example.com' ){ rewrite ^/(.*)$ http://example.com/$1 permanent; } access_log logs/web.log main; location / { root web目录; index index.php index.html ; } location ~ \.php$ { root web目录; fastcgi_pass unix:/dev/shm/php-fpm.socket; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME web目录$fastcgi_script_name; include fastcgi_params; }}server { listen 443; ssl on; ssl_certificate /usr/local/data/nginx/conf/https.pem; ssl_certificate_key /usr/local/data/nginx/conf/https.key; ssl_session_timeout 5m; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; access_log logs/access_web.log; location / { root web目录; index index.php index.html; } location ~ \.php$ { root web目录; fastcgi_pass unix:/dev/shm/php-fpm.socket; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME web目录$fastcgi_script_name; include fastcgi_params; }}注意
rewrite ^(.*)$ https://$server_name$1 permanent;
这里是强制重定向,去掉以后http和https 都能同时访问
目录
同时
强制
证书
切换
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
网络安全公司贵州招聘
win10开公用网络安全么
微软数据库的设计与实现
购买服务器适用税率
网络技术f5是什么意思
实现网络安全通信的协议
安卓音频服务器怎么关闭
什么叫纯真ip库数据库
软件开发实操报告
战网登录不显示哪个区的服务器
计算机网络技术建设论文
网络安全有什么好处错了错了
服务器租用后怎么登陆
网络安全线路案例分析
深圳视觉软件开发公司
高并发数据库分库分表
沈阳市服务器搬运公司价格
数据库怎么回到上一步
王音伟网络安全
线上网络安全教育美篇
数据库长时间未登录奔溃
服务器上如何安装打印机
华为用到7纳米的服务器芯片
网络安全模式啥意思
青云 云服务器
惠普打印服务器会传回数据
网络安全绘画四年级上册
未来教育数据库二级题库
服务器风扇故障排除
视频直播软件开发公司