We use cookies on this website to distinguish you from other users. We use this data to enhance your experience and for targeted advertising. By continuing to use this website you consent to our use of cookies. For more information, please see our Cookie Policy.


You can now try the API systems in a sandbox environment for free.Learn More

Web Server Settings (Linux)

Web Server Settings (Linux)

API Endpoint:
    http://ip_address:8880/api_link
Example Request Parameters:
    webserver_type: apache
    server_name: test.fpanel.net
     // For Apache
    keep_alive: on
    keepalive_timeout: 16
    timeout: 301
    max_keepalive_req: 101
    start_server: 6
    min_spare_server: 6
    max_client: 151
    max_req_per_child: 3
     // For Nginx
    worker_processes: test
    worker_connections: test
    multi_accept: test
    sendfile: test
    tcp_nopush: test
    tcp_nodelay: test
    types_hash_max_size: test
    server_tokens: test
    server_names_hash_bucket_size: test
    server_name_in_redirect: test
    gzip: test
    gzip_disable: test
    gzip_vary: test
    gzip_proxied: test
    gzip_comp_level: test
    gzip_buffers: test
    gzip_http_version: test
    gzip_types: test
      
      	curl --location --request POST 'http://dev.fpanel.net:8880/api' \
--header 'Content-Type: application/json' \
--header 'Token;' \
--data-raw '{
  "api": {
    "process": "system/webserver/webserver-settings",
    "data": {
      "webserver_type": "apache",
      "server_name": "test.fpanel.net",
      "keep_alive": "on",
      "keepalive_timeout": "16",
      "timeout": "301",
      "max_keepalive_req": "101",
      "start_server": "6",
      "min_spare_server": "6",
      "max_client": "151",
      "max_req_per_child": "3",
      "worker_processes": "test",
      "worker_connections": "test",
      "multi_accept": "test",
      "sendfile": "test",
      "tcp_nopush": "test",
      "tcp_nodelay": "test",
      "types_hash_max_size": "test",
      "server_tokens": "test",
      "server_names_hash_bucket_size": "test",
      "server_name_in_redirect": "test",
      "gzip": "test",
      "gzip_disable": "test",
      "gzip_vary": "test",
      "gzip_proxied": "test",
      "gzip_comp_level": "test",
      "gzip_buffers": "test",
      "gzip_http_version": "test",
      "gzip_types": "test"
    }
  }
}'
        
      
      
	  	<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'http://dev.fpanel.net:8880/api',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
  "api": {
    "process": "system/webserver/webserver-settings",
    "data": {
      "webserver_type": "apache",
      "server_name": "test.fpanel.net",
      "keep_alive": "on",
      "keepalive_timeout": "16",
      "timeout": "301",
      "max_keepalive_req": "101",
      "start_server": "6",
      "min_spare_server": "6",
      "max_client": "151",
      "max_req_per_child": "3",
      "worker_processes": "test",
      "worker_connections": "test",
      "multi_accept": "test",
      "sendfile": "test",
      "tcp_nopush": "test",
      "tcp_nodelay": "test",
      "types_hash_max_size": "test",
      "server_tokens": "test",
      "server_names_hash_bucket_size": "test",
      "server_name_in_redirect": "test",
      "gzip": "test",
      "gzip_disable": "test",
      "gzip_vary": "test",
      "gzip_proxied": "test",
      "gzip_comp_level": "test",
      "gzip_buffers": "test",
      "gzip_http_version": "test",
      "gzip_types": "test"
    }
  }
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Token: '
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
      	
      
      
      	import requests
import json

url = "http://dev.fpanel.net:8880/api"

