Public Repository

Last pushed: 2 years ago
Short Description
This Docker container run an instance of Nginx web server with php-fpm
Full Description

Docker containers for Nginx server

This Docker container run an instance of Nginx web server with php-fpm. It is preconfigured to serve multiple website. Follow these steps to have your web server setup quickly for multiple web sites:

  1. Create a base directory for all your web site. For example /home/webmaster/www
  2. Inside /home/webmaster/www, place the source code for your different web site. The folder name should be the domain name. For domains that begins with 'www.', do not include 'www.' in the directory name. For example, for domain, place the source in /home/webmaster/www/
  3. Create a symbolic link 'wwwroot' inside /home/webmaster/www/ that point to the web root directory. It can be the directory itself. Eg: ln -s . wwwroot
  4. Checkout the source code of thi project into <nginx-docker-src> directory.
  5. Build docker image (You can skip this step and use image on docker hub instead): Build the docker with command: docker build -t mphan/nginx_httpd src
  6. Update docker-compose.yml if the directory crreated at step 1 is not /home/webmaster/www.
  7. Install docker-compose if it is not yet installed on your server (cf
  8. Start the container with the commande: docker-compose up -d
  9. Update DNS server for your domain to point to your server.
  10. Goto and see your website (or not).

NOTE: You need to make sure to have a database server setup if your website need one.

Docker Pull Command