开发者社区> 问答> 正文

nginx配置ssl之后http能访问https报403

server { listen 443 ssl; ssl_certificate C:/phpstudy_pro/Extensions/Nginx1.15.11/conf/ssl/127.0.0.1.pem; ssl_certificate_key C:/phpstudy_pro/Extensions/Nginx1.15.11/conf/ssl/127.0.0.1.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; server_name 127.0.0.1 aa.road-sideservice.com; root "C:/phpstudy_pro/WWW/tp/public/127.0.0.1"; location / { index index.php index.html error/index.html; error_page 400 /error/400.html; error_page 403 /error/403.html; error_page 404 /error/404.html; error_page 500 /error/500.html; error_page 501 /error/501.html; error_page 502 /error/502.html; error_page 503 /error/503.html; error_page 504 /error/504.html; error_page 505 /error/505.html; error_page 506 /error/506.html; error_page 507 /error/507.html; error_page 509 /error/509.html; error_page 510 /error/510.html; include C:/phpstudy_pro/WWW/tp/public/127.0.0.1/nginx.htaccess; autoindex on; } location ~ .php(.*)$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_split_path_info ^((?U).+.php)(/?.+)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; include fastcgi_params; } }

展开
收起
游客sm6ayv6e2uk5m 2022-03-10 12:25:19 6094 0
7 条回答
写回答
取消 提交回答
  • 1

    2022-03-21 08:43:37
    赞同 展开评论 打赏
  • 1

    2022-03-10 14:30:08
    赞同 展开评论 打赏
  • 1

    2022-03-10 14:27:50
    赞同 展开评论 打赏
  • 1

    2022-03-10 14:26:22
    赞同 展开评论 打赏
  • 1

    2022-03-10 14:24:56
    赞同 展开评论 打赏
  • 虽然过去不能改变,未来可以!!!

    1

    2022-03-10 14:23:24
    赞同 展开评论 打赏
  • 无所不能的蛋蛋

    1

    2022-03-10 14:21:58
    赞同 展开评论 打赏
滑动查看更多
问答排行榜
最热
最新

相关电子书

更多
CDN助力企业网站进入HTTPS时代 立即下载
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载