A
A
Alexey2014-07-20 00:30:22
Apache HTTP Server
Alexey, 2014-07-20 00:30:22

How to limit visibility to not above DocumentRoot ?

Good day.
There is a server on win. On it apache24 (Path: C:/Server/Apache24)
DocumentRoot "C:/Server/web/"

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "C:/Server/web/192.168.1.111/"
    ServerName 192.168.1.111:80
    ErrorLog "C:/Server/web/logs/assada-error.log"
    CustomLog "C:/Server/web/logs/assada-access.log" common
  <Directory C:/Server/web/192.168.1.111>
    Options Includes Indexes FollowSymLinks
    AllowOverride All
    Allow from all
  </Directory>
</VirtualHost>

With such configurations, include files up to the root of the disk:
<? include('../../../index.php');
How would you restrict apache (or php ...) so as not to let it go above your DocumentRoot?
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor, 2014-07-20
@Assada

You need to use open-basedir :
ru.php.net/manual/ru/ini.core.php#ini.open-basedir
also read this:
habrahabr.ru/post/51485

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question