Home > Backend Development > PHP Tutorial > After updating index.html internally in docker, restarting the nginx service did not find the update.

After updating index.html internally in docker, restarting the nginx service did not find the update.

WBOY
Release: 2016-08-04 09:20:08
Original
2258 people have browsed it

After running the image with -p 1334:80, the nginx index page is accessed at localhost:1334.
Using bash interactive mode in docker, vim changed the index.html file of nginx, saved and exited, but the effect was not visible after restarting the service. My operation process is as follows:

<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>
Copy after login
Copy after login

At this time, visit the mapped localhost: 1334. The page has not changed? ? ?
I don’t quite understand, I hope you can give me some advice.

Reply content:

After running the image with -p 1334:80, the nginx index page is accessed at localhost:1334.
Using bash interactive mode in docker, vim changed the index.html file of nginx, saved and exited, but the effect was not visible after restarting the service. My operation process is as follows:

<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>
Copy after login
Copy after login

At this time, visit the mapped localhost: 1334. The page has not changed? ? ?
I don’t quite understand, I hope you can give me some advice.

nginx caching is also possible. Generally, parsing it does not take effect immediately.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template