Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

CodeIgniter and Vesta Topic is solved

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
8 posts • Page 1 of 1
PlayBoxTech
Posts: 16
Joined: Sun Dec 15, 2019 2:43 am

Os: Ubuntu 17x
Web: apache + nginx
CodeIgniter and Vesta
  • Quote

Post by PlayBoxTech » Thu Mar 05, 2020 2:28 am

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
Top

plutocrat
Posts: 232
Joined: Fri Jan 27, 2017 9:16 am

Os: Ubuntu 17x
Web: apache + nginx
Re: CodeIgniter and Vesta
  • Quote

Post by plutocrat » Thu Mar 05, 2020 4:47 am

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.
Top

PlayBoxTech
Posts: 16
Joined: Sun Dec 15, 2019 2:43 am

Os: Ubuntu 17x
Web: apache + nginx
Re: CodeIgniter and Vesta
  • Quote

Post by PlayBoxTech » Thu Mar 05, 2020 11:11 am

plutocrat wrote: ↑
Thu Mar 05, 2020 4:47 am
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.
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?

To possibly clarify I don't want to modify every url to go to public_html/public just this one.
Top

plutocrat
Posts: 232
Joined: Fri Jan 27, 2017 9:16 am

Os: Ubuntu 17x
Web: apache + nginx
Re: CodeIgniter and Vesta
  • Quote

Post by plutocrat » Fri Mar 06, 2020 3:33 am

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.
Top

PlayBoxTech
Posts: 16
Joined: Sun Dec 15, 2019 2:43 am

Os: Ubuntu 17x
Web: apache + nginx
Re: CodeIgniter and Vesta
  • Quote

Post by PlayBoxTech » Sun Mar 08, 2020 2:41 am

plutocrat wrote: ↑
Fri Mar 06, 2020 3:33 am
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.
For this site its apache only.
Top

plutocrat
Posts: 232
Joined: Fri Jan 27, 2017 9:16 am

Os: Ubuntu 17x
Web: apache + nginx
Re: CodeIgniter and Vesta
  • Quote

Post by plutocrat » Wed Mar 11, 2020 1:49 am

OK, so here's what I'd do. Go to the template dir for apache, and make copies of the default templates.

Code: Select all

cd /usr/local/vesta/data/templates/web/apache2/
cp default.stpl codeigniter.stpl
cp default.tpl codeigniter.tpl
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

Code: Select all

 DocumentRoot %docroot%
and change it to

Code: Select all

 DocumentRoot %docroot%/public/
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
Top

PlayBoxTech
Posts: 16
Joined: Sun Dec 15, 2019 2:43 am

Os: Ubuntu 17x
Web: apache + nginx
Re: CodeIgniter and Vesta
  • Quote

Post by PlayBoxTech » Thu Mar 12, 2020 10:08 am

Thanks I got it to work now.
Top

sniper69
Posts: 3
Joined: Mon Apr 09, 2018 5:55 am

Os: Ubuntu 17x
Web: apache + nginx
Re: CodeIgniter and Vesta
  • Quote

Post by sniper69 » Wed Mar 17, 2021 3:47 am

PlayBoxTech wrote: ↑
Sun Mar 08, 2020 2:41 am
plutocrat wrote: ↑
Fri Mar 06, 2020 3:33 am
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.
For this site its apache only.
I have same problem and I use apache with nginx proxy in front, please help me for this case.
Top


Post Reply
  • Print view

8 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password