User Tools

Site Tools


сервис_http

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
сервис_http [2024/03/14 15:17]
val [Прокси с балансировкой (пример 2)]
сервис_http [2024/05/15 11:08] (current)
val [Использование домашних каталогов]
Line 87: Line 87:
 ==== CentOS ==== ==== CentOS ====
  
-  * Сервис Firewall [[Сервис Firewall#​CentOS ​7]]+  * Сервис Firewall [[Сервис Firewall#​CentOS]]
  
 <​code>​ <​code>​
Line 197: Line 197:
 ==== Использование домашних каталогов ==== ==== Использование домашних каталогов ====
  
-  * [[http://www.corpX.un/​~user1/​]]+  * [[http://server.corpX.un/​~user1/​]]
  
 === Debian/​Ubuntu === === Debian/​Ubuntu ===
Line 204: Line 204:
  
 root@server:​~#​ service apache2 restart root@server:​~#​ service apache2 restart
 +
 +ubuntu24# chmod 755 /home/user1
 </​code>​ </​code>​
- 
- 
  
 === Debian/​Ubuntu=== === Debian/​Ubuntu===
Line 1010: Line 1010:
 root@server#​ gitlab-ctl restart nginx root@server#​ gitlab-ctl restart nginx
 </​code>​ </​code>​
 +
 +==== HTTPS Прокси (пример 4) ====
 +
 +<​code>​
 +gate1# cat /​etc/​nginx/​sites-available/​gowebd
 +</​code><​code>​
 +    server {
 +        listen 80;
 +        server_name gowebd.corpX.un;​
 +        return 301 https://​gowebd.corpX.un$request_uri;​
 +    }
 +
 +    server {
 +        listen 443 ssl;
 +        server_name gowebd.corpX.un;​
 +        ssl_certificate /​root/​gowebd.crt;​
 +        ssl_certificate_key /​root/​gowebd.key;​
 +
 +        location / {
 +#            proxy_pass http://​192.168.X.10:​8000;​
 +#            proxy_pass http://​192.168.X.64;​
 +
 +#            proxy_set_header Host            $host;
 +#            proxy_set_header X-Forwarded-For $remote_addr;​
 +
 +#            proxy_set_header X-Forwarded-Proto $scheme;
 +#            proxy_set_header X-Forwarded-Port $server_port;​
 +        }
 +    }
 +</​code>​
 +
 +
 +  * [[#​Подключение,​ тестирование,​ применение и мониторинг конфигурации]]
 +
 +===== Нагрузочное тестирование =====
 +
 +  * [[Сервис INETD]]
 +
 +==== curl ====
 +
 +  * [[https://​www.aloneguid.uk/​posts/​2022/​09/​curl-stress-testing/​|Stress Testing with cURL]]
 +
 +<​code>​
 +userX@gate.isp.un$ seq 1 1000 | xargs -P100 -I{} curl http://​192.168.X.10:​8000/​path{} > /dev/null 2>&1
 +</​code>​
 +
 +==== wrk ====
 +
 +  * [[https://​github.com/​wg/​wrk|wrk - a HTTP benchmarking tool]]
 +
 +==== vegeta ====
 +
 +  * [[https://​lindevs.com/​install-vegeta-on-ubuntu|Install Vegeta on Ubuntu 20.04]]
 +  * [[https://​github.com/​tsenart/​vegeta/​releases|github/​tsenart/​vegeta/​releases]]
 +  * [[https://​val.bmstu.ru/​unix/​WWW/​vegeta_12.11.0_linux_amd64.tar.gz]]
 +
 +<​code>​
 +external-host#​ curl http://​192.168.13.10:​8000
 +
 +external-host#​ echo "GET http://​192.168.13.10:​8000"​ | vegeta attack -duration=20s -rate=100 | vegeta report
 +
 +server# tail -f /​var/​log/​syslog
 +</​code>​
 +
сервис_http.1710418647.txt.gz · Last modified: 2024/03/14 15:17 by val