ローカルホストだけがlistenするようにすることもできますし、ApacheまたはNginxをリバースプロキシとしてインストールして、HTTPSのポート443でパブリックIPをリッスンし、ポート8983 。
あなたのVirtualHostファイルに次のようなものを使用することができますnginxのでは
:Apacheの
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name example.com;
location/{
try_files $uri @proxy;
}
location @proxy {
include cors_support;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-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-Proto https;
proxy_set_header HTTPS "on";
proxy_pass_header Server;
proxy_pass http://127.0.0.1:8983;
proxy_buffering off;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
tcp_nodelay on;
}
access_log /var/log/nginx/access-example.log;
error_log /var/log/nginx/error-example.log;
include snippets/ssl-params.conf;
include snippets/ssl-example.com.conf;
}
モジュールのプロキシとproxy_httpで有効:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin [email protected]
ServerName example.com
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8983/
ProxyPassReverse / http://127.0.0.1:8983/
<Location />
Require all granted
</Location>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLProxyEngine On
SSLCertificateFile /etc/apache2/ssl/cert.pem
SSLCertificateKeyFile /etc/apache2/ssl/privkey.pem
Include /etc/apache2/ssl/options-ssl-apache.conf
SSLCertificateChainFile /etc/apache2/ssl/chain.pem
</VirtualHost>
</IfModule>
私はタイトルにapacheを言った – Francesco