Webserver

class plinth.modules.apache.components.Webserver(component_id, web_name, kind='config', urls=None, expect_redirects=False)[source]

Component to enable/disable Apache configuration.

__init__(component_id, web_name, kind='config', urls=None, expect_redirects=False)[source]

Initialize the web server component.

component_id should be a unique ID across all components of an app and across all components.

web_name is the primary part of the configuration file path which must be enabled/disabled by this component.

kind is the type of Apache configuration being enabled/disabled. This must be ‘config’ for a configuration in /etc/apache/conf-available/, ‘module’ for configuration in /etc/apache2/mods-available/, ‘site’ for configuration in /etc/apache2/sites-available/.

urls is a list of URLs over which a HTTP services will be available due to this component. This list is only used for running diagnostics.

diagnose()[source]

Check if the web path is accessible by clients.

See plinth.app.Component.diagnose().

disable()[source]

Disable the Apache configuration.

enable()[source]

Enable the Apache configuration.

is_enabled()[source]

Return whether the Apache configuration is enabled.

class plinth.modules.apache.components.Uwsgi(component_id, uwsgi_name)[source]

Component to enable/disable uWSGI configuration.

__init__(component_id, uwsgi_name)[source]

Initialize the uWSGI component.

component_id should be a unique ID across all components of an app and across all components.

uwsgi_name is the primary part of the configuration file path which must be enabled/disabled by this component.

disable()[source]

Disable the uWSGI configuration.

enable()[source]

Enable the uWSGI configuration.

is_enabled()[source]

Return whether the uWSGI configuration is enabled.

is_running()[source]

Return whether the uWSGI daemon is running with configuration.