Mismatch error with domains

Create your three vHosts, then create the certificates.

Thats what I have now :confused:

And what’s the problem?

I don’t see new certificates. One from 2018-09-20 - intranet.lsgob.us

https://transparencyreport.google.com/https/certificates/%2Fr7rB%2F6zla4ItyXMMBx1F76hUgduDdJOGV654p7okt0%3D

But I thought you want www + non-www, so create this certificate with

-d www.intranet.lsgob.us -d intranet.lsgob.us

And your vHost must have both names as server names.

Like this?

<VirtualHost *:80>
            ServerName intranet.lsgob.us

            ServerAdmin ayuda@roozgames.com
            DocumentRoot /var/www/intranet
            ErrorLog ${APACHE_LOG_DIR}/error.log
            CustomLog ${APACHE_LOG_DIR}/access.log combined

    </VirtualHost>


    <VirtualHost *:80>
            ServerName www.intranet.lsgob.us

            ServerAdmin ayuda@roozgames.com
            DocumentRoot /var/www/intranet
            ErrorLog ${APACHE_LOG_DIR}/error.log
            CustomLog ${APACHE_LOG_DIR}/access.log combined
    </VirtualHost>

Please create one vHost with two names, not two. Two vHosts -> much more complicated.

https://httpd.apache.org/docs/2.4/vhosts/examples.html

ServerName intranet.lsgob.us
ServerAlias www.intranet.lsgob.us

Same with your other two name pairs.

<VirtualHost *:80>
            ServerName intranet.lsgob.us
ServerAlias www.intranet.lsgob.us

            ServerAdmin ayuda@roozgames.com
            DocumentRoot /var/www/intranet
            ErrorLog ${APACHE_LOG_DIR}/error.log
            CustomLog ${APACHE_LOG_DIR}/access.log combined

    </VirtualHost>

Like this? that is what I have at the beggining but didn't worked either. I will try it again

1 Like

Yes. Now try to create one certificate with two domain names (use the -d - option).

Look at your older post:

If you have one vHost with two names and two certificates with one domain name, you can't use two certificates with this one vHost. So www or non-www is wrong.

But there is a redirect http -> https intranet.lsgob.us, but no www - redirect. So I hope that isn't a problem.

Now you have the other solution:

One wildcard certificate *.lsgob.us

Used with

https://intranet.lsgob.us/
https://pd.lsgob.us/
https://lsgob.us/

That’s possible. But then change the links on the page https://lsgob.us/ - remove the www.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.