Unable to issue SSL on website with laravel app

OS type and version Ubuntu Linux 22.04.3
Webmin version 2.105.
Virtualmin version 7.9.0.

Looking for some advise from you experts out there… We have a laravel site on a domain and are unable to issue an SSL cert due to the root of the application being set to …/public_html/public - for laravel…

These are in nginx conf files for this site. All other sites use the default …/public_html folder and SSL works as expected.

set $base /home/domain.com/public_html;
root $base/public;

Relevant part of the error…

The Certificate Authority failed to download the temporary challenge files created by Certbot. Ensure that the listed domains serve their content from the provided --webroot-path/-w and that files created there can be downloaded from the internet.

Can someone point me in the right direction so I can have the laravel app and SSL requests/renewals work as expected on this site?

Thank you in advance for your time!
– Craig

Nothing on this? Nobody has run into this issue? Appreciate any assistance!

how are you requesting a certificate? Via Virtualmin lets encrypt tab?
Not sure how laravel works inside a Virtual Server.

Yes, that is correct. On this site Let’s Encrypt errors b/c the root has the “/public” added in Nginx. Other (non-laravel) sites install/renew Let’s Encrypt w/out issue.

I just don’ t know how to work around the root location, or if there is a better way to configure a laravel app for Virtualmin environment.

Ok so I figured this out, entirely my lack of Virtualmin knowledge…

First I reverted my nginx changes back to the default path Virtualmin creates

root /home/domain.com/public_html;

Then go to Web Configuration → Website Options → Website documents sub-directory = public_html/public

SSL renewal works as expected. Laravel application works as expected. Virtualmin is awesome!

– Craig

1 Like

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