Questions tagged [document-root]

The document root directory under which the current script is executing, as defined in the server's configuration file.

341 questions
2
votes
5 answers

PHP XAMPP Server DOCUMENT_ROOT folder structure

So this is my first time creating a test site with xampp. I originally had all my php files in one folder and just recently decided to organize the data (yes, hindsight i should've started with an organized folder structure.) Anyways, I have my…
bagofmilk
  • 1,492
  • 8
  • 34
  • 69
2
votes
1 answer

Htaccess rewrite rule out of root

I am trying to do a special rewrite rule. Suppose ROOT as my hosting root. I have domain.tld set as root on ROOT/folder When I try this from a script running on the domain.tld root (which is folder): RewriteRule sth/?$ ../file.php It doesn't work,…
Álvaro N. Franz
  • 1,188
  • 3
  • 17
  • 39
2
votes
0 answers

How to configure DocumentRoot to use with Laravel 4?

I have an apache local server (installed through BitNami) and I want to configure the DocumentRoot so that I can access to my Laravel app when I go to localhost instead of the BitNami default page. Here is my httpd.conf (included also the settings…
Apprentice
  • 681
  • 6
  • 9
2
votes
0 answers

Zend Server resets to defaults on Zend Studio 10 startup

I' m running Zend Server 6.0.1 and Zend Studio 10 on Mac OS X Mountain Lion. Because Zend Servers Apache listens to port 10088 by default on Mac OS, I changed that in Apache configuration file to port 80. Additionally I changed document root to…
Sebastian Schmidt
  • 1,078
  • 7
  • 17
2
votes
1 answer

Is there a security difference between storing files outside of the DocumentRoot versus "deny from all" htaccess directives?

Knowing that a deny from all directive will traverse all sub-directories and files below it, and ignoring the obvious caveats of "if you forget" to copy the .htaccess file or if you typo creating an .htaccess file... Is there a risk in security…
Michael Irigoyen
  • 22,513
  • 17
  • 89
  • 131
2
votes
0 answers

Include a php file on a server with open_basedir restriction in effect

i am building a website on 000webhost.com trying to include a php file using but the server says Warning: include() [function.include]: Failed opening '/main/meta.php' for inclusion…
2
votes
1 answer

Apache DocumentRoot to a Network Directory for Virtual Host

NameVirtualHost *:80 ServerName tmp DocumentRoot "//192.168.1.25/www/" Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all This configuration is not working,…
Wasim A.
  • 9,660
  • 22
  • 90
  • 120
2
votes
1 answer

How to create Apache Virtual host?

Im using Windows 7, and there I installed apache server in c:\wamp\apache\, PHP is located in c:\wamp\php\, and loaded as module. So lets say I'm building test project and I only have index.php in that project. Folder of that project will be located…
otporan
  • 1,345
  • 2
  • 12
  • 29
2
votes
3 answers

Get directory of website on the filesystem using PHP

I have a website in my local computer. I am using wamp server to run my website. URL for website is http://localhost/mywebsite/ I put a PHP file in my website inside folder mywebsite/component/add/files/add.php So the actual path of file is…
Jinal Dabhi
  • 181
  • 1
  • 2
  • 13
2
votes
2 answers

specifying simplepie cache location?

Ehrm. I know this seems simple (as pie, har har), but I keep getting a Warning: /cache/ is not writeable. Make sure you've set the correct relative or absolute path, and that the location is server-writable. Here is my situation. I have…
PaulHanak
  • 729
  • 2
  • 9
  • 21
2
votes
2 answers

Select name of root element with XPath in PostgreSQL

I've got a bunch of XML messages in a PostgreSQL 9.1.3 table, with a column content of type XML). They're not all the same "type", so I'm trying to extract the root type using a query like this: SELECT xpath('name(/*)', content) FROM message; as…
Edmund
  • 10,533
  • 3
  • 39
  • 57
2
votes
2 answers

server variable document root is not playing nice with file_exists when virtual folder is involved

I've got a virtual folder on IIS. When I do a server document root, I'm not getting file_exists find the files. But interestingly, if I use include (or require directives for that matter) same files being found. example $full_path =…
Average Joe
  • 4,521
  • 9
  • 53
  • 81
1
vote
2 answers

Is it prefered to use $_SERVER['DOCUMENT_ROOT'] in the website?

Do you think it is preferred to use $_SERVER['DOCUMENT_ROOT'] in website's include statements? Is it supported everywhere without any problem?
user1149501
1
vote
1 answer

Rewrite rules for lighttpd with new document-root would not work

I have server.document-root = "/srv/www" but for some static files I want use another document-root. I try use this code: $HTTP["url"] =~ "^/hg/static" { url.rewrite-once = ("^/hg/static" => "/") server.document-root =…
gavenkoa
  • 45,285
  • 19
  • 251
  • 303
1
vote
0 answers

Does each apache process load all DocumentRoot's for all virtual hosts?

we are trying to diagnose a performance issue. We have an Apache2 server with many virtual hosts, each one running a CMS such as Drupal or Joomla. Each apache process seems to consume a large amount of memory. Is there any way to see what it's…
cambo
  • 973
  • 4
  • 11
  • 22