Sign inSign up

cxgphper/nginx

By cxgphper

Updated almost 8 years ago

Centos-based nginx source code compilation and installation project

Image
0

268

cxgphper/nginx repository overview

Run as follows:
docker run -it --net=backend --name nginx -p 80:80 -v /home/docker/nginx/servers:/usr/local/nginx/etc/servers -v /home/docker/nginx/logs:/var/log/nginx -v /home/www:/home/www cxgphper/nginx:v1.0.3 /bin/bash
The data volumes specified by -v are respectively:
  • Separate directories for each .conf directory: /usr/local/nginx/etc/servers (Note: In the container, /usr/local/nginx/etc/nginx.conf has included all *.conf under servers) file)
  • The place to log to Nginx: /var/log/nginx (Note, then when you write the server, you can set the log to - such as /var/log/nginx/localhost.error.log, then the log of nginx virtual machine will Automatically placed in the data volume location of your host settings storage log)
  • Store some code locations that need to be configured: /home/www (that is the regular code root directory, how do you get it, remember to match the server)

Tag summary

Content type

Image

Digest

Size

211.5 MB

Last updated

almost 8 years ago

docker pull cxgphper/nginx:v1.0.3