# How to configure main settings

import Tabs from '~/components/tabs/Tabs'
import MainSettingsSAN from '~/includes/tabs/build-journey/en/MainSettingsSAN.mdx'
import MainSettingsUpdatePayments from '~/includes/tabs/build-journey/en/MainSettingsUpdatePayments.mdx'
import JourneyAPI from '~/includes/snippets/JourneyAPI/en/snippet.mdx'


Once you create an application with Azion, you have a range of configurations you can modify. In this guide, you'll learn to modify the protocols, delivery ports, and the encryption type that your application uses to interface with your end-users.

In this guide, you'll modify some configurations of your application. You can see if the changes ocurred by [accessing your Azion domain](/en/documentation/products/guides/configure-a-domain/).

:::note
Don't have an application? [Start with a template](/en/documentation/products/start-with-a-template/).
:::

<Tabs client:visible>
	<Fragment slot="tab.console">Console</Fragment>
	<Fragment slot="tab.api">API</Fragment>

<Fragment slot="panel.console">
        1. Access [Azion Console](/en/documentation/products/guides/how-to-access-azion-console/) > **Applications**.
        2. Click the application you want to configure. From this screen, you can alter the application's name, delivery settings, and which modules it uses.

        The following steps will guide you through editing an application's settings for a boilerplate application. Feel free to change these settings whenever necessary to suit your requirements.

        **Delivery protocols**

        Modify your application to support the available [delivery protocols](/en/documentation/products/build/applications/main-settings/#delivery-protocols).

        1. Go to the **Main Settings** tab.
        2. Under **Protocol Usage**, select **HTTP support**.
        3. Click the **Save** button.

        After the propagation time, you'll be able to access your application using the HTTP protocol. To test it, access the `http://xxxxxxxxxx.map.azionedge.net` address.
        
        You can also make the following cURL request in your terminal with the HTTP schema:

```bash
curl -I http://xxxxxxxxxx.map.azionedge.net/
```

        If you receive a `2xx` or `3xx` response, it means your application is running on HTTP protocol.

        <MainSettingsSAN />

        **Delivery ports**

        Choose between the supported [delivery ports](/en/documentation/products/build/applications/main-settings/#ports) for each protocol selected.

        1. Go to the **Main Settings** tab.
        2. Under **HTTP Ports**, in addition to port `80`, select port `8008`.
        3. Click the **Save** button.

        Wait a few minutes for the changes to propagate to the edge and try to access your application using one of the new ports. For example, navigate to `http://xxxxxxxxxx.map.azionedge.net:8008` and check if your application is running on the custom port.

        Alternatively, you can make the following cURL request from your terminal:

```bash
curl -I http://xxxxxxxxxx.map.azionedge.net:8008
```

        A successful response means your application is also running on port `8443`.

        **Modules**

        [Modules](/en/documentation/products/build/applications/#modules) can unlock additional functionalities and features for your applications. See the [Pricing page](/en/documentation/products/pricing/) for more details.

        For now, you'll enable two modules. The **Application Accelerator** and **Functions** modules will be used for when you [tune your cache settings](/en/documentation/products/guides/build/tune-cache-settings/), [instantiate a function](/en/documentation/products/guides/build/instantiate-functions/), and [work with Rules Engine](/en/documentation/products/guides/build/work-with-rules-engine/). 

        If you're an [Account owner](/en/documentation/products/guides/users-management/), start by enabling the following modules for your account:

        1. [Access Azion Console](https://console.azion.com).
        2. On the top-right corner, click the **Account menu**.
        3. Select **Billing & Subscriptions**.
        4. Navigate to the **Subscriptions** tab.
        5. Enable the **Application Accelerator** and **Functions** switches.
        6. Click the **Save** button.

        <MainSettingsUpdatePayments />

        Next, to enable the modules for your application:
        
        1. On the upper-left corner of the page, open the **Products menu**, represented by three horizontal lines, and then select **Applications**.
        2. Click the application you want to configure.
        3. Enable the modules **Application Accelerator** and **Functions**.
        4. Click the **Save** button.
</Fragment>

	<Fragment slot="panel.api">
        1. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/products/guides/personal-tokens/) to retrieve your `<application_id>`:

```bash
curl --location 'https://api.azionapi.net/edge_applications \
     --header 'Accept: application/json; version=3' \
     --header 'Authorization: Token [TOKEN VALUE]'
```

        2.  You'll receive a response with all your existing applications. Copy the value of the `<application_id>` that you want to configure.
        3.  Run a `PATCH` request to modify the application as follows:

```bash
curl --location --request PATCH 'https://api.azionapi.net/edge_applications/<application_id>' \
--header 'Accept: application/json; version=3' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token [TOKEN VALUE]' \
--data '{
    "delivery_protocol": "http",
    "http_port": [80, 8008],
    "edge_functions": true,
    "application_acceleration": true
}'
```

        | Key | Description |
        | --- | --- |
        | `delivery_protocol` | When set to `http`, enables the HTTP protocol support |
        | `http_port` | Sets new HTTP ports to the application. In this case, the array `[80, 8008]` defines that both ports 80 and 8008 can be used by HTTP requests |
        | `edge_functions` | Enables the **Functions** module |
        | `application_acceleration` | Enables the **Application Accelerator** module |

        4.  You'll receive a response similar to this:

```json
{
        "results": {
                "id": <application_id>,
                "name": "example.org",
                "delivery_protocol": "http",
                "http_port": [80, 8008],
                "https_port": [],
                "minimum_tls_version": "",
                "active": true,
                "debug_rules": false,
                "http3": false,
                "websocket": false,
                "supported_ciphers": "all",
                "application_acceleration": true,
                "caching": true,
                "device_detection": false,
                "edge_firewall": false,
                "edge_functions": true,
                "image_optimization": false,
                "l2_caching": false,
                "load_balancer": false,
                "raw_logs": false,
                "web_application_firewall": false
        }
}
```

        5.  Wait a few minutes for the changes to propagate.
        6.  Test your changes by accessing your application using the HTTP protocol and custom ports configured above. You can access your application through a browser using the address `http://xxxxxxxxxx.map.azionedge.net:8008` and inspect the page or use the following cURL command for a `2xx` or `3xx` status response:

```bash
curl -I http://xxxxxxxxxx.map.azionedge.net:8008
```

        7.  Check the supported cipher suite by inspecting the page or [running the DIG command](/en/documentation/products/guides/run-the-dig-command/).

        <JourneyAPI />
	</Fragment>
</Tabs>