<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-cite-prefix">On 09/03/2014 07:56 PM, Roger wrote:<br>
    </div>
    <blockquote cite="mid:5407AA9A.8070507@bigpond.com" type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      I'm hoping an apache expert may be able to help me.<br>
      Following tutorials on how to set up apache to access a web page
      development directory in my /home/user file system using
      &lt;VirtualHost&gt;.<br>
      <br>
      &lt;VirtualHost *:80&gt;<br>
      &nbsp;&nbsp;&nbsp; ServerAdmin user@localhost<br>
      &nbsp;&nbsp;&nbsp; DocumentRoot /var/www/html/mydirectory<br>
      &nbsp;&nbsp;&nbsp; ServerName localhost<br>
      &nbsp;&nbsp;&nbsp; ErrorLog ${APACHE_LOG_DIR}/error.log<br>
      &nbsp;&nbsp;&nbsp; CustomLog ${APACHE_LOG_DIR}/access.log combined<br>
      &lt;/VirtualHost&gt;<br>
      <br>
      I do not wish to change &lt;DirectoryRoot&gt; in httpd.conf.<br>
      <br>
      I loaded the config files (ubuntu and apple) as per web tutorials,
      reset and restarted apache. <br>
      Have the correct paths in &lt;Directory "/a/b/c"&gt; <br>
      But in a browser localhost/directory/index.html&nbsp; always reports
      error: Not Found
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      The requested URL /directory was not found on this server.<br>
    </blockquote>
    <br>
    Here is what I do:<br>
    <br>
    cat &lt;&lt;EOF&gt;/etc/httpd/conf.d/00-init.conf || exit 1<br>
    ServerAdmin me@fqdn<br>
    ServerName fqdn:80<br>
    # NameVirtualHost *:80<br>
    # NameVirtualHost *:443<br>
    EOF<br>
    <br>
    then in the main httpd.conf:<br>
    <br>
    #<br>
    # UserDir: The name of the directory that is appended onto a user's
    home<br>
    # directory if a ~user request is received.<br>
    #<br>
    # The path to the end user account 'public_html' directory must be<br>
    # accessible to the webserver userid.&nbsp; This usually means that
    ~userid<br>
    # must have permissions of 711, ~userid/public_html must have
    permissions<br>
    # of 755, and documents contained therein must be world-readable.<br>
    # Otherwise, the client will only receive a "403 Forbidden" message.<br>
    #<br>
    # See also: <a class="moz-txt-link-freetext" href="http://httpd.apache.org/docs/misc/FAQ.html#forbidden">http://httpd.apache.org/docs/misc/FAQ.html#forbidden</a><br>
    #<br>
    &lt;IfModule mod_userdir.c&gt;<br>
    &nbsp;&nbsp;&nbsp; #<br>
    &nbsp;&nbsp;&nbsp; # UserDir is disabled by default since it can confirm the
    presence<br>
    &nbsp;&nbsp;&nbsp; # of a username on the system (depending on home directory<br>
    &nbsp;&nbsp;&nbsp; # permissions).<br>
    &nbsp;&nbsp;&nbsp; #<br>
    #&nbsp;&nbsp;&nbsp; UserDir disable<br>
    <br>
    &nbsp;&nbsp;&nbsp; #<br>
    &nbsp;&nbsp;&nbsp; # To enable requests to /~user/ to serve the user's public_html<br>
    &nbsp;&nbsp;&nbsp; # directory, remove the "UserDir disable" line above, and
    uncomment<br>
    &nbsp;&nbsp;&nbsp; # the following line instead:<br>
    &nbsp;&nbsp;&nbsp; # <br>
    &nbsp;&nbsp;&nbsp; UserDir public_html<br>
    <br>
    &lt;/IfModule&gt;<br>
    <br>
    #<br>
    # Control access to UserDir directories.&nbsp; The following is an
    example<br>
    # for a site where these directories are restricted to read-only.<br>
    #<br>
    &lt;Directory /home/*/public_html&gt;<br>
    &nbsp;&nbsp;&nbsp; AllowOverride FileInfo AuthConfig Limit<br>
    &nbsp;&nbsp;&nbsp; Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec<br>
    &nbsp;&nbsp;&nbsp; &lt;Limit GET POST OPTIONS&gt;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Order allow,deny<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Allow from all<br>
    &nbsp;&nbsp;&nbsp; &lt;/Limit&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;LimitExcept GET POST OPTIONS&gt;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Order deny,allow<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Deny from all<br>
    &nbsp;&nbsp;&nbsp; &lt;/LimitExcept&gt;<br>
    &lt;/Directory&gt;<br>
    <br>
    then don't for get permissions.<br>
    <br>
    chmod 711 /home/me<br>
    <br>
    <br>
  </body>
</html>