<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
<VirtualHost>.<br>
<br>
<VirtualHost *:80><br>
ServerAdmin user@localhost<br>
DocumentRoot /var/www/html/mydirectory<br>
ServerName localhost<br>
ErrorLog ${APACHE_LOG_DIR}/error.log<br>
CustomLog ${APACHE_LOG_DIR}/access.log combined<br>
</VirtualHost><br>
<br>
I do not wish to change <DirectoryRoot> 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 <Directory "/a/b/c"> <br>
But in a browser localhost/directory/index.html 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 <<EOF>/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. 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>
<IfModule mod_userdir.c><br>
#<br>
# UserDir is disabled by default since it can confirm the
presence<br>
# of a username on the system (depending on home directory<br>
# permissions).<br>
#<br>
# UserDir disable<br>
<br>
#<br>
# To enable requests to /~user/ to serve the user's public_html<br>
# directory, remove the "UserDir disable" line above, and
uncomment<br>
# the following line instead:<br>
# <br>
UserDir public_html<br>
<br>
</IfModule><br>
<br>
#<br>
# Control access to UserDir directories. The following is an
example<br>
# for a site where these directories are restricted to read-only.<br>
#<br>
<Directory /home/*/public_html><br>
AllowOverride FileInfo AuthConfig Limit<br>
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec<br>
<Limit GET POST OPTIONS><br>
Order allow,deny<br>
Allow from all<br>
</Limit><br>
<LimitExcept GET POST OPTIONS><br>
Order deny,allow<br>
Deny from all<br>
</LimitExcept><br>
</Directory><br>
<br>
then don't for get permissions.<br>
<br>
chmod 711 /home/me<br>
<br>
<br>
</body>
</html>