How to use multiple HTTPS on localhost with Apache?

0

I have already made the settings in apache, hosts, I generated a server.crt certificate and a local domain is working nice link

Now I need another local domain to work link

I made a few attempts, among them the one that made admin work was to append these lines to apache's httpd-ssl.conf file

ServerName meusite.localhost:443
DocumentRoot D:/home/subdominios/meusite

ServerName admin.localhost:443
DocumentRoot D:/home/subdominios/admin

It turns out that this way the domain meusite.localhost responds in the admin folder and I can not use it

In simple http mode both work fine, but in https of the conflict

I do not handle much of Apache, so I ask for help from colleagues, like having several https running on localhost

Note: It's for development only

    
asked by anonymous 18.05.2018 / 01:58

1 answer

0

I solved adding virtual domains with port 443 in the httpd-ssl.conf file and removing the lines quoted above in question

<VirtualHost *:443>
    ServerName admin.localhost
    DocumentRoot "D:/home/subdominios/admin"
    SSLEngine on
    SSLCertificateFile "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/conf/server.crt"
    SSLCertificateKeyFile "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/conf/server.key"
</VirtualHost>
    
18.05.2018 / 03:17