Questions tagged [documentroot]
95 questions
16
votes
8 answers
How to disable the default document root in Apache?
I host some websites on my server running Apache Httpd. Each website has it's own domain or sub-domain and virtual host. Therefore, I need no default document root. Is it possible to disable DocumentRoot in /etc/httpd/conf/httpd.conf?
danijar
- 393
- 2
- 3
- 14
15
votes
2 answers
Best permissions/ownership for apache document root
I need some help setting the correct permissions or ownership of the apache document root. Here is what I need:
different websites stored in /var/www/html/
two users should update/manage the websites through ssh
ownership should be different…
Marco
- 153
- 1
- 1
- 4
11
votes
2 answers
How do I change the document root of a Linux Apache server?
I'm trying to learn how to configure an Apache HTTP server (with which I have no experience) someone else has setup in a VM running Ubuntu 8.04.
I know the server is running, since I get "
It works!
" when I go to…
Daryl Spitzer
- 2,946
- 9
- 33
- 40
10
votes
6 answers
Inconsistent trailing slash in DOCUMENT_ROOT variable in PHP when using Apache
In different server environments, the PHP $_SERVER['DOCUMENT_ROOT'] super global sometimes has a trailing slash and sometimes it does not. I would have thought this issue is directly related to how the Apache DocumentRoot is defined in the…
Tom
- 4,157
- 11
- 41
- 52
6
votes
4 answers
Security of Apache DocumentRoot
I have a general question about security of Apache DocumentRoot, which comes from a statement I read when installing Galaxy, a bioinformatic web service and infrastructure. The statement says
"Please note that Galaxy should never be located on disk…
user2196452
- 245
- 1
- 3
- 9
6
votes
6 answers
Why am I getting this error in the logs?
Ok so I just started a new ubuntu server 11.10 and i added the vhost and all seems ok ...I also restarted apache but when i visit the browser i get a blank page
the server ip is http://23.21.197.126/ but when i tail the log
tail -f…
Matt Elhotiby
- 879
- 3
- 10
- 22
6
votes
2 answers
Apache: Client-IP-based DocumentRoot
I don't know if this could be possible on apache yet, I've done hefty amount of research before coming here. but:
I have a VirtualHost running at **:80*, ServerName to somedomain.tld. What I want to achieve is if client 10.2.1.4 accesses…
Seth Jeremi Malaki
- 188
- 1
- 7
5
votes
3 answers
Apache - Difference between VirtualDocumentRoot and DocumentRoot?
I found it very difficult to find this answer, after an hour (yes, an hour) of googling and browsing through several posts on stackexchange and several other forums... even through Apache's Documentation!
I could not for the life of me find what the…
Jay
- 191
- 1
- 2
- 9
5
votes
2 answers
What is the proper way to set up the Apache document root in terms of privileges?
I have just installed Ubuntu 9.10 server edition on my machine and I wish to run my own personal local server with other users in the same LAN.
First, I was wondering what folder directory structure is best for the web root?
Should I just…
user41157
- 189
- 2
- 9
4
votes
1 answer
Apache doesn't start: syntax error....DocumentRoot must be a directory
I read all the previous answer but I couldn't fix my problem.. I'm changing the server where my website is hosted and I'm setting again apache.. Now, after installing php, fail2ban, etc i have that issue:
service httpd start
Avvio di httpd: Syntax…
Akylle
- 41
- 1
- 1
- 5
4
votes
2 answers
Apache equivalent of IIS application roots
Someone just set up a directory for me on an Apache server where I will put my PHP application. This directory has an external path of 192.168.1.5/app and points to /home/test/app.
My application references its files by means of URLs like…
Maxim Zaslavsky
- 211
- 1
- 4
- 13
4
votes
1 answer
Apache wildcard documentroot
I would like to use the the subdomain as my DocumentRoot folder
foo.example.com
Goes to
/var/www/foo
However I do not want to add a new entry for every subdomain
Basically
*.example.com
Goes to
/var/www/*
Where * is any alphanum string
Botto
- 231
- 1
- 9
3
votes
3 answers
Lighttpd static file server 403 forbidden error
I installed lighttpd on Debian Jessie for serving static files, I have a USB drive mounted at /media/storage, with /media/storage/www as my document root and my lighttpd.conf looks like this:
server.modules = (
"mod_access",
"mod_alias",
…
Superpelican
- 43
- 1
- 1
- 3
3
votes
2 answers
Symbolic Link & LAMPP htdocs
I went through these steps in order to make a symlink directory to use outside of lampp htdocs.
$ mkdir test
$ chmod 777 test
//test is now in /home/Dropbox/test/
//I put an index.html with 777 perms in it.
$ cd /opt/lampp/htdocs/
$ sudo ln -s…
user1062058
- 495
- 2
- 9
- 17
3
votes
1 answer
Is it possible to serve different DocumentRoot from Virtual Host in Apache conf depending on IP of the visitor?
I just wonder if it's possible to define several DocumentRoots for single VirtualHost in httpd.conf and serve them out depending on IP of the visitor?
jayarjo
- 337
- 1
- 3
- 12