Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving SSL certificate with Nginx #866

Open
iliajie opened this issue Jul 24, 2024 · 12 comments
Open

Moving SSL certificate with Nginx #866

iliajie opened this issue Jul 24, 2024 · 12 comments

Comments

@iliajie
Copy link
Collaborator

iliajie commented Jul 24, 2024

Hey Jamie!

Moving SSL certificate to the new location seems to work just fine with Apache. To be clear I mean this page:

image

However, when used with Nginx things are getting really broken:

image

It gets broken to the level that Webmin stops working, e.g.:

image

miniserv.conf in this case gets new records, like:

-certfile=/etc/webmin/host.ubuntu24-gpl.virtualmin.dev.cert
+certfile=/etc/webmin/ubuntu24-gpl.virtualmin.dev.cert
-keyfile=/etc/webmin/host.ubuntu24-gpl.virtualmin.dev.key
+keyfile=/etc/webmin/ubuntu24-gpl.virtualmin.dev.key

.. but those new files simply don't exist!

root@ubuntu24-gpl:/etc# ls -lsa /etc/webmin/ubuntu24-gpl.virtualmin.dev.key
ls: cannot access '/etc/webmin/ubuntu24-gpl.virtualmin.dev.key': No such file or directory
root@ubuntu24-gpl:/etc# ls -lsa /etc/webmin/ubuntu24-gpl.virtualmin.dev.cert
ls: cannot access '/etc/webmin/ubuntu24-gpl.virtualmin.dev.cert': No such file or directory
@jcameron
Copy link
Collaborator

Yikes! That's clearly a bug ... I will look into it

@iliajie
Copy link
Collaborator Author

iliajie commented Jul 25, 2024

Thanks!

@jcameron
Copy link
Collaborator

What about the SSL cert files in the domain's home directory - did those get renamed?

@iliajie
Copy link
Collaborator Author

iliajie commented Jul 25, 2024

If I remember correctly it did rename those!

Even though fixing the source of the bug is priority, yet I think we should probably eval that code, so it breaks for particular step in particular rather than causing the general issue.

@jcameron
Copy link
Collaborator

Ok, the patch I just attached to this ticket should fix it..

@iliajie
Copy link
Collaborator Author

iliajie commented Jul 25, 2024

I will test it and let you know if it works!

@iliajie
Copy link
Collaborator Author

iliajie commented Jul 25, 2024

I have tested it but sadly it doesn't fix the original issue:

image

@iliajie iliajie reopened this Jul 25, 2024
@jcameron
Copy link
Collaborator

If you check the domain's config file under /etc/webmin/virtual-server/domains, are the ssl_cert and ssl_key lines correct?

@iliajie
Copy link
Collaborator Author

iliajie commented Jul 26, 2024

If you check the domain's config file under /etc/webmin/virtual-server/domains, are the ssl_cert and ssl_key lines correct?

No, domain config file not even touched.

@jcameron
Copy link
Collaborator

I'm so sorry .. try the further patch I just attached to this ticket.

@iliajie
Copy link
Collaborator Author

iliajie commented Jul 27, 2024

Thanks! That seems to be finished up properly now!

However, there is still a problem because the paths for shared SSL certificates weren't updated. Please look at this screenshot:

image

To be clear, I was moving a domain's SSL certificates to /home/domain. While all the domain's records were updated correctly, the shared SSL certificates weren't:

image image image

@jcameron
Copy link
Collaborator

Ah yes .... looking into the cause of that now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants