CentOS 7のリファラーベースのApacheリダイレクト

CentOS 7のリファラーベースのApacheリダイレクト

home.mydomain.com要求されたリファラーが次のパスから来る場合にのみ、次のいずれかのパスを要求するようにCentOS 7サーバーでApache httpdを設定するにはどうすればよいですかmydomain.com これで、リファラーの外部からの要求はmydomain.comリダイレクトされますかmydomain.com/login

sumの定義は次のとおりですVirtualHostmydomain.comhost.mydomain.com

<VirtualHost www.mydomain.com:80>
    ServerName www.mydomain.com
    ServerAlias mydomain.com
    ErrorLog /var/log/httpd/mydomain_com_error.log
    CustomLog /var/log/httpd/mydomain_com_requests.log combined
    DocumentRoot /var/www/mydomain.com/public_html
</VirtualHost>

<VirtualHost home.mydomain.com:80>
    ServerName home.mydomain.com
    ProxyPass / http://localhost:4000/ connectiontimeout=5 timeout=30
</VirtualHost>

ベストアンサー1

この試み:-

<仮想ホストhome.mydomain.com:80>

サーバー名 home.mydomain.com

コマンドを許可、拒否

127.0.0.1/8で許可

mydomain.comで許可

</仮想ホスト>

詳細については、次を参照してください。http://httpd.apache.org/docs/2.2/en/mod/mod_authz_host.html

おすすめ記事