KSWEB Basic Guide

This section is under construction.

1. Introduction

KSWEB is a powerful solution for Android devices that includes:

  • Lighttpd web server (default)
  • Nginx web server
  • Apache web server
  • PHP with MySQL support
  • MySQL database server
  • FTP server
  • Simple built-in file editor with code highlighting
  • Port forwarding functionality
  • Scheduler (works only on Android <= 10)

2. Installation and Initial Setup

2.1 Installing the Application

  1. Download KSWEB from Google Play Store or from our official website
  2. Install the application like any other Android app
  3. On first launch, grant the required permissions (storage access, approve the private policy)

2.2 Initial Steps

KSWEB by default already contains all the necessary settings to start working with servers. By default, KSWEB is preconfigured with all the essential settings required to begin working with web servers. As an example, let’s consider running a PHP script named script.php. To execute this script using KSWEB, it must be placed in the server’s root directory. This directory is typically located in the internal storage accessible to the KSWEB application. By default, the path is:

/mnt/sdcard/htdocs

Place your script in this directory, resulting in the full path:

/mnt/sdcard/htdocs/script.php

Once the KSWEB application is launched and both the lighttpd and PHP servers are in the “On” state (as indicated on the main screen), open a web browser on your device and navigate to:

http://localhost:8080/script.php

If everything is set up correctly, you will see the output of your script displayed in the browser. This is essentially all you need to get started with KSWEB in its initial stages.

Now, let’s focus on the number 8080 in the address we accessed earlier. This number represents the port on which the Lighttpd web server is running. A port is a communication endpoint that allows networked applications to exchange data. Each server or service must listen on a specific port number to receive incoming requests. In the case of KSWEB, the default Lighttpd configuration includes a main host that listens on port 8080. You can change this port to any valid number between 1 and 65535. However, please note the following:

  • Port numbers below 1024 are considered privileged ports and are typically reserved by the operating system for system-level services. To bind a server to one of these ports, your device must have root access.
  • If you are running multiple services or virtual hosts, each one must be configured to use a unique port number. Using the same port for more than one service will result in conflicts, preventing servers from starting or responding correctly.
Proper port management ensures reliable and conflict-free operation of all web services running under KSWEB.

3. Working with Web Servers

3.1 Starting and Stopping Servers

Each web server included in the KSWEB package can be started or stopped at any time. To control the operation of a particular server, simply navigate to its corresponding tab within the KSWEB interface and toggle the "Enable server" switch. Once enabled, the server will attempt to launch.

If, for any reason, the server fails to start, there are two primary methods to diagnose the issue:

  • On the main screen (the application status screen), a red-highlighted notification will appear containing the name of the server. Tapping on this message will display a description of the error, if available.
  • In some cases, KSWEB may not be able to intercept the error message directly. In such situations, you should open the server’s tab and access its Log File. The log will typically contain detailed information explaining the failure.

Reviewing these logs and error messages will help you identify the root cause of the problem and guide you toward an appropriate solution.

3.2 Server Configuration

As mentioned earlier, all servers in KSWEB come with preconfigured and functional default configuration files. However, you may often need to modify these configurations to adapt the servers to the specific requirements of your project.

To access and edit a server's configuration file, navigate to the corresponding server tab within the KSWEB interface and tap the "Edit" button next to the "Configuration" section. This will open the built-in text editor, allowing you to modify the contents of the configuration file.

Please exercise caution when editing these files, as incorrect modifications may prevent the server from starting or functioning properly.

It is also important to note that web servers such as Lighttpd, Apache, and Nginx can host multiple virtual hosts simultaneously. You can access and edit each host’s configuration file by selecting the desired host from the server’s host list and tapping "Edit host config file."

Please note that this documentation does not provide detailed instructions on how to configure each individual server or what specific parameters should be modified. Comprehensive resources on configuring Lighttpd, Apache, Nginx, and other web servers are widely available online.

Due to the extensive use and long history of these servers, a vast amount of information, tutorials, and examples can be easily found. Users are encouraged to consult these external sources to learn how to properly adjust configuration files to suit their project’s requirements.

Last update: 29 May 2025