# nginx proxy

##

## <https://github.com/nginx-proxy/nginx-proxy>

## reverse-proxy

```
docker run \
    --name reverse-proxy \
    -v /docker/nginx/certs:/etc/nginx/certs:ro \
    -v /docker/nginx/vhost.d:/etc/nginx/vhost.d \
    -v /docker/nginx/html:/usr/share/nginx/html \
    -v /docker/nginx/conf.d:/etc/nginx/conf.d \
    -v /var/run/docker.sock:/tmp/docker.sock:ro \
    --label nginx_proxy=true \
    -p 80:80 \
    -p 443:443 \
    -d \
    --restart unless-stopped \
    --network ServerFarm \
    jwilder/nginx-proxy
```

![](/files/-M2MoXjmfqcsIE0MOuf3)

nginx site

```
docker run \
    --name www \
    -e 'VIRTUAL_HOST=www.kawsing.org' \
    -d \
    --restart unless-stopped \
    --network ServerFarm \
    nginx:alpine
```

於之前的 docker dns server 建立正解檔&#x20;

![](/files/-M2N1Tp7NttUGXSz28uX)

![](/files/-M2N1IkqPeuDlVgtFuXn)

{% embed url="<https://依照以上步驟，建立www2.kawsing.org>" %}

![](/files/-M2N2r3QcmFf0loNHJpL)

```
docker run \
    --name www2 \
    -e 'VIRTUAL_HOST=www2.kawsing.org' \
    -d \
    --restart unless-stopped \
    --network ServerFarm \
    nginx:alpine
```


---

# 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://kawsing.gitbook.io/opensystem/docker-cong-an-zhuang-dao-ying-yong-ru-men-pian/nginx-proxy.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.
