Apache Python

Apache Python

Apache Python is a managed Python application-server stack that combines the Apache HTTP Server with a preconfigured Python runtime. It can be created through the topology wizard and used to deploy Python web applications from archives or remote repositories.

Apache Python Overview

The stack is intended for Python web applications that run through Apache and a WSGI-compatible entry point. It includes the platform integrations required for deployment, logging, configuration management, resource scaling, and container lifecycle operations.

Apache HTTP ServerAccepts incoming requests and serves static content.
Python runtimeRuns the deployed Python application with the selected engine version.
WSGI supportConnects Apache to WSGI-compatible Python frameworks and applications.
Automated deploymentSupports application archives and remote version-control repositories.
Dependency installationUses project dependency files such as requirements.txt.
i

Initialization system

The current Apache Python template uses the systemd initialization system.

Create an Apache Python Environment

1

Open the environment wizard

Sign in to the platform dashboard and click New Environment.

2

Select Apache Python

Open the Python tab and select Apache Python as the application server.

3

Configure the environment

Select the required Python engine version and configure Cloudlets, disk space, node count, public IP addresses, region, environment name, and any required database or supporting services.

4

Create the environment

Review the topology and click Create. The platform provisions the Apache Python container automatically.

Select Apache Python in the topology wizard
Select Apache Python, the engine version, resources, networking, and supporting services.

Deploy a Python Application

Deploy the project through Deployment Manager from an uploaded archive, an external archive URL, or a connected version-control repository.

1

Prepare the project

Include the application source, a valid WSGI entry point, and the dependency file required by the project.

2

Upload or connect the source

Open Deployment Manager and upload the application archive or connect the required Git repository and branch.

3

Deploy to Apache Python

Select the Apache Python environment and start the deployment. Review the task log when the application does not deploy successfully.

Install Application Dependencies

Apache Python uses pip-compatible dependency declarations. Add the required packages to the project requirements.txt file.

Django==5.2
gunicorn==23.0.0
mysqlclient==2.2.7

During deployment, the platform reads the dependency file and installs the required packages for the selected Python engine.

Compatibility check

Confirm that every dependency and compiled extension supports the Python version selected for the environment.

Application Configuration

Environment variablesStore environment-specific settings outside the application source code.
Configuration filesUse the dashboard Config tool to review or edit supported server and application settings.
LogsReview Apache, deployment, and application logs through the dashboard.
SSH accessUse Web SSH or standard SSH for command-line diagnostics.
Database connectionConnect to managed database nodes through their internal host information.
!

Do not hardcode secrets

Keep database passwords, API keys, and other sensitive values in protected environment settings or a dedicated secret-management service.

Scaling and Availability

  • Automatic vertical scaling: Set the upper Cloudlet limit and allow the container to use additional RAM and CPU according to demand.
  • Manual horizontal scaling: Increase or reduce the Apache Python node count through the topology wizard.
  • Automatic horizontal scaling: Create triggers based on CPU, RAM, network, or disk usage.
  • Load balancing: A load balancer is added when the application-server layer contains multiple nodes.
  • Sequential deployment: Update scaled nodes one at a time to reduce interruption.

Expected Result

A managed Apache Python environment is created with the selected Python version, resources, networking, and optional supporting services. The environment is ready to receive a WSGI-compatible Python application from an archive or repository.

Important Notes

  • Prepare a valid WSGI entry point for the application.
  • Keep project dependencies in requirements.txt.
  • Check dependency compatibility before changing the Python engine version.
  • Use private network addresses for connections to database nodes in the same platform.
  • Use sequential deployment for scaled environments when reduced downtime is required.
  • Review Apache, deployment, and application logs after every production change.

Common Issues and Solutions

Application returns an errorReview the Apache and application logs, WSGI entry point, environment variables, and project configuration.
Dependency installation failsCheck requirements.txt, package versions, compiled-library requirements, and Python compatibility.
Database connection failsVerify the internal database host, port, database name, credentials, and firewall settings.
Static files are not servedReview the application static-file configuration and the Apache document-root or alias settings.
New nodes do not contain application dataUse Stateful scaling, shared storage, or redeploy the application consistently across all nodes.