, ...
( node js), 4000, ( http-), 3000, -. , "" ssl , , - , .
SSL. URL-.
, : https://frontend.example.com
https://backend.example.com ( URL- , , - https://example.com https://www.example.com )
, https:// , https:// , . , https://frontend.example.com https://backend.example.com, , : D
https://frontend.example.com
, , URL-, angular https://backend.example.com http://localhost:4000
443 ( https , https://... ) - http.
http- ( google -), apache nginx, .
, nginx/apache, , , . mod_ssl mod_http_proxy mod apache ( , nginx - )
- apache :
<VirtualHost *:80>
ServerName frontend.example.com
ServerSignature Off
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [NE,R,L]
</VirtualHost>
<virtualhost *:443>
ServerName frontend.example.com
ServerAdmin webmaster@localhost
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder on
SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS !RC4"
SSLCompression Off
SSLCertificateFile /path/to/cert.pem
SSLCertificateKeyFile /path/to/privkey.pem
SSLCertificateChainFile /path/to/chain.pem
ServerSignature Off
RequestHeader set X-FORWARDED-PROTOCOL https
RequestHeader set X-Forwarded-Ssl on
ProxyPreserveHost On
AllowEncodedSlashes NoDecode
<Location />
Require all granted
ProxyPassReverse http://127.0.0.1:3000
ProxyPassReverse http://frontend.example.com/
</Location>
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule .* http://127.0.0.1:3000%{REQUEST_URI} [P,QSA]
RequestHeader set X_FORWARDED_PROTO 'https'
, , , , 3000 4000 frontend.example.com backend.example.com.
, . , , , HTTP HTTP- ssl.