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

Document root for specific package

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
5 posts • Page 1 of 1
stefanfr
Posts: 2
Joined: Thu Sep 28, 2017 6:40 pm

Document root for specific package
  • Quote

Post by stefanfr » Thu Sep 28, 2017 7:22 pm

Hello,

I'm new here so I'm hoping I've placed this thread on the right place.

I'm trying to setup a hosting for Symfony and Laravel framework and also Angular.
Everything is set up right except for the document root of those different frameworks and types of public folders.
I'm using deployer to deploy all the project so the public_html is in that part the same:
- releases -> symlink to current
- current
- shared -> symlink to current

Now the problem is that symfony uses current/web as public dir, laravel current/public and angular just uses current

My question is if it is possible to create httpd and shttpd templates for each package?
I've found the global templates but that's for every package available.

I hope someone can help me or tell me it's not possible.
I'm sorry if this question is already been asked.
But I don't think it is, at least I couldn't find it.
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Document root for specific package
  • Quote

Post by mehargags » Fri Sep 29, 2017 7:12 am

For these frameworks (incl. CakePHP) I unusually need to tweak your htaccess, or put the webroot in parallel to public_html so that the framework can load the webroot correctly.

Alternatively if you you are comfortable, you may change your virtual server block to change webroot and then apply chown to setup permissions on that directory.

Are you using Apache + Nginx or Nginx + PHP-FPM ?

a few references: https://www.google.com/search?q=vestacp+laravel
Top

stefanfr
Posts: 2
Joined: Thu Sep 28, 2017 6:40 pm

Re: Document root for specific package
  • Quote

Post by stefanfr » Fri Sep 29, 2017 11:53 am

Thanks but thats not an option for me.
But I've already found out that it's easy to do.

in /usr/local/vesta/data/templates/web/httpd/ copy default.tpl and default.stpl
And add /path/to/root after %docroot% and %sdocroot%

Easy, simple and no htaccess needed
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Document root for specific package
  • Quote

Post by mehargags » Fri Sep 29, 2017 7:43 pm

Yes so that is the option 2 I mentioned, where you change your webroot for the Server block... just that using template it makes it easier to host other Laravel sites easily without tempering server block. Good way you chose!!
Top

ardaucpinar
Posts: 1
Joined: Wed Feb 27, 2019 10:22 am

Os: CentOS 6x
Web: apache + nginx
Re: Document root for specific package
  • Quote

Post by ardaucpinar » Wed Apr 10, 2019 4:47 pm

stefanfr wrote: ↑
Fri Sep 29, 2017 11:53 am
Thanks but thats not an option for me.
But I've already found out that it's easy to do.

in /usr/local/vesta/data/templates/web/httpd/ copy default.tpl and default.stpl
And add /path/to/root after %docroot% and %sdocroot%

Easy, simple and no htaccess needed
Man! You saved my life!!!! (on symfony)

But my subdirectory pages still not working...
Top


Post Reply
  • Print view

5 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