We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Laravel in folder
Laravel in folder
I have laravel in a folder and I keep getting the 403 forbidden error. To access the site I have to go to mysite.com/laravel/public. I want it to work as mysite.com/laravel
Is this possible? If so can someone tell me the best way how please.
Thanks in advance.
Is this possible? If so can someone tell me the best way how please.
Thanks in advance.
Re: Laravel in folder
Try to look at topics
viewtopic.php?f=41&t=12158#p49617
and
app.php/googlesearch?cx=009448527883586 ... itesearch=
viewtopic.php?f=41&t=12158#p49617
and
app.php/googlesearch?cx=009448527883586 ... itesearch=
Re: Laravel in folder
My main page is loading correctly at mysite.com/folder & the login auth works but it redirects me to mysite.com. if i manually navigate to mysite.com/folder it is logged in correctly but all of the routes are messed up.
mysite.com/folder/page gives me a 500 internal server error and mysite.com/page is working
mysite.com/folder/page gives me a 500 internal server error and mysite.com/page is working
-
- Posts: 16
- Joined: Wed Jun 24, 2015 8:13 am
Re: Laravel in folder
You can create a new Apache/Web template, call it Laravel, that has the correct configuration for a Laravel app.
So the document root would have to point to the /public folder in your Laravel app.
Here's my web template for Laravel apps (/usr/local/vesta/data/templates/web/apache2):
The template could be done in another way, but I found it easiest to just leave the public_html folder and put my Laravel app inside.
Then, when you have created the domain for the Laravel app in Vesta, you can change the Web Template to Laravel, and the conf files will, all by it self, match your Laravel config template.
So the document root would have to point to the /public folder in your Laravel app.
Here's my web template for Laravel apps (/usr/local/vesta/data/templates/web/apache2):
Code: Select all
<VirtualHost %ip%:%web_port%>
ServerName %domain_idn%
%alias_string%
ServerAdmin %email%
DocumentRoot %docroot%/public
ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
Alias /vstats/ %home%/%user%/web/%domain%/stats/
Alias /error/ %home%/%user%/web/%domain%/document_errors/
#SuexecUserGroup %user% %group%
CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
CustomLog /var/log/%web_system%/domains/%domain%.log combined
ErrorLog /var/log/%web_system%/domains/%domain%.error.log
<Directory %docroot%>
AllowOverride All
Options +Includes -Indexes +ExecCGI
php_admin_value open_basedir %docroot%:%home%/%user%/tmp
php_admin_value upload_tmp_dir %home%/%user%/tmp
php_admin_value session.save_path %home%/%user%/tmp
</Directory>
<Directory %home%/%user%/web/%domain%/stats>
AllowOverride All
</Directory>
<IfModule mod_ruid2.c>
RMode config
RUidGid %user% %group%
RGroups www-data
</IfModule>
<IfModule itk.c>
AssignUserID %user% %group%
</IfModule>
IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
</VirtualHost>
Then, when you have created the domain for the Laravel app in Vesta, you can change the Web Template to Laravel, and the conf files will, all by it self, match your Laravel config template.