Right now, I'm having some trouble getting a script to work on my site that says when I'm live via my Owncast software or not. I believe it has to do with some certification issues which also are likely the result of an error that netdoll got when I went live a while back. satoridepon suggested removing need for a CORS proxy that I was using for an AI-scripted tool I generated talking to ChatGPT, but the tool was ultimately very inconsistent and buggy, so I ditched it. For ideological reasons, it feels right to do it as well. I'm instead using this .php script written for me graciously by drummyfish.
Code: Select all
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://pantsuprophet.xyz/index/pantsuprophet.css">
</head>
<body>
<?php
if (strpos("abc","a"))
echo "AAA";
else
echo "BBB";
if (strpos("abc","d"))
echo "CCC";
else
echo "DDD";
//echo strpos("abc","d") ? "CCC" : "DDD";
//print_r(file_get_contents("https://live.pantsuprophet.xyz/api/status"));
/*
echo
str_contains(file_get_contents("https://live.pantsuprophet.xyz/api/status"),"\"online\":true") ?
"<span class=\"status_on\">online</span>" :
"<span class=\"status_off\">offline</span>";
*/
?>
</body>
</html>Code: Select all
curl: (60) SSL: no alternative certificate subject name matches target host name 'live.pantsuprophet.xyz'
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
Code: Select all
server {
server_name live.pantsuprophet.xyz; # Replace
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/live.pantsuprophet.xyz/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/live.pantsuprophet.xyz/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
}
server {
if ($host = live.pantsuprophet.xyz) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name live.pantsuprophet.xyz;
return 404; # managed by Certbot
}Until then, I'll be posting here manually when I go live or possibly look for some third-party software/script that does it for me. I think I tend to get more viewers when I do manually post about it anyway, and it takes me like 2 seconds. So we'll do it old-fashioned for now.