Certbot - subdomain uses same root directory from domain


#1

Hello,

I have a domain.org and a sub.domain.org. The root directory from domain.org is /var/www/domain while the root directory for sub.domain.org is /var/www/sub. When I was using http everything worked fine. I ran the following commands:

certbot --apache -d domain.org -d www.domain.org

and

certbot --apache -d sub.domain.org

If I do this the domain.org gives an error of configuration when I try to access it. But without running the command

certbot --apache -d sub.domain.org

It works flawless the problem now is that sub.domain.org now uses the /var/www/domain instead of /var/www/sub, and I don’t know how to resolve it. Besides if I use http://sub.domain.org it redirects to https://sub.domain.org. Any idea how to fix it?


#2

Which error exactly do you get after wich command exactly?

Isn’t that the correct behaviour?


#3

The error it gives, is in firefox that says the website was not configure properly and it is not secure.

It is not, because I did not “activate” the https for him, so it should use http only


#4

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