# Install Nginx Centos 7 or Docker

**Step 1 — Adding the EPEL Software Repository**

```
sudo yum install epel-release
```

**Step 2 — Installing Nginx**

```
sudo yum install nginx
sudo systemctl start nginx
sudo systemctl status nginx
```

#### Install Nginx with Docker file

```
nginx-proxy:
image: nginx
restart: unless-stopped
ports:
- '80:80'
- '443:443'
volumes:
- /data/services/nginx/conf.d:/etc/nginx/conf.d:ro
- /data/services/letsencrypt:/etc/nginx/ssl:ro
- /etc/localtime:/etc/localtime:ro
```


---

# 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://blog.micsoftvn.com/use-cases/for-sysadmin/install-nginx-centos-7-or-docker.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.
