We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Error web
Error web
2274/5000
Hello, first of all to thank for VestaCP. I discovered it by chance and I'm quite happy with it. I have it installed on all my VPS.
I've only had one problem with some websites that happened to relate to see if anyone can tell me what to do to fix it.
You see, two of my websites use a script to launch the title and artist on those websites that are radio stations.
These websites use this code in a .php file
<?php
//get artist/title info
$artist = $_GET['artist'];
$title = $_GET['title'];
//create a temp file to store values for AJAX script
$r = fopen("temp_title.txt", "w");
fwrite($r, $artist." - ".$title);
fclose($r);
?>
This code is inserted in the index where it calls the cacion and artist
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<b>Here you'll see track title:</b>
<!-- begin update track title code -->
<div id="track_name"></div>
<script type="text/javascript">
function UpdateTitle()
{
var xmlhttp;
//get "track name" block
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
{
var s = xmlhttp.responseText;
document.getElementById('track_name').innerHTML = s;
}
}
//use random number in request to prevent caching
var rand_no = Math.random();
rand_no = rand_no * 100;
//read the "temp_title.txt" file
xmlhttp.open("POST", "/temp_title.txt?"+rand_no, true);
xmlhttp.send();
}
//
setInterval("UpdateTitle()", 1000);
UpdateTitle();
</script>
<!-- end update track title code -->
</body>
</html>
This code is inserted in the index where it calls the cacion and artist and all this is done through the radio broadcast program that writes a .txt file that is also uploaded to the server. The latter is with 777 permissions for reading and writing.
All this worked correctly in cPanel, but when migrating the webs to vesta, they stopped working.
Any ideas?
Thanks and pedon for the novel.
Hello, first of all to thank for VestaCP. I discovered it by chance and I'm quite happy with it. I have it installed on all my VPS.
I've only had one problem with some websites that happened to relate to see if anyone can tell me what to do to fix it.
You see, two of my websites use a script to launch the title and artist on those websites that are radio stations.
These websites use this code in a .php file
<?php
//get artist/title info
$artist = $_GET['artist'];
$title = $_GET['title'];
//create a temp file to store values for AJAX script
$r = fopen("temp_title.txt", "w");
fwrite($r, $artist." - ".$title);
fclose($r);
?>
This code is inserted in the index where it calls the cacion and artist
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<b>Here you'll see track title:</b>
<!-- begin update track title code -->
<div id="track_name"></div>
<script type="text/javascript">
function UpdateTitle()
{
var xmlhttp;
//get "track name" block
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
{
var s = xmlhttp.responseText;
document.getElementById('track_name').innerHTML = s;
}
}
//use random number in request to prevent caching
var rand_no = Math.random();
rand_no = rand_no * 100;
//read the "temp_title.txt" file
xmlhttp.open("POST", "/temp_title.txt?"+rand_no, true);
xmlhttp.send();
}
//
setInterval("UpdateTitle()", 1000);
UpdateTitle();
</script>
<!-- end update track title code -->
</body>
</html>
This code is inserted in the index where it calls the cacion and artist and all this is done through the radio broadcast program that writes a .txt file that is also uploaded to the server. The latter is with 777 permissions for reading and writing.
All this worked correctly in cPanel, but when migrating the webs to vesta, they stopped working.
Any ideas?
Thanks and pedon for the novel.
Re: Error web
did you checked the log? what error appears?
Re: Error web
2018/02/04 10:17:09 [error] 27069#27069: *292656 connect() failed (111: Connection refused) while connecting to upstream, client: 79.145.33.255, server: almuhost.com, request: "POST /temp_title.txt?33.34451206496094 HTTP/1.1", upstream: "https://185.129.251.100:8443/temp_title ... 1206496094", host: "almuhost.com", referrer: "https://almuhost.com/track_title/showtitle.htm"
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: Error web
May be the system is not able to generate that temp file.
goto you /home/<vestauser>/conf/web/<domain>.apache.conf and put /tmp at last in front of basedir value.
If the error stops after that, you may have to give a proper relative path in your file generation script to generate the temp_title.txt
goto you /home/<vestauser>/conf/web/<domain>.apache.conf and put /tmp at last in front of basedir value.
If the error stops after that, you may have to give a proper relative path in your file generation script to generate the temp_title.txt
Re: Error web
Forgive my clumsiness, but I do not understand anything.
The .txt file is correctly overwritten each time the software sends the data to you. The only thing that does not happen is that the name that is in the .txt, is shown on the web page.
Forgive the comparison, but in Cpanel he did it without problem.
The .txt file is correctly overwritten each time the software sends the data to you. The only thing that does not happen is that the name that is in the .txt, is shown on the web page.
Forgive the comparison, but in Cpanel he did it without problem.
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: Error web
Try adding /tmp to your basedir as I told you and post results