apache - Redirect subdomains to different paths while using separate SSL certificates -


i have website several different subdomains, , want have parts of site higher levels of security others. such admin areas. know can create many certificates want. issue having whatever subdomain listed first, it's documentroot applied other subdomains redirecting https://. here code in httpd-vhosts.conf:

    # http configuration     <virtualhost *:80>     servername account.example.com     rewriteengine on           rewritecond %{https} !=on           rewriterule (.*) https://%{http_host}%{request_uri}           documentroot "/applications/mamp/htdocs/website/account"     </virtualhost>      # ssl configuration     <virtualhost *:443>         servername account.example.com         sslengine on         sslcertificatefile /applications/mamp/conf/apache/account.crt         sslcertificatekeyfile /applications/mamp/conf/apache/account.key         documentroot "/applications/mamp/htdocs/website/account"     </virtualhost>      #secure admin config     <virtualhost *:80>     servername secure.example.com     documentroot "/applications/mamp/htdocs/website/secure" rewriteengine on           rewritecond %{https} !=on           rewriterule (.*) https://%{http_host}%{request_uri}           documentroot "/applications/mamp/htdocs/website/secure"     # other directives here      </virtualhost>     #ssl config admin area      # ssl configuration         <virtualhost *:443>             servername secure.example.com             sslengine on             sslcertificatefile /applications/mamp/conf/apache/secure.crt             sslcertificatekeyfile /applications/mamp/conf/apache/secure.key             documentroot "/applications/mamp/htdocs/website/secure"         </virtualhost> 

for example, if go secure.example.com it's documentroot /applications/mamp/htdocs/website/account instead of /applications/mamp/htdocs/website/secure

is there way fix this?

thank in advance!


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -