2016-05-05 4 views
0

私はyahooでホストされているドメインを持っています。apache仮想ホストのリダイレクトトラフィックはLANでは動作しますが、WANでは動作しません

しかし私は実際に自分のドメインとクラウドのサブドメインをホストするために私の自宅のサーバーを使用しています。

<meta http-equiv="refresh" content="0;URL=http://111.111.111.111/cloud" /> 

マイイン:

はとてもヤフーでは、私は私の静的IP

<meta http-equiv="refresh" content="0; url=http://111.111.111.111"> 

、私の静的IPに私のすべてのサブドメインのトラフィックにすべてのwww.mydomain.comを転送しますハウスサーバーは、Ubuntu 14.04LTS上のApache 2.4.7です。私はバーチャルホストサイトを作成してそれを有効にして、LANにいれば非常にうまく動作します。しかし、私がWAN上にいるとき、Webブラウザは、サーバが動作を停止したとタイムアウトします。 私は問題がどこにあるのか知っていると思いますが、それを解決する方法がわかりません。つまり、htppsへのリダイレクトで、私はLAN IPを使用しています。私の静的IPまたは私のドメイン名を使っても解決できませんでした。ここで私の仮想ホストの私の対応のサイトです:

<VirtualHost *:80> 
     ServerAdmin [email protected] 
     ServerName www.myexample.com 
     ServerAlias myexample.com 

     DocumentRoot /var/www/html/example-test/ 

     Alias/ /var/www/html/example-test/ 

     ### Redirect /cloud https://www.myexample.com/cloud 
     Redirect /cloud https://192.168.1.122/cloud 
     ### Redirect /cloud https://111.111.111.111/cloud 

     <Directory /var/www/html/example-test> 
      Options Indexes FollowSymLinks MultiViews 
      AllowOverride All 
      Require all granted 
     </Directory> 

     <Directory /var/www/owncloud> 
      Options Indexes FollowSymLinks MultiViews 
      AllowOverride All 
      Require all granted 
     </Directory> 

     ErrorLog /var/log/apache_http_myexample.com.error.log 
    </VirtualHost> 


    ### <VirtualHost www.myexample.com:443> 
    <VirtualHost 192.168.1.122:443> 
    ### <VirtualHost 111.111.111.111:443> 
     ServerAdmin [email protected] 
     ServerName www.myexample.com 
     ServerAlias myexample.com 

     Alias /cloud /var/www/owncloud 
     DocumentRoot /var/www/owncloud/ 
     ####Configuration for SSL ##### 
     SSLEngine on 
     SSLCertificateFile /etc/apache2/ssl/examplecloud.pem 
     SSLCertificateKeyFile /etc/apache2/ssl/examplecloud.key 
     #### End of SSL Configuration #### 


     <Directory /var/www/owncloud> 
     Options Indexes FollowSymLinks MultiViews 
     AllowOverride All 
     Require all granted 
     </Directory> 

     ErrorLog /var/log/apache_https_cloud.myexample.com.error.log 
    </VirtualHost> 

すべてのヘルプ/洞察力ははるかに高く評価されるだろう...

おかげで、

答えて

0

が場合Redirect permanent /cloud https://192.168.1.122/cloud

をお試しくださいそれがうまくいかなかった場合は、リダイレクトを次のように置き換えて、より汎用的なソリューションを試してください:

RewriteEngine On RewriteCond %{HTTPS} off RewriteRule^https://%{HTTP_HOST}%{REQUEST_URI}

+0

私は両方のアイデアを試しましたが、まだ行っていません。 –

+0

私は気づいたことの一つは、ゲストネットワークからowncloudにアクセスできます...私はそれを期待していませんでした。私はそれがDNSの問題だと思っていたが、今はそれがファイアウォールの問題だと思っている –

関連する問題