Answer the question
In order to leave comments, you need to log in
Why does the request come with an empty $_POST?
Can't get data from POST request, empty array comes.
echo "Content-Type: text/html\n\n";
echo "<form method='POST' action='/mancgi/resulttest.php'>";
echo "<input type='hidden' name='WMI_DATA' value='Success'/>";
echo "<input type='submit' value='GO!'/>";
echo "</form>";
echo "Content-Type: text/html\n\n";
$data = file_get_contents('php://input');
print "DATA: <pre>";
var_dump($data);
var_dump($_POST);
print "</pre>";
# domain for ISPmanager and BILLmanager
server {
listen 82.146.54.197:443;
server_name my.hosting.digitalmakers.ru;
ssl on;
ssl_certificate /usr/local/mgr5/etc/manager.crt;
ssl_certificate_key /usr/local/mgr5/etc/manager.key;
set $mgr_proxy "http://82.146.54.197:1500";
location ^~ /manimg/ {
alias /usr/local/mgr5/skins/;
}
location / {
proxy_pass $mgr_proxy;
proxy_redirect $mgr_proxy /;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Secret 062IfeqaXeQERTT;
chunked_transfer_encoding off;
}
location ^~ /mancgi/ {
proxy_pass $mgr_proxy;
proxy_redirect $mgr_proxy /;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Secret 062IfeqaXeQERTT;
chunked_transfer_encoding off;
include fastcgi_params;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
}
}
Answer the question
In order to leave comments, you need to log in
And if you copy "location /" to the end, what is in /mancgi/?
include fastcgi_params;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
Your nginx config says "proxy everything in ispmanager" (well, or "only ispmanager should be opened on this input").
Create a site in the panel, then try to do something.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question