Tag: nginx

Efficiently using multiple docker containers in a single host

I have a physical server running Nginx, MySQL and serving my PHP website. The server has Multi-Core processor with 16 GB of RAM. This server can handle certain amount of web traffic. Now instead of this single server, if I run multiple docker containers running individual instances of Nginx (App Server) and MySQL (DB Server) […]

Nginx client_max_body_size not working in Docker container on AWS Elastic Beanstalk

I’m having a problem where nginx seems to be ignoring (or overriding) my upped client_max_body_size directive in a Ubuntu Docker container on AWS Elastic Beanstalk. This is preventing users from uploading files any larger than the nginx default of 1MB. I have used the client_max_body_size 10M; in http, server,and location blocks to no avail, I […]

What is the difference between nginx daemon on/off option?

This is my first web-server administration experience and I want to build docker container which uses nginx as a web-server. In all docker tutorial daemon off; option is put into main .conf file but explanation about it is omitted. I search on the internet about it and I don’t understand what is the difference between […]

Issue with docker compose: container command not found

I’m having an issue when trying to start multiple containers with docker-compose: Dockerfile: FROM nginx:1.9 ADD ./nginx-sites/default /etc/nginx/sites-available/default docker-compose.yml: version: “2” services: web: build: . ports: – “80:80” volumes: – ./src:/var/www links: – fpm fpm: image: php:7-fpm volumes: – ./src:/var/www When I use docker-compose up to start the application, I get the following error: ERROR: […]

Docker compose – share volume Nginx

I just want to test Docker and it seems something is not working as it should. When I have my docker-compose.yml like this: web: image: nginx:latest ports: – “80:80” when in browser I run my docker.app domain (sample domain pointed to docker IP) I’m getting default nginx webpage. But when I try to do something […]

Unable to use -lt when running Nginx Docker or cat logs

I’ve recently pulled a nginx image: docker pull nginx I can run it successfully and go to http://server_name and see the “Welcome to Nginx” page: docker run -d -p 80:80 nginx But then when I try to check logs: docker exec 6c79549e3eb4f6e5fc06f049b67814ac4560ce2cdd7cc6ae84b44b5ae09a9a05 cat /var/log/nginx/access.log It just hangs and outputs nothing. Same with error log. Now […]

My docker container isn't starting on localhost ( on Docker for Windows (Native using Hyper-V)

I’m following Digital Ocean’s tutorial on how to start a nginx docker container (Currently on Step 4). Currently this is their output: $ docker run –name docker-nginx -p 80:80 -d nginx d3ccb73a91985651ec61231bca9f9c716f0dec807e354a29eeef2144f883a01c $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b91f3ce26553 nginx “nginx -g ‘daemon off” About a minute ago Up About […]

Docker best practices: single process for a container

The Docker best practices guide states that: “…you should only run a single process in a single container…” Should Nginx and PHP-FPM run in separate containers? Or does that mean that micro service architectures only run one service or “app” in a container? Having these services in a single container seems easier to deploy and […]

docker nginx container not receiving request from outside, connection refused

I have a running nginx container: # docker run –name mynginx1 -P -d nginx; And got its PORT info by docker ps:>80/tcp,>443/tcp Then I could get response from within the container(id: c30991a04b2f): docker exec -i -t c3099 bash curl http://localhost => which return the default index.html page content, it works However, when I […]

How do I access a server on localhost with nginx docker container?

I’m trying to use a dockerized version of nginx as a proxy server for my node (ExpressJS) application. Without any configuration to nginx and publishing port 80 for the container, I am able to see the default nginx landing page. So I know that much is working. Now I can mount my sites-enabled directory that […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.