This is an old revision of the document!
Тэги: HTML, HTTP, REST, Nginx, Apache, Reverse proxy, Docker, MobaXterm, Wireshark, Postman
Задачи:
student@debian:~$ sudo -i
debian:~# docker exec -ti http-app bash
root@5da33f8442d4:/usr/local/apache2# cat htdocs/index.html
debian:~# HTTP_APP_ROOT=$(docker inspect http-app -f {{.GraphDriver.Data.MergedDir}})
debian:~# cat ${HTTP_APP_ROOT}/usr/local/apache2/htdocs/index.html
Задачи:
student@debian:~$ sudo tcpdump -nniany -A host 172.17.0.2 -w dump1.pcap
debian:~# docker logs http-app -f
debian:~# cat ${HTTP_APP_ROOT}/usr/local/apache2/conf/httpd.conf
...
LogFormat "%h %l %u %t \"%r\" %>s %b %{X-Forwarded-For}i" common
...
debian:~# ps ax | grep http debian:~# kill -HUP NNNNN
admincmd> notepad C:\Windows\System32\drivers\etc\hosts
192.168.M.N kc.corp.un ...
# cp /etc/nginx/sites-available/http-app /etc/nginx/sites-available/kc-app # cat /etc/nginx/sites-available/kc-app
...
server_name kc.corp.un;
...
location / {
proxy_pass http://172.18.0.2:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
Задачи:
debian:~# cat /etc/hosts
... 192.168.M.N kc.corp.un
https://kc.corp.un/realms/master/protocol/openid-connect/token username:admin password:strongpassword grant_type:password client_id:admin-cli