gpt4 book ai didi

由于 ssl 证书,laravel 电子邮件验证在生产中不起作用

转载 作者:行者123 更新时间:2023-12-04 22:42:37 24 4
gpt4 key购买 nike

用户必须验证他们的电子邮件地址,所以我使用 laravel 电子邮件验证。
我在 Ubuntu20.04 和 nginx 上配置了项目。当我使用让我们加密证书时,验证链接有效。
我遵循了所有步骤并配置了 cloudflare,然后我遵循了 digitalocean tutorial用于添加 cloudflare ssl 证书。
这是域的 nginx 配置

server {
listen 80;
listen [::]:80;
server_name ishtap.az www.ishtap.az;
return 302 https://$server_name$request_uri;
}

server {
# listen 80;

# ssl(created in cloudflare) configuration follwing digitalocean tutorial
# https://www.digitalocean.com/community/tutorials/how-to-host-a-website-using-cloudflare-and-nginx-on-ubuntu-20-04
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /etc/ssl/cert.pem;
ssl_certificate_key /etc/ssl/key.pem;
ssl_client_certificate /etc/ssl/cloudflare.crt;
ssl_verify_client on;

server_name ishtap.az www.ishtap.az;
root /var/www/ishtap.az/public;

add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";

index index.php;

charset utf-8;

location / {
try_files $uri $uri/ /index.php?$query_string;
}

location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }

error_page 404 /index.php;

location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}

location ~ /\.(?!well-known).* {
deny all;
}

# listen 443 ssl; # managed by Certbot
# ssl_certificate /etc/letsencrypt/live/ishtap.az/fullchain.pem; # managed by Certbot
# ssl_certificate_key /etc/letsencrypt/live/ishtap.az/privkey.pem; # managed by Certbot
# include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}

So when I click email verification link I get error in the attachedimage. If cloudflare paused it works no problem but at some route likewhere you input sensitive data like password chrome not makes requestand throws "your connection to this site is not fully secured"


enter image description here

最佳答案

在这种情况下,您将不得不修复证书,因为证书链无法查看确切位置或证书无法解密。换句话说,你可以使用这个 tool
要使用此工具,您必须使用 Windows 机器。
这个工具来自DigiCert,你可以打开它,你可以点击SSL,你可以选择证书然后点击repair。此外,您可以创建一个新的 CSR,并且可以再次重新颁发证书,以便能够再次将其上传到您的服务器。
如果您有任何其他问题或疑虑,请告诉我,我非常乐意为您提供帮助。

关于由于 ssl 证书,laravel 电子邮件验证在生产中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65042295/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com