'/api': 'http://localhost:8000/api'
mode: 'universal',
ip addr
выдал только 127.0.0.1 и какой то двойной ip:inet 192.168.5.177/24 brd 192.168.5.255 scope global noprefixroute dynamic eno50332176
openssl s_client -connect address:443
- сертификат отдает. Получается с файерволом все ок.openssl x509 -in cert.pem -text
нашел только следующие связанные с именем строкиX509v3 Subject Alternative Name:
DNS:site.ru, DNS:www.site.ru
<VirtualHost *:443>
ServerName site.ru
ServerAlias www.site.ru site.ru
DocumentRoot /var/www/newstolica
ErrorLog /var/log/httpd/newstolica-error.log
CustomLog /var/log/httpd/newstolica-access.log combined
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/site.ru/cert.pem
SSLCertificateChainFile /etc/letsencrypt/live/site.ru/chain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/site.ru/privkey.pem
</VirtualHost>
openssl s_client -connect 127.0.0.1:443
вот что получилось:CONNECTED(00000003)
depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = R3
verify return:1
depth=0 CN = site.ru
verify return:1
---
Certificate chain
0 s:/CN=site.ru
i:/C=US/O=Let's Encrypt/CN=R3
1 s:/C=US/O=Let's Encrypt/CN=R3
i:/O=Digital Signature Trust Co./CN=DST Root CA X3
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIFLDCCBBSgAwIBAgISBJN1ETQOi9Wrriti2HyHTj7kMA0GCSqGSIb3DQEBCwUA
MDIxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQswCQYDVQQD
EwJSMzAeFw0yMTAyMTYxMzIyMzJaFw0yMTA1MTcxMzIyMzJaMBYxFDASBgNVBAMT
C3N0b2xpY2Eub29vMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuVUV
16lBzu9g8VtKhKopKXx5eKGagAvZg3Zeno6o17o0gc/zJ1pBEcGahyHLGFwb5Zsb
4pin2sqTw0/eY7hV/aS8K6+ZKvK/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5wwDQYJ
KoZIhvcNAQELBQADggEBAHbdus8qcILrl5zTGNtE2tmDviZj3HpHaliDEJ2gHS7Z
tSf7EDerrcuBQ2yqNEoK7asjYip21YScnfSe/pDOK4mIBIFWRn+0LVhNlGN7Oct4
iCLMZ2zqduXl5QiTDsaft1wQNYD+YXuFNP69e5OvY78p3Y90x+/MvBZhQGkKD0EY
a1QmaIHiYhJQDFnPUR59CZ8uJ7w76XCylNdgEGhBB041i1dqHXzMsWnEI9HiRVsl
py6oKqqoU+3BPXyTwWc9q5O2ZWy2h750RET3lRPKgHc6lPq3j7YKAYqSjv7Db8ef
o8NTaMr/lJc+fM1dbN/TL10ec/4+Q+fg1CA5GzI3suE=
-----END CERTIFICATE-----
subject=/CN=site.ru
issuer=/C=US/O=Let's Encrypt/CN=R3
---
No client certificate CA names sent
Peer signing digest: SHA512
Server Temp Key: ECDH, P-256, 256 bits
---
SSL handshake has read 3151 bytes and written 415 bytes
---
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-GCM-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : ECDHE-RSA-AES256-GCM-SHA384
Session-ID: CFE624FA344E9687D032244550611B55AA431388EE81B08AE3877E24541766CA
Session-ID-ctx:
Master-Key: A97FDC8A0FEB5CC559BCE81C32C003EBC5B408AF018065166158A66F3110D8F4164756956AEA397EC77155D76868290E
Key-Arg : None
Krb5 Principal: None
PSK identity: None
PSK identity hint: None
TLS session ticket lifetime hint: 300 (seconds)
TLS session ticket:
0000 - 37 22 09 1f e2 48 65 3e-db 6c 32 76 b9 ad 64 ae 7"...He>.l2v..d.
0010 - 5e 1a 5e ec d4 c5 54 b4-7f 49 c4 1d 0a 96 80 00 ^.^...T..I......
0020 - 6b 46 cf 99 9d 46 46 65-7e 23 ff 04 e5 e3 ba cf kF...FFe~#......
0030 - 71 9a 71 38 4c e7 42 48-ca 68 42 3b b2 eb c2 b7 q.q8L.BH.hB;....
0040 - c7 9a 71 34 65 4b a9 60-57 34 a9 3a 75 f5 29 13 ..q4eK.`W4.:u.).
0050 - dc f6 cd 2c 5f 74 32 71-72 5d 93 08 88 13 9a ee ...,_t2qr]......
0060 - 13 b6 96 87 fe c0 d2 92-d0 06 93 d7 4e e8 61 f2 ............N.a.
0070 - 3f c5 21 5f de 77 a9 1d-e6 74 85 03 da d0 70 e5 ?.!_.w...t....p.
0080 - d5 48 92 e3 96 5e 46 4b-a9 e3 bb 9b 2b bb 69 a8 .H...^FK....+.i.
0090 - 09 c0 2c f0 5e 9e d2 b1-fd de 6b b2 3c 26 25 4f ..,.^.....k.<&%O
00a0 - b3 2f 58 53 57 55 31 d3-b4 1c d3 36 7e ba dc e1 ./XSWU1....6~...
00b0 - b5 29 59 c5 4c ce 20 3e-f2 ce 8f c8 00 7b 7f 1b .)Y.L. >.....{..
Start Time: 1613511280
Timeout : 300 (sec)
Verify return code: 0 (ok)
---
closed
sudo certbot certonly --apache -d site.ru -d www.site.ru
. А как исходя из самих файлов не знаю как посмотреть имя в сертификатеnetstat -plutn
выдает для 443 только0.0.0.0:443
openssl s_client -connect вашадрес:443
пишет: socket: Bad file descriptor
connect:errno=9
$ systemctl status httpd.service
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Пн 2021-02-15 11:46:18 MSK; 45s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 17192 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
Process: 11147 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
Main PID: 17196 (httpd)
Status: "Total requests: 4; Current requests/sec: 0.1; Current traffic: 512 B/sec"
CGroup: /system.slice/httpd.service
├─17196 /usr/sbin/httpd -DFOREGROUND
├─17197 /usr/sbin/httpd -DFOREGROUND
├─17198 /usr/sbin/httpd -DFOREGROUND
├─17199 /usr/sbin/httpd -DFOREGROUND
├─17200 /usr/sbin/httpd -DFOREGROUND
├─17201 /usr/sbin/httpd -DFOREGROUND
└─17203 /usr/sbin/httpd -DFOREGROUND
фев 15 11:46:18 centos02 systemd[1]: Stopped The Apache HTTP Server.
фев 15 11:46:18 centos02 systemd[1]: Starting The Apache HTTP Server...
фев 15 11:46:18 centos02 systemd[1]: Started The Apache HTTP Server.
VirtualHost configuration:
*:443 site.ru (/etc/httpd/conf/httpd.conf:384)
*:80 is a NameVirtualHost
default server shop.local (/etc/httpd/conf/httpd.conf:368)
port 80 namevhost shop.local (/etc/httpd/conf/httpd.conf:368)
alias shop.site.ru
port 80 namevhost stolica5.local (/etc/httpd/conf/httpd.conf:376)
alias www.site.ru
alias site.ru
port 80 namevhost stolica3.local (/etc/httpd/conf/httpd.conf:403)
port 80 namevhost mirstartup.ru (/etc/httpd/conf/httpd.conf:411)
alias www.mirstartup.ru
alias mirstartup.local
ServerRoot: "/etc/httpd"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/etc/httpd/logs/error_log"
Mutex default: dir="/run/httpd/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex authdigest-client: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
Mutex ssl-cache: using_defaults
PidFile: "/run/httpd/httpd.pid"
Define: _RH_HAS_HTTPPROTOCOLOPTIONS
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="apache" id=48 not_used
Group: name="apache" id=48 not_used
нужно удалить или ssl.conf или конфигурацию HTTPS из основного конфига
<VirtualHost *:443>
ServerName site.ru
ServerAlias www.site.ru site.ru
DocumentRoot /var/www/newstolica
ErrorLog /var/log/httpd/newstolica-error.log
CustomLog /var/log/httpd/newstolica-access.log combined
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/stolica.ooo/cert.pem
SSLCertificateChainFile /etc/letsencrypt/live/stolica.ooo/chain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/stolica.ooo/privkey.pem
</VirtualHost>
ServerRoot "/etc/httpd"
#Listen 12.34.56.78:80
Listen 80
Include conf.modules.d/*.conf
User apache
Group apache
ServerAdmin root@localhost
ServerName site.ru:80
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "/var/www/html"
<Directory "/var/www">
# AllowOverride All
# Allow open access:
# Require all granted
AllowOverride None
# Allow open access:
Require all granted
</Directory>
# Further relax access to the default document root:
<Directory "/var/www">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
<Files ".ht*">
Require all denied
</Files>
ErrorLog "logs/error_log"
LogLevel warn
<IfModule log_config_module>
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog "logs/access_log" combined
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
</IfModule>
<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>
<IfModule mime_module>
TypesConfig /etc/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</IfModule>
AddDefaultCharset UTF-8
<IfModule mime_magic_module>
MIMEMagicFile conf/magic
</IfModule>
EnableSendfile on
IncludeOptional conf.d/*.conf
<VirtualHost *:80>
ServerName site.ru
ServerAlias www.site.ru site.ru
DocumentRoot /var/www/newstolica
ErrorLog /var/log/httpd/newstolica-error.log
CustomLog /var/log/httpd/newstolica-access.log combined
</VirtualHost>
<VirtualHost *:443>
ServerName site.ru
ServerAlias www.site.ru site.ru
DocumentRoot /var/www/newstolica
ErrorLog /var/log/httpd/newstolica-error.log
CustomLog /var/log/httpd/newstolica-access.log combined
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/site.ru/cert.pem
SSLCertificateChainFile /etc/letsencrypt/live/site.ru/chain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/site.ru/privkey.pem
</VirtualHost>
Listen 443 https
SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog
SSLSessionCache shmcb:/run/httpd/sslcache(512000)
SSLSessionCacheTimeout 300
SSLRandomSeed startup file:/dev/urandom 256
SSLRandomSeed connect builtin
SSLCryptoDevice builtin
<VirtualHost *:443>
ServerName site.ru
ServerAlias www.site.ru site.ru
DocumentRoot /var/www/newstolica
ErrorLog /var/log/httpd/newstolica-error.log
CustomLog /var/log/httpd/newstolica-access.log combined
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/stolica.ooo/cert.pem
SSLCertificateChainFile /etc/letsencrypt/live/stolica.ooo/chain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/stolica.ooo/privkey.pem
</VirtualHost>
<VirtualHost _default_:443>
ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log
LogLevel warn
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite HIGH:3DES:!aNULL:!MD5:!SEED:!IDEA
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-5]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
CustomLog logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
VirtualHost configuration:
*:443 is a NameVirtualHost
default server stolica.ooo (/etc/httpd/conf.d/ssl.conf:56)
port 443 namevhost stolica.ooo (/etc/httpd/conf.d/ssl.conf:56)
alias www.site.ru
alias site..ru
port 443 namevhost site.ru (/etc/httpd/conf.d/ssl.conf:68)
port 443 namevhost site.ru (/etc/httpd/conf/httpd.conf:385)
alias www.site.ru
alias site.ru
*:80 is a NameVirtualHost
default server shop.local (/etc/httpd/conf/httpd.conf:368)
port 80 namevhost shop.local (/etc/httpd/conf/httpd.conf:368)
alias shop.site.ru
port 80 namevhost site.local (/etc/httpd/conf/httpd.conf:376)
alias www.site.ru
alias site.ru
ServerRoot: "/etc/httpd"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/etc/httpd/logs/error_log"
Mutex authdigest-client: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/run/httpd/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
PidFile: "/run/httpd/httpd.pid"
Define: _RH_HAS_HTTPPROTOCOLOPTIONS
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="apache" id=48 not_used
Group: name="apache" id=48 not_used