server {
server_name sub.domain.com;
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/sub.domain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/sub.domain.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
location / {
proxy_pass https://192.168.100.8:8007;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
}
curl -k https://localhost/backup/
возвращает пустоту root@nginx:/home/nginx-user# curl -k https://localhost/backup
<html><body>You are being <a href="http://192.168.100.6/users/sign_in">redirected</a>.</body></html>root@nginx:/home/nginx-user#
root@nginx:/home/nginx-user# tcpdump -nv host 192.168.100.8
tcpdump: listening on ens18, link-type EN10MB (Ethernet), snapshot length 262144 bytes
12:55:10.399438 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.100.8 tell 192.168.100.2, length 28
12:55:10.399680 ARP, Ethernet (len 6), IPv4 (len 4), Reply 192.168.100.8 is-at ba:aa:6d:be:c2:6e, length 28
server {
server_name sub.domain.com;
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
location / {
#add_header Content-Type text/html;
#return 200 '<html><body>Hello API</body></html>';
proxy_pass http://192.168.100.5:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/;
}
}
server {
server_name sub.domain.com;
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/sub.domain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/sub.domain.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
location / {
proxy_pass http://192.168.100.6;
}
}
server {
server_name _;
listen 80;
return 301 https://$host$request_uri;
}
192.168.100.2 - - [28/Dec/2023:12:07:54 +0300] "GET /backup HTTP/2.0" 502 166 "-" "curl/7.81.0"
root@nginx:/home/nginx-user# curl -k https://192.168.100.8:8007/
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
а curl https://192.168.100.3/backup ?
root@nginx:/home/nginx-user# curl https://192.168.100.2/backup
curl: (60) SSL: no alternative certificate subject name matches target host name '192.168.100.2'
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
root@nginx:/home/nginx-user# ssh root@192.168.100.8
The authenticity of host '192.168.100.8 (192.168.100.8)' can't be established.
ED25519 key fingerprint is SHA256:KGmGpa3g68k5U/WIVqFKk3Skko709bnC7zvseYWuufM.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])?
root@host_name:~# ssh root@192.168.100.8
The authenticity of host '192.168.100.8 (192.168.100.8)' can't be established.
ED25519 key fingerprint is SHA256:KGmGpa3g68k5U/WIVqFKk3Skko709bnC7zvseYWuufM.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
root@nginx:/home/nginx-user# systemctl restart nginx
root@nginx:/home/nginx-user# curl -k https://localhost/backup
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.18.0 (Ubuntu)</center>
</body>
</html>
location /backup {
# proxy_set_header X-Forwarded-For $remote_addr;
# proxy_set_header Host $http_host;
proxy_set_header 'Host' 192.168.100.8;
proxy_pass https://192.168.100.8:8007/;
proxy_redirect https://192.168.100.8:8007/ /backup/;
# proxy_ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem; # managed by Certbot
# proxy_ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem; # managed by Certbot
}
root@nginx:/home/nginx-user# curl -k https://localhost/backup
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.18.0 (Ubuntu)</center>
</body>
</html>
Чтобы начать восстановление, нужно сначала создать образ - логично, зашёл сюда: https://clonezilla.org/show-live-doc-content.php?t...
Дальше всё как там написано, даже имена дисков совпадают.
После выбираю reboot опцию и загружаюсь в систему, папка пустая, я подозреваю что слетает что-то после перезагрузки системы.
Погуглил, нашёл статью: https://www.tutorialspoint.com/check-if-directory-....
Команда возвращает пустоту, полагаю ничего не смонтировано:
mount | grep "/root/sdb1"
Вчера разбирался с монтированием, читал что для постоянного монтирования нужно какой-то файл изменить вроде как, но прозвучало это странно, зачем тогда куча команд.