This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

change web root
#1
change web root
how change web root of a domain
from
sentora/hostdata/[user]/public_html/[domain]/
to
sentora/hostdata/[user]/public_html/[domain]/www
Huh Huh

this solution seem not to work for me as i'm able to choose subfolder
http://forums.sentora.org/showthread.php...5&pid=9581
Reply
Thanks given by:
#2
RE: change web root
Hello tecx20,
The solution you provided is the easy way and if you read it carefully it will work (100% sure of this);

However it all depends on what you need to do, is it to install a framework like Laravel that will have php scripts outsidee the www folder?
If yes, then you need a different approach.

  1. Add the Domain the normal way, so it creates a DOMAIN_TLD folder.
  2. Wait 5 minutes for the Daemon to Run.
  3. Go to Admin > Module Admin (on Sentora CP).
  4. Select Apache Config (it's the very first option).
  5. Scroll Down to the end of the page and under the Override a Virtual Host Setting choose the website you want.
  6. Now on the text area input: Custom Entry you need to enter the following  :
    Code:
    DocumentRoot "/var/sentora/hostdata/ACCOUNT/public_html/DOMAIN_TLD/www"
  7. (do not forget to click Save when you are done)

With this way you will be able to have a different openbase_dir than your DocumentRoot, allowing you to access the files under public_html and www via your php scripts (this is NEEDED by almost all modern frameworks TGates Me.B Wink )
My Sentora Resources
[Module] Mail Quota Count | Vagrant Box with Sentora

[Image: vanguardly-logo-micro.png]
Graphic and Web Design. Development.
www.vanguardly.com


Reply
Thanks given by:
#3
RE: change web root
thanks that works for i'm using yii framework here.
One more question where to edit php.ini without using putty
Reply
Thanks given by:
#4
RE: change web root
.htacces can translate paths in the easy way and do the magic, so you map / to www/.

Don't like using override for this change and think we should remove such feature from sentora panel ( once we provide SSL support).

M B
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Reply
Thanks given by:
#5
RE: change web root
(05-18-2015, 06:57 PM)Me.B Wrote: .htacces can translate paths in the easy way and do the magic, so you map / to www/.

Don't like using override for this change and think we should remove such feature from sentora panel ( once we provide SSL support).

M B

I do agree that the overwrite might not be the best solution, however I think .htaccess is not a clean way to do it.
Source 1: https://coderwall.com/p/erbaig/laravel-s...c-from-url
Source 2: My experience as a web developer.

The better solution would be to add a way to change/edit the document root for every domain, this should be standard
My Sentora Resources
[Module] Mail Quota Count | Vagrant Box with Sentora

[Image: vanguardly-logo-micro.png]
Graphic and Web Design. Development.
www.vanguardly.com


Reply
Thanks given by:
#6
RE: change web root
(05-18-2015, 06:53 PM)tecx20 Wrote: thanks that works for i'm using yii framework here.
One more question where to edit php.ini without using putty

tecx20 you can't edit php.ini without using SSH.

Give a try at http://winscp.net/ as it lets you browse the filesystem with a GUI, also you can edit files using oyur local text editor (for example Sublime Text or NotePad++).
My Sentora Resources
[Module] Mail Quota Count | Vagrant Box with Sentora

[Image: vanguardly-logo-micro.png]
Graphic and Web Design. Development.
www.vanguardly.com


Reply
Thanks given by:
#7
RE: change web root
okay then will go with winscp for now.
thanks for the fast reply
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
change username from email umarzuki@gmail.com 0 1 ,636 11-25-2022, 05:46 PM
Last Post: umarzuki@gmail.com
Database - Change localhost to %localhost% JSmith 1 5 ,058 09-11-2019, 09:19 AM
Last Post: TGates
Change default language diogorocha18 7 18 ,002 11-16-2018, 12:33 AM
Last Post: nibaldo

Forum Jump:


Users browsing this thread: 1 Guest(s)