romuloigor/proxy-nginx

By romuloigor

Updated almost 10 years ago

https://github.com/brcloudservices/proxy-nginx

Image
API management
Developer tools
Web servers
1

461

romuloigor/proxy-nginx repository overview

Proxy Nginx

N|nginx

Proxy Reverse

In computer networks, a reverse proxy is a type of proxy server that retrieves resources on behalf of a client from one or more servers. These resources are then returned to the client as if they originated from the proxy server itself.[1] While a forward proxy acts as an intermediary for its associated clients to contact any server, a reverse proxy acts as an intermediary for its associated servers to be contacted by any client.

Dockerfile
FROM nginx
MAINTAINER BRCloud "[email protected]"
ADD proxy-nginx.conf /etc/nginx/conf.d/
EXPOSE 80/tcp
proxy-nginx.conf
server {
        listen 80 default_server;
        location / {
            proxy_bind $server_addr;
            proxy_pass http://localhost:8081;
        }
        
        location /logs/ {
            proxy_bind $server_addr;
            proxy_pass http://localhost:8082;
        }
}
Development

First :

$ git clone https://github.com/brcloudservices/proxy-nginx

Second :

$ docker build -t proxy-nginx .

Third :

$ docker run -it -p 80:80 romuloigor/proxy-nginx
Docker

Nginx is very easy to install and deploy in a Docker container.

By default, the Docker will expose port 80, so change this within the Dockerfile if necessary. When ready, simply use the Dockerfile to build the image.

Verify the deployment by navigating to your server address in your preferred browser.

127.0.0.1:80
docker-compose.yml

Change the path for the nginx conf mounting path to your full path, not mine!

License

MIT

Free Software, Hell Yeah!

Tag summary

Content type

Image

Digest

Size

68.1 MB

Last updated

almost 10 years ago

docker pull romuloigor/proxy-nginx