# HTTP Request to Port 80 Not Returning as Expected

### Issue

You try to connect via HTTP request to port 80 to NGINX using e.g. the below command on the same machine running the NGINX service, but don't get the website that NGINX should provide as the reponse:

```
curl http://localhost
```

### What to check

* If you get a website in return but it doesn't seem to be from NGINX:\
  Many distributions deploy some webserver (or another service) already by default, which listens on port 80.\
  Check if you might already have other webservers running on your system like Apache, which sometimes is bundled and installed by default with certain Linux distributions, that might be listening on TCP port 80 (occupying this port).\
  Then make sure to disable their service or uninstall those or alternatively change the port for your web application in the NGINX configuration to another port different than port 80.
* If you don't get any response: \
  Use following command to check if your current NGINX configuration is valid:\
  `nginx -t`
* Check if the NGINX service is running\
  `service nginx status`
* Check if port 80 is open on your system by running:\
  `netstat -ano | grep :80`
* Check on which ports NGINX is listening:\
  `netstat -anpe | grep nginx`

{% hint style="info" %}
Note that commands above might be slightly different in your specific environment.

For more details check the official NGINX documentation.
{% endhint %}


---

# 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.openappsec.io/troubleshooting/troubleshooting-guides/http-request-to-port-80-not-returning-as-expected.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.
