Tag Archives: http
Port forwarding with kubectl
If you want some kubernetes pod to forward all the traffic to you local machine, you can do this: 1. get pod id with
1 |
kubectl --kubeconfig <config> get po -lapp=<pod_label_app> -Lversion,cfg,infra-cfg |
2. forward exact port from it to you localhost with
1 |
kubectl --kubeconfig <config> port-forward <pod-id> localhost_port:pod_port |
And you can request you localhost to reach pod on selected port.
Proxies and traffic sniffers for mac os
That’s a great one but it’s not cheap — https://www.charlesproxy.com/. They say this one is good as well and free — https://mitmproxy.org/. But I don’t like the interface.
Https бесплатно
Первоначальный запуск
1 |
./certbot-auto certonly --webroot -w /var/www/<my>/htdocs -d <sub.domain.com> --email <your email> --agree-tos |
Удаление сертификата для домена
1 |
./certbot-auto delete |
и выбрать домен из списка Обновление сертификатов Делается регулярно, т.к. срок действия — 90 дней. Или внести в крон:
1 |
./path/to/certbot-auto renew --quiet |
или руками:
1 |
./path/to/certbot-auto renew# --dry-run |
https://letsencrypt.org/how-it-works/ https://certbot.eff.org/#centosrhel6-nginx Если при тестировании обновления с помощью команды ./path/to/certbot-auto renew —dry-run возникает следующая ошибка
1 2 3 4 |
.../.local/share/letsencrypt/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning You are using pip version 8.0.3, however version 8.1.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command. |
или
1 2 3 4 5 |
Command "python setup.py egg_info" failed with error code -9 in /tmp/pip-build-qRqJ36/zope.interface/ Certbot has problem setting up the virtual environment. We were not be able to guess the right solution from your pip output. |
То возникают они из-за недостатка памяти …
Функция header в php
Заголовки на скачивание файла коротко описаны здесь — https://blog.bullgare.com/2010/01/%d0%b7%d0%b0%d0%b3%d0%be%d0%bb%d0%be%d0%b2%d0%ba%d0%b8-%d0%bd%d0%b0-%d1%81%d0%ba%d0%b0%d1%87%d0%b8%d0%b2%d0%b0%d0%bd%d0%b8%d0%b5-%d1%84%d0%b0%d0%b9%d0%bb%d0%b0/ Функция header в php используется для посылки HTTP-заголовков (почитать на w3.org).