Actually, I know this is not good to ask for help here regarding anything else except HestiaCP.
But I tried almost all possible ways and not able to solve the issue.
What I have to do is…
I have a ‘nginx.conf’ file in /home/{user}/web/{web}/public_html/.nginx.conf. I have to include this with nginx.conf for the same user and website.
I tried to add it as “include /home/{user}/web/{web_address}/public_html/.nginx.conf”
But When I restart Nginx with the new Configuration, it give error and cannot be started…
Remove the dot symbol before nginx.conf. For security reasons, it is better not to store the nginx configuration file in the public_html folder, but to move it to a higher level.
as you can see, the conf files already hold an include directive that allows for custom configs. you just need to put it in /home/user/conf/web/sub.domain.com/ and name it nginx.ssl.conf_something so it matches the include.
after that run nginx -t or try to restart and check journalctl output if it fails.
depending from whereever you copied whatever is in that conf file you most likely need to adjust it to your installation.
use your administrations skills and linux powers for that! good luck.
that nginx vs apache2 performance discussion is by far overrated IMHO. maybe, if you run on a small system and have to be careful with ressources and such, maybe then it can help to get rid of apache in between. but most users will put in whatever plugin for everything in wordpress (just an example) anyway without thinking about performance at all and then try to solve performance issues on the other end…
don’t get me wrong, I am not denying that nginx might offer better performance but I also believe that the efforts needed to adjust configs and such are often not worth a rather small gain. technically apache2 handling (.htaccess) things like rewrites and headers and the connection to php is just another man in the middle - which might be avoidable but not neccessarily consumes as much performance as one might think.
so, happy to see that you a) where able to fix the nginx conflicts and b) decided that it’s not worth it and instead just using what’s proven to work for your framework
I believe that nginx perform better, but those minor difference may lead to headache. I agree with you that Apache + Nginx is best combination for everything (almost).
But this give another experience why .htaccess far better than rules defined in nginx.conf.