docker内部更新index.html后重启nginx服务未发现更新
Aug 04, 2016 am 09:20 AM
用-p 1334:80 把镜像 run起来以后,在localhost:1334访问到了nginx的index页面。
在docker里用bash交互方式,vim改了nginx的index.html文件,保存退出,但是重启服务后看不到效果,贴我的操作流程如下:
<code>root@a79dfceda4d9:/usr/sbin# killall nginx --关掉服务 root@a79dfceda4d9:/usr/sbin# ps -aux|grep nginx warning: bad ps syntax, perhaps a bogus '-'? See --已经看不到master http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ root 156 0.0 0.0 6328 488 ? S+ 06:33 0:00 grep nginx root@a79dfceda4d9:/usr/sbin# nginx --重新启动 root@a79dfceda4d9:/usr/sbin# ps -aux|grep nginx warning: bad ps syntax, perhaps a bogus '-'? See --又看到了http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ root 158 0.0 0.0 64428 2996 ? Ss 06:33 0:00 nginx: master process nginx www-data 159 0.0 0.0 64828 3580 ? S 06:33 0:00 nginx: worker process www-data 160 0.0 0.0 64828 3580 ? S 06:33 0:00 nginx: worker process www-data 161 0.0 0.0 64828 3580 ? S 06:33 0:00 nginx: worker process www-data 162 0.0 0.0 64828 3580 ? S 06:33 0:00 nginx: worker process root 164 0.0 0.0 6328 560 ? S+ 06:33 0:00 grep nginx </code>
这时再去访问映射出来的localhost:1334,页面没变化???
不太理解,望大家指点一二。
回复内容:
用-p 1334:80 把镜像 run起来以后,在localhost:1334访问到了nginx的index页面。
在docker里用bash交互方式,vim改了nginx的index.html文件,保存退出,但是重启服务后看不到效果,贴我的操作流程如下:
<code>root@a79dfceda4d9:/usr/sbin# killall nginx --关掉服务 root@a79dfceda4d9:/usr/sbin# ps -aux|grep nginx warning: bad ps syntax, perhaps a bogus '-'? See --已经看不到master http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ root 156 0.0 0.0 6328 488 ? S+ 06:33 0:00 grep nginx root@a79dfceda4d9:/usr/sbin# nginx --重新启动 root@a79dfceda4d9:/usr/sbin# ps -aux|grep nginx warning: bad ps syntax, perhaps a bogus '-'? See --又看到了http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ root 158 0.0 0.0 64428 2996 ? Ss 06:33 0:00 nginx: master process nginx www-data 159 0.0 0.0 64828 3580 ? S 06:33 0:00 nginx: worker process www-data 160 0.0 0.0 64828 3580 ? S 06:33 0:00 nginx: worker process www-data 161 0.0 0.0 64828 3580 ? S 06:33 0:00 nginx: worker process www-data 162 0.0 0.0 64828 3580 ? S 06:33 0:00 nginx: worker process root 164 0.0 0.0 6328 560 ? S+ 06:33 0:00 grep nginx </code>
这时再去访问映射出来的localhost:1334,页面没变化???
不太理解,望大家指点一二。
nginx缓存也是有可能的,一般解析过去并不是立刻生效把。

Article chaud

Outils chauds Tags

Article chaud

Tags d'article chaud

Bloc-notes++7.3.1
Éditeur de code facile à utiliser et gratuit

SublimeText3 version chinoise
Version chinoise, très simple à utiliser

Envoyer Studio 13.0.1
Puissant environnement de développement intégré PHP

Dreamweaver CS6
Outils de développement Web visuel

SublimeText3 version Mac
Logiciel d'édition de code au niveau de Dieu (SublimeText3)

Sujets chauds

Guide d'installation et de mise à niveau de PHP 8.4 pour Ubuntu et Debian

Enseignement du nœud PI: Qu'est-ce qu'un nœud PI? Comment installer et configurer le nœud PI?
