Table des matières
回复内容:
Maison développement back-end tutoriel php docker内部更新index.html后重启nginx服务未发现更新

docker内部更新index.html后重启nginx服务未发现更新

Aug 04, 2016 am 09:20 AM
docker nginx php

用-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>
Copier après la connexion
Copier après la connexion

这时再去访问映射出来的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>
Copier après la connexion
Copier après la connexion

这时再去访问映射出来的localhost:1334,页面没变化???
不太理解,望大家指点一二。

nginx缓存也是有可能的,一般解析过去并不是立刻生效把。

Déclaration de ce site Web
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn

Article chaud

Repo: Comment relancer ses coéquipiers
3 Il y a quelques semaines By 尊渡假赌尊渡假赌尊渡假赌
Combien de temps faut-il pour battre Split Fiction?
3 Il y a quelques semaines By DDD
R.E.P.O. Crystals d'énergie expliqués et ce qu'ils font (cristal jaune)
1 Il y a quelques semaines By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: Comment obtenir des graines géantes
3 Il y a quelques semaines By 尊渡假赌尊渡假赌尊渡假赌

Article chaud

Repo: Comment relancer ses coéquipiers
3 Il y a quelques semaines By 尊渡假赌尊渡假赌尊渡假赌
Combien de temps faut-il pour battre Split Fiction?
3 Il y a quelques semaines By DDD
R.E.P.O. Crystals d'énergie expliqués et ce qu'ils font (cristal jaune)
1 Il y a quelques semaines By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: Comment obtenir des graines géantes
3 Il y a quelques semaines By 尊渡假赌尊渡假赌尊渡假赌

Tags d'article chaud

Bloc-notes++7.3.1

Bloc-notes++7.3.1

Éditeur de code facile à utiliser et gratuit

SublimeText3 version chinoise

SublimeText3 version chinoise

Version chinoise, très simple à utiliser

Envoyer Studio 13.0.1

Envoyer Studio 13.0.1

Puissant environnement de développement intégré PHP

Dreamweaver CS6

Dreamweaver CS6

Outils de développement Web visuel

SublimeText3 version Mac

SublimeText3 version Mac

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

Guide d'installation et de mise à niveau de PHP 8.4 pour Ubuntu et Debian Guide d'installation et de mise à niveau de PHP 8.4 pour Ubuntu et Debian Dec 24, 2024 pm 04:42 PM

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

Date et heure de CakePHP Date et heure de CakePHP Sep 10, 2024 pm 05:27 PM

Date et heure de CakePHP

Configuration du projet CakePHP Configuration du projet CakePHP Sep 10, 2024 pm 05:25 PM

Configuration du projet CakePHP

Téléchargement de fichiers CakePHP Téléchargement de fichiers CakePHP Sep 10, 2024 pm 05:27 PM

Téléchargement de fichiers CakePHP

Routage CakePHP Routage CakePHP Sep 10, 2024 pm 05:25 PM

Routage CakePHP

Discuter de CakePHP Discuter de CakePHP Sep 10, 2024 pm 05:28 PM

Discuter de CakePHP

Comment installer Deepseek Comment installer Deepseek Feb 19, 2025 pm 05:48 PM

Comment installer Deepseek

Enseignement du nœud PI: Qu'est-ce qu'un nœud PI? Comment installer et configurer le nœud PI? Enseignement du nœud PI: Qu'est-ce qu'un nœud PI? Comment installer et configurer le nœud PI? Mar 05, 2025 pm 05:57 PM

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

See all articles