# Installing the web server

{% hint style="info" %}
Please follow the steps to install Screena Portal in this order:

1. [Preparing your system](https://help.screena.ai/resources/how-to/install-screena-portal/preparing-your-system)
2. [Installing Screena Portal backend](https://help.screena.ai/resources/how-to/install-screena-portal/installing-screena-portal-backend)
3. [Launching Screena Portal backend](https://help.screena.ai/resources/how-to/install-screena-portal/launching-screena-portal-backend)
4. [**Installing the web server**](https://help.screena.ai/resources/how-to/install-screena-portal/installing-the-web-server) **(you are here)**
5. [Configuring Screena Portal](https://help.screena.ai/resources/how-to/install-screena-portal/configuring-screena-portal)
   {% endhint %}

{% hint style="info" %}
This guide covers the installation and configuration of Nginx as the web server for the application.
{% endhint %}

## Configuring Nginx

Edit the default server configuration of Nginx by running the following command in the terminal:

```shell
sudo nano /etc/nginx/sites-available/default
```

Add the following location block to the server configuration:

```shell
location /rest {
        proxy_pass http://localhost:8080/rest;                
}
```

Save the changes and close the file. Restart Nginx for the changes to take effect:

```shell
sudo systemctl restart nginx
```

## Installing the Web files

Unzip the web.zip file into the directory `/var/www/html`.

```shell
sudo unzip web.zip -d /var/www/html
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.screena.ai/resources/how-to/install-screena-portal/installing-the-web-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
