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
1
vote
1 answer

how to make zend webroot transparently absolute or relative?

I'm developing a Zend web application with classic file hierarchy structure, ie: application/ docs/ library/ public/ tests/ Since the app is used in different machine with different server configurations, In the view scripts I would like to have…
1
vote
0 answers

Deploy a PHP project to Azure without putting everything in the web root

I have a web site written in PHP that I am migrating to Azure. Currently I'm using Namecheap for hosting. My current set up is that I have two main folders in the project: public_html contains all the public facing HTML/PHP/etc files and resources…
zeke
  • 3,603
  • 2
  • 26
  • 41
1
vote
1 answer

Apache2 403 Forbidden in custom document root

I have searched anything on this topic in the internet and i just cannot get it to work. I am desperate.... I just want to access my index.php inside a custom document root folder but i keep getting this error The new document root that i want…
1
vote
4 answers

Single quotes reversing behaviour in PHP

I was running over a sample script and hit on this particular issue. The script starts off by setting $docroot=$_SERVER['DOCUMENT_ROOT']; For writing to a file, @$fp = fopen("$docroot/../parts/partsorders.txt",'ab'); is used. But no matter what,…
1
vote
1 answer

PHP - Document_Root vs Sub-Domains

I have the following code in my configuration file to establish the root path which is then used throughout the application: define('ROOT_PATH', $_SERVER['DOCUMENT_ROOT'].'/MyAppFolder/'); The problem is that it does not seem to work with sub…
usnidorg
  • 13
  • 3
1
vote
1 answer

Capistrano: how to remove symlink 'current' and rather use: {deploy_to} for accessing the deployed files

Hey, I am using Capistrano to deploy my PHP applications. Now, I notice a strange thing here (or maybe this is something I do not understand). Capistrano deploys application to releases folder and then, symlinks current to point to latest…
Stoic
  • 10,536
  • 6
  • 41
  • 60
1
vote
1 answer

directory and sub-directory path not working

I have the following code, The problem i am having is its only looking at the root directory and not in the sub-folders within the root directory, how can i change it so it would look into the sub-directory's as well. DirectoryInfo di = new…
1
vote
1 answer

403 Forbidden after changing DocumentRoot

So, I've tried running a domain, a sub domain and another domain on one machine. I've set up a conf file for every site: ServerName websitea.com ServerAlias www.websitea.com DocumentRoot…
Daniel M.
  • 11
  • 3
1
vote
1 answer

Requests in subdirectory of document root return 404

I've set the document root of my apache virtual host config file to laravel's public directory. I have an angular 4 app that builds into the public/dashboard-dist directory. I have added this directory as a location to search for views…
moonwalker
  • 1,157
  • 1
  • 18
  • 34
1
vote
3 answers

setting document root in Angular 5.6.0 behind Varnish proxy

My Angular 5 application will run behind a varnish proxy. Say our corporate website runs on test.corporate.com and my local computer is dev5.local, then varnish is now, for the time being, configured by system management to point…
Albert Hendriks
  • 1,979
  • 3
  • 25
  • 45
1
vote
1 answer

PHP: How to get the document root from inside a user directory?

I develop and deploy various PHP applications to different environments. Especially on development environments, they can be anywhere, from document_root to /Users/me/Sites/ or even /Users/me/Sites/someapp/ Inside these applications I need to know…
Stefan
  • 1,051
  • 3
  • 11
  • 23
1
vote
5 answers

Coldfusion Error: cannot find file /CFIDE/administrator/index.cfm

Right, I know you can google this question and get lots of answers on it, but none of them seem to work for me. I've got a brand new RHEL5 server, with the latest LAMP installation on it, and I've just installed Coldfusion 9. When I visit my site, i…
Pete
  • 4,542
  • 9
  • 43
  • 76
1
vote
1 answer

Can't change document root in MAMP Pro

I have version 3.3 of MAMP Pro. When I click the icon to change the document root for one of my virtual hosts, it shows all of the blue folders in my Finder as grayed out. There is one exception, I am able to go into Applications/MAMP/htdocs and…
PioneerMan
  • 303
  • 4
  • 12
1
vote
1 answer

Correct media_root and I recived 404 in django app

I have problem withe icons in admin panel in my Django app. I have all files in my root media folder: '/files/dev/projects/mynewproject/media' but in console I get 404 error. My urls.py urlpatterns = static(settings.STATIC_URL,…
git-e
  • 269
  • 1
  • 4
  • 15
1
vote
1 answer

in apache config, how should I use the Alias module for a directory in the document root?

Background Using Ubuntu with apache2: In my sites-enabled config I have an Alias command like so: Alias "/someDir" "/webSiteDir" It works great. So, the absolute path of /someDir is actually a "virtual directory" which effectively exists at…
Daniel
  • 133
  • 6