payload = json.dumps({
  "api": {
    "process": "system/webserver/webserver-settings",
    "data": {
      "webserver_type": "apache",
      "server_name": "test.fpanel.net",
      "keep_alive": "on",
      "keepalive_timeout": "16",
      "timeout": "301",
      "max_keepalive_req": "101",
      "start_server": "6",
      "min_spare_server": "6",
      "max_client": "151",
      "max_req_per_child": "3",
      "worker_processes": "test",
      "worker_connections": "test",
      "multi_accept": "test",
      "sendfile": "test",
      "tcp_nopush": "test",
      "tcp_nodelay": "test",
      "types_hash_max_size": "test",
      "server_tokens": "test",
      "server_names_hash_bucket_size": "test",
      "server_name_in_redirect": "test",
      "gzip": "test",
      "gzip_disable": "test",
      "gzip_vary": "test",
      "gzip_proxied": "test",
      "gzip_comp_level": "test",
      "gzip_buffers": "test",
      "gzip_http_version": "test",
      "gzip_types": "test"
    }
  }
})
headers = {
  'Content-Type': 'application/json',
  'Token': ''
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
        
      
      
      	var http = require('follow-redirects').http;
var fs = require('fs');

var options = {
  'method': 'POST',
  'hostname': 'dev.fpanel.net',
  'port': 8880,
  'path': '/api',
  'headers': {
    'Content-Type': 'application/json',
    'Token': ''
  },
  'maxRedirects': 20
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = JSON.stringify({
  "api": {
    "process": "system/webserver/webserver-settings",
    "data": {
      "webserver_type": "apache",
      "server_name": "test.fpanel.net",
      "keep_alive": "on",
      "keepalive_timeout": "16",
      "timeout": "301",
      "max_keepalive_req": "101",
      "start_server": "6",
      "min_spare_server": "6",
      "max_client": "151",
      "max_req_per_child": "3",
      "worker_processes": "test",
      "worker_connections": "test",
      "multi_accept": "test",
      "sendfile": "test",
      "tcp_nopush": "test",
      "tcp_nodelay": "test",
      "types_hash_max_size": "test",
      "server_tokens": "test",
      "server_names_hash_bucket_size": "test",
      "server_name_in_redirect": "test",
      "gzip": "test",
      "gzip_disable": "test",
      "gzip_vary": "test",
      "gzip_proxied": "test",
      "gzip_comp_level": "test",
      "gzip_buffers": "test",
      "gzip_http_version": "test",
      "gzip_types": "test"
    }
  }
});

req.write(postData);

req.end();
      	
      
      
      	package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "http://dev.fpanel.net:8880/api"
  method := "POST"

  payload := strings.NewReader(`{
  "api": {
    "process": "system/webserver/webserver-settings",
    "data": {
      "webserver_type": "apache",
      "server_name": "test.fpanel.net",
      "keep_alive": "on",
      "keepalive_timeout": "16",
      "timeout": "301",
      "max_keepalive_req": "101",
      "start_server": "6",
      "min_spare_server": "6",
      "max_client": "151",
      "max_req_per_child": "3",
      "worker_processes": "test",
      "worker_connections": "test",
      "multi_accept": "test",
      "sendfile": "test",
      "tcp_nopush": "test",
      "tcp_nodelay": "test",
      "types_hash_max_size": "test",
      "server_tokens": "test",
      "server_names_hash_bucket_size": "test",
      "server_name_in_redirect": "test",
      "gzip": "test",
      "gzip_disable": "test",
      "gzip_vary": "test",
      "gzip_proxied": "test",
      "gzip_comp_level": "test",
      "gzip_buffers": "test",
      "gzip_http_version": "test",
      "gzip_types": "test"
    }
  }
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("Token", "")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
		
      
      
      	var client = new RestClient("http://dev.fpanel.net:8880/api");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Token", "");
var body = @"{" + "\n" +
@"  ""api"": {" + "\n" +
@"    ""process"": ""system/webserver/webserver-settings""," + "\n" +
@"    ""data"": {" + "\n" +
@"      ""webserver_type"": ""apache""," + "\n" +
@"      ""server_name"": ""test.fpanel.net""," + "\n" +
@"      ""keep_alive"": ""on""," + "\n" +
@"      ""keepalive_timeout"": ""16""," + "\n" +
@"      ""timeout"": ""301""," + "\n" +
@"      ""max_keepalive_req"": ""101""," + "\n" +
@"      ""start_server"": ""6""," + "\n" +
@"      ""min_spare_server"": ""6""," + "\n" +
@"      ""max_client"": ""151""," + "\n" +
@"      ""max_req_per_child"": ""3""," + "\n" +
@"      ""worker_processes"": ""test""," + "\n" +
@"      ""worker_connections"": ""test""," + "\n" +
@"      ""multi_accept"": ""test""," + "\n" +
@"      ""sendfile"": ""test""," + "\n" +
@"      ""tcp_nopush"": ""test""," + "\n" +
@"      ""tcp_nodelay"": ""test""," + "\n" +
@"      ""types_hash_max_size"": ""test""," + "\n" +
@"      ""server_tokens"": ""test""," + "\n" +
@"      ""server_names_hash_bucket_size"": ""test""," + "\n" +
@"      ""server_name_in_redirect"": ""test""," + "\n" +
@"      ""gzip"": ""test""," + "\n" +
@"      ""gzip_disable"": ""test""," + "\n" +
@"      ""gzip_vary"": ""test""," + "\n" +
@"      ""gzip_proxied"": ""test""," + "\n" +
@"      ""gzip_comp_level"": ""test""," + "\n" +
@"      ""gzip_buffers"": ""test""," + "\n" +
@"      ""gzip_http_version"": ""test""," + "\n" +
@"      ""gzip_types"": ""test""" + "\n" +
@"    }" + "\n" +
@"  }" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
      	
      
      	
      	{
    "api": {
        "process": "system/webserver/webserver-settings",
        "data": {
            "webserver_type": "apache",
            "server_name": "test.fpanel.net",
            // For Apache
            "keep_alive": "on",
            "keepalive_timeout": "16",
            "timeout": "300",
            "max_keepalive_req": "100",
            "start_server": "6",
            "min_spare_server": "6",
            "max_client": "150",
            "max_req_per_child": "3",
            // For Nginx
            "worker_processes": "test",
            "worker_connections": "test",
            "multi_accept": "test",
            "sendfile": "test",
            "tcp_nopush": "test",
            "tcp_nodelay": "test",
            "types_hash_max_size": "test",
            "server_tokens": "test",
            "server_names_hash_bucket_size": "test",
            "server_name_in_redirect": "test",
            "gzip": "test",
            "gzip_disable": "test",
            "gzip_vary": "test",
            "gzip_proxied": "test",
            "gzip_comp_level": "test",
            "gzip_buffers": "test",
            "gzip_http_version": "test",
            "gzip_types": "test"
        }
    }
}

		
      
      	
      	<?xml version="1.0" encoding="UTF-8" ?>
    <api>
        <process>system/webserver/webserver-settings</process>
        <data>
        <webserver_type>apache</webserver_type>
        <server_name>test.fpanel.net</server_name>
        <keep_alive>on</keep_alive>
        <keepalive_timeout>16</keepalive_timeout>
        <timeout>300</timeout>
        <max_keepalive_req>100</max_keepalive_req>
        <start_server>6</start_server>
        <min_spare_server>6</min_spare_server>
        <max_client>150</max_client>
        <max_req_per_child>3</max_req_per_child>
        <worker_processes>test</worker_processes>
        <worker_connections>test</worker_connections>
        <multi_accept>test</multi_accept>
        <sendfile>test</sendfile>
        <tcp_nopush>test</tcp_nopush>
        <tcp_nodelay>test</tcp_nodelay>
        <types_hash_max_size>test</types_hash_max_size>
        <server_tokens>test</server_tokens>
        <server_names_hash_bucket_size>test</server_names_hash_bucket_size>
        <server_name_in_redirect>test</server_name_in_redirect>
        <gzip>test</gzip>
        <gzip_disable>test</gzip_disable>
        <gzip_vary>test</gzip_vary>
        <gzip_proxied>test</gzip_proxied>
        <gzip_comp_level>test</gzip_comp_level>
        <gzip_buffers>test</gzip_buffers>
        <gzip_http_version>test</gzip_http_version>
        <gzip_types>test</gzip_types>
        </data>
    </api>
        
	  
      	
      	{
    "result":{
        "status":1,
        "message":"Operation completed successful"
    }
}
		
	  

We use cookies on this website to distinguish you from other users. We use this data to enhance your experience and for targeted advertising. By continuing to use this website you consent to our use of cookies. For more information, please see our Cookie Policy.