Web Module

Install/Configure Apache for your static (or other web) file serving needs.

Web Module Settings

WEB_HTTPD = "apache" #apache2 or nginx
WEB_CONFIG_TEMPLATE_PATH = "templates/my_apache.conf"  #This is the path to the template on the LOCAL machine

#Params that are provided to the template.
#Note: The following env variables are also inserted
#into this dictionary:
#code_root
#log_dir
#project  (the project name)
#virtualenv_root
WEB_PARAM_DICT = {
    "HOST_PORT" : 80 #Primary port for hosting things
}
modules.web.bootstrap(deploy_level='staging')[source]

Sets up log directories if they don’t exist, uploads the apache conf and reloads apache.

modules.web.deploy()[source]

Uploads the httpd conf (apache or nginx in future) to the correct place.

modules.web.run_apache_command(command)[source]

Runs the given command on the apache service

modules.web.setup_dirs()[source]

create (if necessary) and make writable uploaded media, log, etc. directories

modules.web.upload_apache_conf()[source]

Upload and link Supervisor configuration from the template.

Table Of Contents

Previous topic

Supervisor Module

Next topic

Utils Module

This Page