ERR_EMPTY_RESPONSE 500
Posted: Tue Apr 17, 2018 9:52 pm
Hello,
i have 2 files, first:
http://centos.dnd.zone/adddomain.php
and second:
http://centos.dnd.zone/rmdomain.php
First file adddomain.php get error 4 becouse try to create domain two times and I don't have idea how fix this. But works fine, domain was created.
Second file rmdomain.php get "This page isn’t working centos.dnd.zone didn’t send any data. ERR_EMPTY_RESPONSE 500". But works fine, domain was deleted, only 500 error in browser.
I try to run this on different computer and different operating system, clean cache and many else...
I installed vestacp on clean debian, ubuntu and centos install and the same errors.
I try install vestacp on my computer, on kvm, on VPS server and the same...
Please help me ;/
i have 2 files, first:
http://centos.dnd.zone/adddomain.php
Code: Select all
<?php
// Server credentials
$vst_hostname = 'localhost';
$vst_username = 'admin';
$vst_password = 'mysecretpass';
$vst_returncode = 'yes';
$vst_command = 'v-add-domain';
// New Domain
$username = '12345678'; // << pass: qwe123
$domain = '12345678.com';
// Prepare POST query
$postvars = array(
'user' => $vst_username,
'password' => $vst_password,
'returncode' => $vst_returncode,
'cmd' => $vst_command,
'arg1' => $username,
'arg2' => $domain
);
$postdata = http_build_query($postvars);
// Send POST query via cURL
$postdata = http_build_query($postvars);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://' . $vst_hostname . ':8083/api/');
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
$answer = curl_exec($curl);
// Check result
if($answer == 0) {
echo "Domain has been successfuly created\n";
} else {
echo "Query returned error code: " .$answer. "\n";
}
?>
http://centos.dnd.zone/rmdomain.php
Code: Select all
<?php
// Server credentials
$vst_hostname = 'localhost';
$vst_username = 'admin';
$vst_password = 'mysecretpass';
$vst_returncode = 'yes';
$vst_command = 'v-delete-domain';
// Delete Domain
$username = '12345678'; // << pass: qwe123
$domain = '12345678.com';
// Prepare POST query
$postvars = array(
'user' => $vst_username,
'password' => $vst_password,
'returncode' => $vst_returncode,
'cmd' => $vst_command,
'arg1' => $username,
'arg2' => $domain
);
$postdata = http_build_query($postvars);
// Send POST query via cURL
$postdata = http_build_query($postvars);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://' . $vst_hostname . ':8083/api/');
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
$answer = curl_exec($curl);
// Check result
if($answer == 0) {
echo "Domain has been successfuly deleted\n";
} else {
echo "Query returned error code: " .$answer. "\n";
}
?>
Second file rmdomain.php get "This page isn’t working centos.dnd.zone didn’t send any data. ERR_EMPTY_RESPONSE 500". But works fine, domain was deleted, only 500 error in browser.
I try to run this on different computer and different operating system, clean cache and many else...
I installed vestacp on clean debian, ubuntu and centos install and the same errors.
I try install vestacp on my computer, on kvm, on VPS server and the same...
Please help me ;/