I want to remove /public in the URL i want to use virtual host not changing server.php into index.php.
i’m useing webuzo admin panel i add this lines to apache config file
but it seems its not working
please help me what should i do
my server is centOs 7 and my project is on laravel 5.8
<VirtualHost *:80>
ServerName uptodate.pnashr.pub
ServerAdmin [email protected]
DocumentRoot /home/uptodateadmin/public_html/public
<Directory /home/uptodateadmin/public_html/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Require all granted
</Directory>
</VirtualHost>
3
Answers
I have testing your VirtualHost config, nothing wrong with that code.
You have to make sure your public .htaccess is default from laravel and not deleted. Webuzo will already regenerate VirtualHost config everytimes we add new domain or subdomain web. So set document root from webuzo admin panel not change manually from apache config file.
You can make server.php file and include “../server.php”; inside that file
Don’t forget to check you .htaccess. Just use default .htaccess from laravel
so you want to make laravel for share hosting its easy
make a folder with any name in my case its root
move all data to root except public folder
now rename your public folder with public_html
your file structure should look like this
now open public_html/index.php define your bootstrap and autoload
page should look like this or you can copy all code from here
that’s it now your public_html is public for users
root file should be in back because this files should not expose to public
In Webuzo you can change the document root at: