certbot_nginx.obj
¶
Module contains classes used by the Nginx Configurator.
-
class
certbot_nginx.obj.
Addr
(host, port, ssl, default, ipv6, ipv6only)[source]¶ Bases:
certbot.plugins.common.Addr
Represents an Nginx address, i.e. what comes after the ‘listen’ directive.
According to the documentation, this may be address[:port], port, or unix:path. The latter is ignored here.
The default value if no directive is specified is *:80 (superuser) or *:8000 (otherwise). If no port is specified, the default is 80. If no address is specified, listen on all addresses.
Todo
Old-style nginx configs define SSL vhosts in a separate block instead of using ‘ssl’ in the listen directive.
Parameters: - addr (str) – addr part of vhost address, may be hostname, IPv4, IPv6, “”, or “*”
- port (str) – port number or “*” or “”
- ssl (bool) – Whether the directive includes ‘ssl’
- default (bool) – Whether the directive includes ‘default_server’
- default – Whether this is an IPv6 address
- ipv6only (bool) – Whether the directive includes ‘ipv6only=on’
-
class
certbot_nginx.obj.
VirtualHost
(filep, addrs, ssl, enabled, names, raw, path)[source]¶ Bases:
object
Represents an Nginx Virtualhost.
Variables: - filep (str) – file path of VH
- addrs (set) – Virtual Host addresses (
set
ofAddr
) - names (set) – Server names/aliases of vhost
(
list
ofstr
) - raw (list) – The raw form of the parsed server block
- ssl (bool) – SSLEngine on in vhost
- enabled (bool) – Virtual host is enabled
- path (list) – The indices into the parsed file used to access the server block defining the vhost