1

私は以下の指示に従った:virtual hosthttpsapache 2.4仮想ホストが私の "Index of /"に来る

私ロカズがwebsideを主催するために、私はDynDNSのを使用するように、私の最後の000-default.confは、次のようになります。

<VirtualHost *:443> 
       ServerName www.mydomain.dyndns.xx 
       ServerAdmin [email protected] 
       DocumentRoot /var/www/html/mydomain.dyndns.xx/ 
       ErrorLog ${APACHE_LOG_DIR}/error.log 
       CustomLog ${APACHE_LOG_DIR}/access.log combined 
       SSLEngine on 
       SSLCertificateFile /etc/apache2/ssl/ca.crt 
       SSLCertificateKeyFile /etc/apache2/ssl/ca.key 

       ErrorLog ${APACHE_LOG_DIR}/www.virtualhost1.com_error.log 
       CustomLog ${APACHE_LOG_DIR}/www.virtualhost1.com_access.log combined 
</VirtualHost> 

私はadditionaly follwoing /etc/apache2/apache.confで設定:

<Directory /var/www/html/mydomain.dyndns.xx> 
     Options Indexes FollowSymLinks 
     AllowOverride None 
     Require all granted 
</Directory> 

/etx/host

127.0.0.1  localhost 
::1    localhost ip6-localhost ip6-loopback 
ff02::1   ip6-allnodes 
ff02::2   ip6-allrouters 

127.0.1.1  raspberrypi 

192.168.x.x  www.mydomain.dyndns.xx 

開こうとするとポート80の「Indes of /」のページURL、これらのファイルをクリックすると、http:// mydomain.dyndns.xx/mydomain.dyndns.xx.index.phpが表示されます

https://を呼び出すと、ブラウザにERR_CONNECTION_REFUSEDが表示されます。

ありがとうございました!

答えて

0

000-defualt.confファイルは完全にファイルに見えます。

EDITのPORTS.CONFファイル

編集しports.confファイル、次の行を追加します:SSL証明書を使用する場合は、以下の変更を行うことを確認してくださいが

Listen 192.168.x.x:443 

をこれがするようにApacheに指示します指定されたIp:portから着信接続をリッスンします。443

ローカライズに設定します。

あなたは/etc/hostsファイルに次のエントリすることによって最初にシステム上の設定をテストすることができます:192.168.x.x www.mydomain.dyndns.xxをコメントアウトすることを確認してください

Listen 127.0.0.x:443 

127.0.0.x www.mydomain.dyndns.xx 

をそしてports.confファイルに以下を追加configをテストする前にports.confファイルに入力してください

ENABLE MOD_SS

再起動apache2の

sudo a2enmod ssl 

RESTART APACHE:https://www.mydomain.dyndns.xx

sudo systemctl restart apache2お使いのブラウザのポイントで

自分のドメイン名にL

次のコマンドを発行してmod_sslを有効にします

関連する問題