Mysterious DocumentRoot using Apache2.2.22 on RaspberryPi (Debian Wheezy) whilst trying to setup SVN

I'm attempting to run an SVN repository over SSL using Apache2.2.22 (Apache from now on!) on a Raspberry Pi running Debian Wheezy.

I'm new to Apache and am experimenting with various configurations. What I really want to do is just have Apache serve up the SVN repository and nothing else i.e. no DocumentRoot and use SVNParentPath instead.

This may not be possible but if nothing else I want to know why after deleting all sites in the sites-enabled and sites-available directories and checking all other files in the /etc/apache2 directory and subdirectories for the term DocumentRoot the default /var/www DocumentRoot is used.

After restarting the Apache2 service when I go to

http:\\raspberrypi 

I get the It Works! page.

I also get no warning about a missing DocumentRoot when restarting Apache. I have reinstalled Apache, every time I make a change to a .conf file I restart the service and I clear the browser history as well.

This is a Debian setup so there is no httpd.conf file.

The dav_svn.conf file only contains comments.

The /etc/apache2/apache2.conf looks like this (anything that is commented out is not shown):

LockFile ${APACHE_LOCK_DIR}/accept.lock

PidFile ${APACHE_PID_FILE}

Timeout 300

KeepAlive On

MaxKeepAliveRequests 100

KeepAliveTimeout 5

<IfModule mpm_prefork_module>
    StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>


<IfModule mpm_worker_module>
    StartServers          2
    MinSpareThreads      25
    MaxSpareThreads      75 
    ThreadLimit          64
    ThreadsPerChild      25
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>


<IfModule mpm_event_module>
    StartServers          2
    MinSpareThreads      25
    MaxSpareThreads      75 
    ThreadLimit          64
    ThreadsPerChild      25
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>


User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

AccessFileName .htaccess

<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy all
</Files>

DefaultType None

HostnameLookups Off

ErrorLog ${APACHE_LOG_DIR}/error.log

LogLevel warn

Include mods-enabled/*.load
Include mods-enabled/*.conf

Include ports.conf

LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

Include conf.d/

Include sites-enabled/

The ports.conf file (with comments):

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz

NameVirtualHost *:80
Listen 80

<IfModule mod_ssl.c>
    # If you add NameVirtualHost *:443 here, you will also have to change
    # the VirtualHost statement in /etc/apache2/sites-available/default-ssl
    # to <VirtualHost *:443>
    # Server Name Indication for SSL named virtual hosts is currently not
    # supported by MSIE on Windows XP.
    Listen 443
</IfModule>

<IfModule mod_gnutls.c>
    Listen 443
</IfModule>

As mentioned there are no files in the sites-enabled or sites-available directories.

I would be very grateful if anyone can shed light on why I'm not getting a DocumentRoot error or no page when going to the

http://raspberrypi URI.

Thanks, Rich

Answers


Apache defines a default value for DocumentRoot property to use when no value is set in the configuration. As stated in the documentation, the default value is /usr/local/apache/htdocs (hardcoded), but it can be changed at compile time.

However, you're using Debian. Most Debian packages has several minor adjustments to meet their own goals and criteria. Just to cite some, in Apache 2 they include:

  • the use of separated .conf files;
  • customized default folders;
  • creation of the www-data user.

Also, if you take a deeper look into Apache 2 Debian Package source code (Wheezy specifically), you will notice the default folders of Apache 2 were changed to make it FHS compliant. This is why they are located in /var/www.

In addition, it is important to note that there is a recent commit in Apache 2 Debian Package changing the DocumentRoot to /var/www/html. You should expect this change to appear in future releases.


Apache has a default document root of /usr/local/apache/htdocs . If not specified in any config, it will use this value.


Need Your Help

need help in creating excel-vba function

function excel-vba vba excel

My problem: It works fine when I call it in a SUb. But it gives a high jump in the value of "pf" I want to give a condition that pf is always less than dpdlold...I tried different ways but nothing ...

:active pseudoclass with animations sometimes prevents postbacks in Chrome and IE

c# asp.net css css3

Has anyone else ran into this issue? I have a web forms site and I wanted to add an :active pseudo class to a link button, basically to animate it before doing some action. However, for some reason...