V
V
VitStar2019-07-11 00:34:51
Apache HTTP Server
VitStar, 2019-07-11 00:34:51

How to determine the root directory on the server?

I'm making a home development server.
Installed the Brainy panel, everything works great. Connected the domain.
I do both layout and integration with wp.
I want the layout to be just on the verstka.site.ru subdomain.
Just placing folders like verstka.site.ru/newproject/ there. Since I have a gulp project there, the html files are not at the very root, but in the site/dev/ready directory / It turns out the full path to the files verstka.site.ru/newproject/site/dev/ready/
Now I have implemented the definition of the root through .htaccess

<IfModule mod_rewrite.c>
Options +FollowSymLinks
    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_URI} !^/newproject/site/dev/ready/
    RewriteRule ^(.*)$ /newproject/site/dev/ready/$1 [L]
</IfModule>

Everything works without problems.
But I would like not to register the newproject folder every time for a new site. Is it possible to get it somehow?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2019-07-11
@shambler81

go to the apahce and nginx config generation template
find the document root there and add the link
regenerate the template

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question