The main configuration for the core Smart Proxy is held in the */etc/foreman-proxy/settings.yml* or *config/settings.yml* file.  This includes configuration of ports to listen on, SSL and security settings and logging options.

Each of the modules used in the Smart Proxy have their configuration in the */etc/foreman-proxy/settings.d/* or *config/settings.d* directory.  Modules are enabled or disabled inside their respective configuration files with the `:enabled` directive.

#### YAML start

The first non-comment line of all configuration files must be three dashes.

<pre>---</pre>

#### Core SSL configuration (settings.yml)

The existence of all the three ssl key entries below requires the use of an SSL connection.

**NOTE** that both client certificates need to be signed by the same CA, which must be in the *ssl_ca_file*, in order for this to work
see [**SSL**](manuals/{{page.version}}/index.html#4.3.6SSL) for more information

<pre>
  :ssl_certificate: ssl/certs/fqdn.pem
  :ssl_ca_file: ssl/certs/ca.pem
  :ssl_private_key: ssl/private_keys/fqdn.key
</pre>

This is the list of hosts from which the smart proxy will accept connections. If this list is empty then every verified SSL connection is allowed to access the API.
<pre>
:trusted_hosts:
- foreman.prod.domain
- foreman.dev.domain
</pre>

#### Server configuration (settings.yml)

If daemon is present and true then the Smart Proxy will attempt to disconnect itself from the controlling terminal and daemonize itself on startup, writing its pid (process ID) into the specified file.

<pre>
:daemon: true
:daemon_pid: /var/run/foreman-proxy/foreman-proxy.pid
</pre>

The two port options control which TCP port(s) the Smart Proxy will listen on.  At least one must be enabled for the proxy to start.  It is recommended to only set https_port for security, which also requires the three ssl_* settings to be set.

<pre>
:http_port: 8443
# OR
:https_port: 8443
</pre>

#### Logging (settings.yml)

The proxy's output is captured to the **log_file** and may be filtered via the usual Unix syslog levels:

* *WARN*
* *DEBUG*
* *ERROR*
* *FATAL*
* *INFO*
* *UNKNOWN*

See Ruby's [Logger class](http://www.ruby-doc.org/stdlib/libdoc/logger/rdoc/classes/Logger.html) for details.

<pre>
:log_file: /var/log/foreman-proxy/proxy.log
:log_level: DEBUG
</pre>

