> This page is for Applications Protection.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.humansecurity.com/llms.txt.

# First Party Configuration

In First Party Mode, the HUMAN Apache C-Core module acts as a reverse proxy for client requests and sensor activity. The HUMAN Apache C-Core module is configured with First-Party mode enabled by default. To confirm that you have configured your HUMAN Apache C-Core module in First-Party mode, review the HUMAN details in your Apache configuration.

## First Party Enabled Example (default value)

Below is an example of a basic `default.conf` Apache configuration file that contains the minimum settings for the HUMAN Apache C-Core module:

```shell
<VirtualHost *:80>

  px_enabled On
  px_appId APP_ID
  px_cookie_secret COOKIE_SECRET
  px_auth_token AUTH_TOKEN


  ServerAdmin webmaster@localhost
  DocumentRoot /var/www/html

  # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
  # error, crit, alert, emerg.
  # It is also possible to configure the loglevel for particular
  # modules, e.g.
  #LogLevel info ssl:warn

  ErrorLog ${APACHE_LOG_DIR}/error.log
  CustomLog ${APACHE_LOG_DIR}/access.log combined

  # For most configuration files from conf-available/ that are
  # enabled or disabled at a global level it is possible to
  # include a line for only one particular virtual host. For example, the
  # following line enables the CGI configuration for this host only
  # after it has been globally disabled with "a2disconf".
  #Include conf-available/serve-cgi-bin.conf
</VirtualHost>
```

* If *px\_first\_party\_enabled* is not found in the server block, the First-Party Mode is enabled in the Enforcer. (Continue to the Next Steps below.
* Otherwise, proceed to the [First Party Mode Disabled Example](/applications/apache/first-party-configuration#first-party-mode-disabled-example).

## First Party Mode Disabled Example

Below is an example of a basic default.conf Apache configuration file that contains the minimum settings for the HUMAN Apache C-Core module:

> The presence of the *px\_first\_party\_enabled* with a value of `Off` confirms that the default configuration has been changed and First-Party mode is disabled.

```shell
<VirtualHost *:80>

  px_enabled On
  px_appId APP_ID
  px_cookie_secret COOKIE_SECRET
  px_auth_token AUTH_TOKEN
  px_first_party_enabled Off


  ServerAdmin webmaster@localhost
  DocumentRoot /var/www/html

  # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
  # error, crit, alert, emerg.
  # It is also possible to configure the loglevel for particular
  # modules, e.g.
  #LogLevel info ssl:warn

  ErrorLog ${APACHE_LOG_DIR}/error.log
  CustomLog ${APACHE_LOG_DIR}/access.log combined

  # For most configuration files from conf-available/ that are
  # enabled or disabled at a global level it is possible to
  # include a line for only one particular virtual host. For example, the
  # following line enables the CGI configuration for this host only
  # after it has been globally disabled with "a2disconf".
  #Include conf-available/serve-cgi-bin.conf
</VirtualHost>
```

In order to enable First Party Mode, you need to set the *px\_first\_party\_enabled* to `On` and reload your Apache configuration.

After configuring the enforcer to handle First Party requests, complete the steps listed on the [Integrate 1st-Party JS Snippet](/applications/integrate-1st-party-client) to confirm your snippet is setup to serve the Javascript Sensor via First-Party.