docker nginx
2016-05-04 00:00
573 查看
摘要: docker nginx
浏览器访问:host-ip:8081
挂载共享目录:
/etc/nginx
/var/log/nginx
docker run -d -p 8081:80 nginxImageID
浏览器访问:host-ip:8081
2个日志: access.log,记录每个HTTP请求信息 error.log,记录Nginx运行中的错误,用于排错 配置文件:nginx.conf docker exec -ti containerID sh # find . -name "nginx.conf" ./etc/nginx/nginx.conf # ls -l /etc/nginx total 32 drwxr-xr-x. 2 root root 25 Dec 16 17:29 conf.d -rw-r--r--. 1 root root 1007 Dec 9 15:34 fastcgi_params -rw-r--r--. 1 root root 2837 Dec 9 15:34 koi-utf -rw-r--r--. 1 root root 2223 Dec 9 15:34 koi-win -rw-r--r--. 1 root root 3957 Dec 9 15:34 mime.types -rw-r--r--. 1 root root 643 Dec 9 15:34 nginx.conf -rw-r--r--. 1 root root 636 Dec 9 15:34 scgi_params -rw-r--r--. 1 root root 664 Dec 9 15:34 uwsgi_params -rw-r--r--. 1 root root 3610 Dec 9 15:34 win-utf # find . -name "access.log" ./var/log/nginx/access.log # ls -l /var/log/nginx/ total 0 lrwxrwxrwx. 1 root root 11 Dec 16 17:29 access.log -> /dev/stdout lrwxrwxrwx. 1 root root 11 Dec 16 17:29 error.log -> /dev/stderr
挂载共享目录:
/etc/nginx
/var/log/nginx
相关文章推荐
- nginx代理指定目录
- centos6.5上安装docker
- 访问Nginx发生SSL connection error的一种情况
- docker容器的网络信息查看
- Nginx+Naxsi部署专业级Web应用防火墙
- CentOS 6.2实战部署Nginx+MySQL+PHP
- nginx中http核心模块的配置指令2
- nginx中http核心模块的配置指令3
- nginx中http核心模块的配置指令4
- nginx中http的fastcgi模块的配置指令1
- Nginx 学习笔记(一)
- 网站502与504错误分析
- 用zabbix监控nginx_status状态
- 艰难完成 nginx + puma 部署 rails 4的详细记录
- 把Lua编译进nginx步骤方法
- 在windows下的安装Docker的教程
- 8个你可能不知道的Docker知识
- web 应用中常用的各种 cache详解
- Linux系统上配置Nginx+Ruby on Rails+MySQL超攻略