INVITE sip:600@mydomain.kz SIP/2.0
Via: SIP/2.0/UDP 192.168.20.251:5699;rport;branch=z9hG4bKPj7e7c5100-2d04-4808-be93-4d39bee2b2f4
Max-Forwards: 70
From: <sip:SP1@mydomain.kz>;tag=1fbb7758-1e67-43ad-8840-79fff26aa1c1
To: sip:600@mydomain.kz
Contact: <sip:SP1@93.185.73.55:5699;ob>;+sip.ice
Call-ID: 97a04e74-2a9f-4c8b-abab-4b8ad085f49b
CSeq: 21647 INVITE
Route: <sip:mydomain.kz:5699;lr>
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: Simotel - Android 9
Content-Type: application/sdp
Content-Length: 742
v=0
o=- 3826160558 3826160558 IN IP4 192.168.20.251
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4004 RTP/AVP 98 97 99 104 3 0 8 9 18 96
c=IN IP4 192.168.20.251
b=TIAS:64000
a=rtcp:4024 IN IP4 192.168.20.251
a=sendrecv
a=rtpmap:98 speex/16000
a=rtpmap:97 speex/8000
a=rtpmap:99 speex/32000
a=rtpmap:104 iLBC/8000
a=fmtp:104 mode=30
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:18 G729/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
a=ssrc:546953231 cname:699aa2bd538dd60f
a=ice-ufrag:34eacb43
a=ice-pwd:60194ea878ffa5c83ea8a0a9
a=candidate:Hc0a814fb 1 UDP 2130706431 192.168.20.251 4004 typ host
a=candidate:Hc0a814fb 2 UDP 2130706430 192.168.20.251 4024 typ host
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.20.251:5699;rport=5699;received=93.185.73.55;branch=z9hG4bKPj7e7c5100-2d04-4808-be93-4d39bee2b2f4
Call-ID: 97a04e74-2a9f-4c8b-abab-4b8ad085f49b
From: <sip:SP1@mydomain.kz>;tag=1fbb7758-1e67-43ad-8840-79fff26aa1c1
To: <sip:600@mydomain.kz>;tag=z9hG4bKPj7e7c5100-2d04-4808-be93-4d39bee2b2f4
CSeq: 21647 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1617171759/bb318de1cbfed38c1e150032b4231a7f",opaque="046312ff651e54d5",algorithm=md5,qop="auth"
Server: Asterisk PBX certified/16.8-cert7
Content-Length: 0
ACK sip:600@mydomain.kz SIP/2.0
Via: SIP/2.0/UDP 192.168.20.251:5699;rport;branch=z9hG4bKPj7e7c5100-2d04-4808-be93-4d39bee2b2f4
Max-Forwards: 70
From: <sip:SP1@mydomain.kz>;tag=1fbb7758-1e67-43ad-8840-79fff26aa1c1
To: sip:600@mydomain.kz;tag=z9hG4bKPj7e7c5100-2d04-4808-be93-4d39bee2b2f4
Call-ID: 97a04e74-2a9f-4c8b-abab-4b8ad085f49b
CSeq: 21647 ACK
Route: <sip:mydomain.kz:5699;lr>
Content-Length: 0
INVITE sip:600@mydomain.kz SIP/2.0
Via: SIP/2.0/UDP 93.185.73.55:5699;rport;branch=z9hG4bKPja4c0672a-4c47-4ac0-ac37-350ec0051b66
Max-Forwards: 70
From: <sip:SP1@mydomain.kz>;tag=1fbb7758-1e67-43ad-8840-79fff26aa1c1
To: sip:600@mydomain.kz
Contact: <sip:SP1@93.185.73.55:5699;ob>;+sip.ice
Call-ID: 97a04e74-2a9f-4c8b-abab-4b8ad085f49b
CSeq: 21648 INVITE
Route: <sip:mydomain.kz:5699;lr>
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: Simotel - Android 9
Authorization: Digest username="SP1", realm="asterisk", nonce="1617171759/bb318de1cbfed38c1e150032b4231a7f", uri="sip:600@mydomain.kz", response="3d71a0def323ac74c98387097c2cac98", algorithm=md5, cnonce="378e10f2ff1d4915b9339221ed5877a4", opaque="046312ff651e54d5", qop=auth, nc=00000001
Content-Type: application/sdp
Content-Length: 742
v=0
o=- 3826160558 3826160558 IN IP4 192.168.20.251
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4004 RTP/AVP 98 97 99 104 3 0 8 9 18 96
c=IN IP4 192.168.20.251
b=TIAS:64000
a=rtcp:4024 IN IP4 192.168.20.251
a=sendrecv
a=rtpmap:98 speex/16000
a=rtpmap:97 speex/8000
a=rtpmap:99 speex/32000
a=rtpmap:104 iLBC/8000
a=fmtp:104 mode=30
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:18 G729/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
a=ssrc:546953231 cname:699aa2bd538dd60f
a=ice-ufrag:34eacb43
a=ice-pwd:60194ea878ffa5c83ea8a0a9
a=candidate:Hc0a814fb 1 UDP 2130706431 192.168.20.251 4004 typ host
a=candidate:Hc0a814fb 2 UDP 2130706430 192.168.20.251 4024 typ host
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 93.185.73.55:5699;rport=5699;received=93.185.73.55;branch=z9hG4bKPja4c0672a-4c47-4ac0-ac37-350ec0051b66
Call-ID: 97a04e74-2a9f-4c8b-abab-4b8ad085f49b
From: <sip:SP1@mydomain.kz>;tag=1fbb7758-1e67-43ad-8840-79fff26aa1c1
To: <sip:600@mydomain.kz>
CSeq: 21648 INVITE
Server: Asterisk PBX certified/16.8-cert7
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 93.185.73.55:5699;rport=5699;received=93.185.73.55;branch=z9hG4bKPja4c0672a-4c47-4ac0-ac37-350ec0051b66
Call-ID: 97a04e74-2a9f-4c8b-abab-4b8ad085f49b
From: <sip:SP1@mydomain.kz>;tag=1fbb7758-1e67-43ad-8840-79fff26aa1c1
To: <sip:600@mydomain.kz>;tag=8a316ea1-b69a-48dd-82bc-6809d68692da
CSeq: 21648 INVITE
Server: Asterisk PBX certified/16.8-cert7
Contact: <sip:55.176.150.171:5699>
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REFER, MESSAGE
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800;refresher=uac
Require: timer
Content-Type: application/sdp
Content-Length: 232
v=0
o=- 3826160558 3826160560 IN IP4 55.176.150.171
s=Asterisk
c=IN IP4 55.176.150.171
t=0 0
m=audio 17070 RTP/AVP 0 96
a=rtpmap:0 PCMU/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
ACK sip:55.176.150.171:5699 SIP/2.0
Via: SIP/2.0/UDP 93.185.73.55:5699;rport;branch=z9hG4bKPjb0de839f-a88e-4640-95f5-9cd03bfd2e52
Max-Forwards: 70
From: <sip:SP1@mydomain.kz>;tag=1fbb7758-1e67-43ad-8840-79fff26aa1c1
To: sip:600@mydomain.kz;tag=8a316ea1-b69a-48dd-82bc-6809d68692da
Call-ID: 97a04e74-2a9f-4c8b-abab-4b8ad085f49b
CSeq: 21648 ACK
Content-Length: 0
BYE sip:55.176.150.171:5699 SIP/2.0
Via: SIP/2.0/UDP 93.185.73.55:5699;rport;branch=z9hG4bKPj737c04b8-ae1c-42f5-b9d3-558ad144bf53
Max-Forwards: 70
From: <sip:SP1@mydomain.kz>;tag=1fbb7758-1e67-43ad-8840-79fff26aa1c1
To: sip:600@mydomain.kz;tag=8a316ea1-b69a-48dd-82bc-6809d68692da
Call-ID: 97a04e74-2a9f-4c8b-abab-4b8ad085f49b
CSeq: 21649 BYE
User-Agent: Simotel - Android 9
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 93.185.73.55:5699;rport=5699;received=93.185.73.55;branch=z9hG4bKPj737c04b8-ae1c-42f5-b9d3-558ad144bf53
Call-ID: 97a04e74-2a9f-4c8b-abab-4b8ad085f49b
From: <sip:SP1@mydomain.kz>;tag=1fbb7758-1e67-43ad-8840-79fff26aa1c1
To: <sip:600@mydomain.kz>;tag=8a316ea1-b69a-48dd-82bc-6809d68692da
CSeq: 21649 BYE
Server: Asterisk PBX certified/16.8-cert7
Content-Length: 0
Signed Certificate Timestamp:
Version : v1 (0x0)
Log ID : 7D:3E:F2:F8:8F:FF:88:55:68:24:C2:C0:CA:9E:52:89:
79:2B:C5:0E:78:09:7F:2E:6A:97:68:99:7E:22:F0:D7
Timestamp : Feb 28 07:25:30.664 2021 GMT
$ docker logs certbot-server
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/mysite.kz.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cert not yet due for renewal
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The following certificates are not due for renewal yet:
/etc/letsencrypt/live/mysite.kz/fullchain.pem expires on 2021-05-29 (skipped)
No renewals were attempted.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# user www-data;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
upstream backend {
server app-server:9000;
}
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 3600;
map $http_host $this_host {
"" $host;
default $http_host;
}
map $http_x_forwarded_proto $the_scheme {
default $http_x_forwarded_proto;
"" $scheme;
}
map $http_x_forwarded_host $the_host {
default $http_x_forwarded_host;
"" $this_host;
}
server {
listen 80;
server_name mysite.kz;
# server_tokens off;
# Yermek: changed to `location`
# rewrite ^ https://$host$request_uri? permanent;
location / {
return 301 https://$host$request_uri;
}
location ^~ /\.well-known/acme-challenge/ {
root /var/www/certbot;
}
}
server {
listen 443 ssl;
keepalive_timeout 3600;
ssl_certificate /etc/nginx/certs/live/mysite.kz/fullchain.pem;
ssl_certificate_key /etc/nginx/certs/live/mysite.kz/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers "HIGH:!RC4:!aNULL:!MD5:!kEDH";
# Add headers to serve security related headers
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
root /var/www/html;
client_max_body_size 10G; # 0=unlimited - set max upload size
fastcgi_buffers 64 4K;
gzip off;
index index.php;
error_page 403 /core/templates/403.php;
error_page 404 /core/templates/404.php;
rewrite ^/.well-known/carddav /remote.php/dav/ permanent;
rewrite ^/.well-known/caldav /remote.php/dav/ permanent;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ ^/(build|tests|config|lib|3rdparty|templates|data)/ {
deny all;
}
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
deny all;
}
location / {
rewrite ^/remote/(.*) /remote.php last;
rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
try_files $uri $uri/ =404;
}
location ~* ^/ds-vpath/ {
rewrite /ds-vpath/(.*) /$1 break;
proxy_pass http://onlyoffice-document-server;
proxy_redirect off;
client_max_body_size 100m;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $the_host/ds-vpath;
proxy_set_header X-Forwarded-Proto $the_scheme;
}
location ~ \.php(?:$|/) {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS off;
fastcgi_param modHeadersAvailable true; #Avoid sending the security headers twice
fastcgi_pass backend;
fastcgi_intercept_errors on;
fastcgi_read_timeout 3600;
}
# Adding the cache control header for js and css files
# Make sure it is BELOW the location ~ \.php(?:$|/) { block
location ~* \.(?:css|js)$ {
add_header Cache-Control "public, max-age=7200";
# Add headers to serve security related headers
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";
add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
# Optional: Don't log access to assets
access_log off;
}
# Optional: Don't log access to other assets
location ~* \.(?:jpg|jpeg|gif|bmp|ico|png|swf)$ {
access_log off;
}
}
}
app-server
уже обращение не идет (потому что docker logs -f
показывает изменение только для nginx
. В app-server
не обновляется.$ curl -v http://mysite.kz/.well-known/acme-challenge/index.html
* Expire in 0 ms for 6 (transfer 0x5631c7c4cf50)
* Expire in 1 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 1 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 1 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 1 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 1 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 1 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 1 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 1 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 1 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 1 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 1 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 1 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 1 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 1 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 1 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Expire in 0 ms for 1 (transfer 0x5631c7c4cf50)
* Trying 192.168.200.100...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x5631c7c4cf50)
* Connected to mysite.kz (192.168.200.100) port 80 (#0)
> GET /.well-known/acme-challenge/index.html HTTP/1.1
> Host: mysite.kz
> User-Agent: curl/7.64.0
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Server: nginx/1.15.12
< Date: Sun, 28 Feb 2021 01:44:15 GMT
< Content-Type: text/html
< Content-Length: 170
< Connection: keep-alive
< Location: https://mysite.kz/.well-known/acme-challenge/index.html
<
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.15.12</center>
</body>
</html>
* Connection #0 to host mysite.kz left intact
server {listen 80;
:Так лучше?
Что за магия? Зачем тут map
Дописывая _ в начало имени свойства объекта? О_о