hi, I want to change the root directory of my website which the server panel is CWP centos-web-panel. i find a solution that says change DocumentRootand directory in httpd.conf but I can't change that because a lot of my website using this server. I want to change the root folder in one of my websites.
also, I find another solution which said edit the file.
# nano /etc/httpd/conf.d/your_site.conf
and add this code to the file
<VirtualHost *:80>
DocumentRoot /var/www/html/your_site/public
ServerName your_domain
<Directory /var/www/html/your_site/>
AllowOverride All
</Directory>
</VirtualHost>
but not working.
how I can do that?
are any solution for that or with .htaccess or own laravel template?
so i want to change /public_html/ to /public_html/public/ in centos-web-panel
i using Nginx


I prefer this answer. which is more secure. and no need to redirect. create a folder in the public_html maybe
foldernamethen move all of files and folders from thepublic_htmlto thefoldernameafter that move all files and folders frompubliclaravel folder topublic_htmlopenindex.phpand edit that like this.to
then hide
.envfile with.htaccessFinish