# Apache HTTP Server as a reverse proxy on Ubuntu

To avoid exposing an additional port, AppServer port 2880, you can configure [Apache HTTP Server to act as a reverse proxy](https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html).

1\. Enable [**mod\_proxy**](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html) and [**mod\_proxy\_http**](https://httpd.apache.org/docs/2.4/mod/mod_proxy_http.html) modules using **a2enmod** script within Apache configuration.

```javascript
a2enmod proxy
a2enmod proxy_http
```

2\. Find and open for editing WebSpellChecker config (**2\_WebInterface.conf**) for Apache.

* File location on Linux-based environments: /etc/apache2/conf-available/2\_WebInterface.conf

```javascript
/etc/apache2/conf-available# nano 2_WebInterface.conf
```

3\. At the very top or end of the file, add **ProxyPass** with the path to the application server (AppServer).

```javascript
ProxyPass "/wscservice/api" "http://localhost:2880"
...
```

4\. Save file and restart Apache.

```javascript
service apache2 restart
```

Check the **status**: [https://localhost/wscservice/api?cmd=status](https://your_host/wscservice/api/?cmd=ver)


---

# 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://docs.wproofreader.com/v6.12.0/deployment/configuration/web-server/reverse-proxy-setup-to-avoid-exposing-2880-port/apache-http-server-as-a-reverse-proxy-on-ubuntu.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.
