2017-11-10 7 views
0

私はのapache/SOLR:HTTPSによるアクセスのSolrサーバ://ドメイン名

http://xxx.xxx.xxx.xxx:8983/solr/#/ 

ようなHTTP IPにSolr検索を使用してきたが、今、私はドメインを持っているために、セキュリティ上の理由から、必要名前+ HTTPS

https://example.com:8983/solr/#/ 

か(?)

https://example.com/solr/#/ 

いずれかの方法のように私はCにどのよう見当もつかないonfig私のapacheのconfのvhostファイル...

どのようなアイデアですか?

PS。私はすでに自分のドメインのhttpsを有効にしていますhttps://example.com/

答えて

-1

ローカルホストだけが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> 
+0

私はタイトルにapacheを言った – Francesco

関連する問題