https://github.com/raoul1996/http-cache
http-cache 缓存学习
https://github.com/raoul1996/http-cache
http-cache nginx-docker
Last synced: 5 months ago
JSON representation
http-cache 缓存学习
- Host: GitHub
- URL: https://github.com/raoul1996/http-cache
- Owner: Raoul1996
- Created: 2018-07-15T10:08:47.000Z (over 7 years ago)
- Default Branch: cache
- Last Pushed: 2018-07-15T10:50:23.000Z (over 7 years ago)
- Last Synced: 2025-03-04T08:19:30.356Z (10 months ago)
- Topics: http-cache, nginx-docker
- Language: HTML
- Size: 83 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Http 缓存学习
> docker 下使用 nginx 学习 HTTP 缓存
### Clone Repos
```shell
$ git clone https://github.com/Raoul1996/http-cache.git
```
### RUN
please install Docker before use docker command
```shell
$ cd http-cache
$ docker run \
-d \
-p 8080:80 \
-p 8081:443 \
--volume "$PWD/html":/usr/share/nginx/html \
--volume "$PWD/conf":/etc/nginx \
--volume "$PWD/log":/var/log \
--rm \
--name mynginx \
nginx
```
### attach the contianer named mynginx and reload nginx
```shell
$ docker exec -it mynginx bash
# in the tty supported by mynginx contianer
nginx -t && service nginx reload
```
PS: don't use `service nginx restart`, this command will kill the nginx process, reload is enough.