I have successfully installed Hestia Panel on my Ubuntu 20.04 LTS VPS server. I added a domain mydomain.com successfully with HTTPS. I am able to access the main domain page.
However, I cannot access any other routes as they all give me 404. I looked in the configurations on hte command Line and found /home/myuser/conf/web/mydomain.com/ and that lists
apache2.conf
apache2.ssl.conf
nginx.conf
nginx.forcessl.conf
nginx.ssl.conf
I tried adding try_files $uri $uri/ /index.php$is_args$args; to nginx.ssl.conf and restart the nginx server, but no effect.
Where on earth do you configure nginx domain files?
Read my question. The issue is not the docroot but rather the “url rewrite” configuration with nginx, the way Hestia is set up. I usually would edit the server block for the domain and the necessary “rewrite line” ( try_files $uri $uri/ /index.php$is_args$args; )
Server block in the config files get overwritten every time you change a setting or update the server. There for we use templates… So use them, Other wise you will comeback the next update that all settings have been changed…
After trying multiple combinations, what really worked for me was :
Install Hestia with Nginx and PHP-FPM ( no apache whatsoever)
Copy the Laravel template in /usr/local/hestia/data/templates/web/nginx/php-fpm to another template called “MyTemplate” ( copy laravel.tpl to MyTemplate.tpl and laravel.stpl to MyTemplate.stpl )