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.

Document root in public dir
#8
RE: Document root in public dir
(08-05-2015, 10:30 PM)kandrews Wrote: Ah ok well something like this might work:

Module Admin -> Apache Config -> Override Vhost -> Custom Entry

Code:
   <Directory "/var/zpanel/hostdata/username/public_html/panel.domain.com/">
       RewriteEngine on
       RewriteBase /
       RewriteRule ^(.*)$ ./public/$1 [L]

   </Directory>

   <Directory "/var/zpanel/hostdata/username/public_html/panel.domain.com/public/">
       RewriteEngine On
       RewriteCond %{REQUEST_FILENAME} -s [OR]
       RewriteCond %{REQUEST_FILENAME} -l [OR]
       RewriteCond %{REQUEST_FILENAME} -d
       RewriteRule ^.*$ - [NC,L]
       RewriteRule ^.*$ index.php [NC,L]
   </Directory>

That worked flawlessly, thank you!

Edit: Just had to remove the ending slash on the directory.

One more thing, do you think it is possible to override the default DocumentRoot? Instead of redirecting...
Reply
Thanks given by:


Messages In This Thread
Document root in public dir - by Swift-R - 08-05-2015, 11:14 AM
RE: Document root in public dir - by kandrews - 08-05-2015, 09:38 PM
RE: Document root in public dir - by kandrews - 08-05-2015, 09:41 PM
RE: Document root in public dir - by Swift-R - 08-05-2015, 09:59 PM
RE: Document root in public dir - by kandrews - 08-05-2015, 10:04 PM
RE: Document root in public dir - by Swift-R - 08-05-2015, 10:08 PM
RE: Document root in public dir - by kandrews - 08-05-2015, 10:30 PM
RE: Document root in public dir - by Swift-R - 08-05-2015, 11:35 PM
RE: Document root in public dir - by kandrews - 08-05-2015, 11:58 PM
RE: Document root in public dir - by Swift-R - 08-06-2015, 03:29 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
root limits sentora thanhlan2103 0 3 ,248 11-02-2018, 06:11 PM
Last Post: thanhlan2103
sentora root limits mohamadcom 4 10 ,956 01-25-2018, 08:21 AM
Last Post: TGates
ROOT Login CMs222 6 13 ,688 01-25-2018, 07:50 AM
Last Post: TGates

Forum Jump:


Users browsing this thread: 4 Guest(s)