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.
CodeIgniter and Vesta Topic is solved
-
- Posts: 16
- Joined: Sun Dec 15, 2019 2:43 am
- Os: Ubuntu 17x
- Web: apache + nginx
CodeIgniter and Vesta
Hi all,
Using CodeIgniter 4, they recommend that the web server is configured to automatically go to folder/public/ as the default. ie: /home/chris/web/ci.audiodrama.stream/public_html/public
Is this possible with Vesta? If so how?
Thanks!
Chris
Using CodeIgniter 4, they recommend that the web server is configured to automatically go to folder/public/ as the default. ie: /home/chris/web/ci.audiodrama.stream/public_html/public
Is this possible with Vesta? If so how?
Thanks!
Chris
Re: CodeIgniter and Vesta
Briefly
- Create a new template with the new web root directory. (copy an existing one and rename it).
- Put it into /usr/local/vesta/data/templates/web/apache and/or /usr/local/vesta/data/templates/web/nginx
depending on which web server setup you're using.
- Select it from the vesta web interface for that web domain.
- Create a new template with the new web root directory. (copy an existing one and rename it).
- Put it into /usr/local/vesta/data/templates/web/apache and/or /usr/local/vesta/data/templates/web/nginx
depending on which web server setup you're using.
- Select it from the vesta web interface for that web domain.
-
- Posts: 16
- Joined: Sun Dec 15, 2019 2:43 am
- Os: Ubuntu 17x
- Web: apache + nginx
Re: CodeIgniter and Vesta
So I copied the directory apache2 to codeigniter and modified both basedir.tpl and basedir.stpl refreshed the page in Vesta and it doesn't show the new template. Is there something I have to do, to get Vesta to see the new template?plutocrat wrote: ↑Thu Mar 05, 2020 4:47 amBriefly
- Create a new template with the new web root directory. (copy an existing one and rename it).
- Put it into /usr/local/vesta/data/templates/web/apache and/or /usr/local/vesta/data/templates/web/nginx
depending on which web server setup you're using.
- Select it from the vesta web interface for that web domain.
To possibly clarify I don't want to modify every url to go to public_html/public just this one.
Re: CodeIgniter and Vesta
OK, so back to basics. What is your webserver setup? Are you using apache, nginx or apache with nginx proxy in front? I can't give specific instructions until I know that information.
-
- Posts: 16
- Joined: Sun Dec 15, 2019 2:43 am
- Os: Ubuntu 17x
- Web: apache + nginx
Re: CodeIgniter and Vesta
OK, so here's what I'd do. Go to the template dir for apache, and make copies of the default templates.
Now edit those templates so that the path is updated to the one codeigniter uses. You can use nano or another editor of your choice.
In both codeigniter templates find the line that says
and change it to
Save the files. Go to the vesta web interface, domains, and select your new codeigniter template for the domains you need.
You may need to make other codeigniter changes in those templates, eg open basedir settings, php settings. If you make further changes, you'll need to force vesta to regenerate the configs in /home/user/conf/web/, so you'd either select the default template, save, then re-select codeigniter template, save. Or you could use v-update-web-templates
Code: Select all
cd /usr/local/vesta/data/templates/web/apache2/
cp default.stpl codeigniter.stpl
cp default.tpl codeigniter.tpl
In both codeigniter templates find the line that says
Code: Select all
DocumentRoot %docroot%
Code: Select all
DocumentRoot %docroot%/public/
You may need to make other codeigniter changes in those templates, eg open basedir settings, php settings. If you make further changes, you'll need to force vesta to regenerate the configs in /home/user/conf/web/, so you'd either select the default template, save, then re-select codeigniter template, save. Or you could use v-update-web-templates
-
- Posts: 16
- Joined: Sun Dec 15, 2019 2:43 am
- Os: Ubuntu 17x
- Web: apache + nginx
Re: CodeIgniter and Vesta
Thanks I got it to work now.
Re: CodeIgniter and Vesta
I have same problem and I use apache with nginx proxy in front, please help me for this case.