[Discuss] apache server

dan moylan jdm at moylan.us
Tue Dec 9 22:59:58 EST 2014


derek martin writes:
> Most likely explanation is that your home directory, or a path
> component in it, is not readable by the user as which the server runs.

moylan ~[1045] ls -ld /home/moylan
drwxr-xr-x. 79 moylan moylan 4096 141209:1347 /home/moylan/
moylan ~[1046] ls -ld /home/moylan/www
drwxr-xr-x. 28 moylan moylan 4096 141209:1421 /home/moylan/www/
moylan ~[1047] ls -ld /home/moylan/www/lnk
drwxr-xr-x. 2 moylan moylan 4096 141209:1452 /home/moylan/www/lnk/
moylan ~[1048] ls -l  /home/moylan/www/lnk/off.htm
-rw-r--r--. 1 moylan moylan 451 141209:1417 /home/moylan/www/lnk/off.htm

seems to me it's just not following the symbolic links.  however,
httpd.conf has in it:

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
  DocumentRoot "/var/www/"

# Relax access to content within /var/www.
  <Directory "/var/www">
       AllowOverride None
       Options Indexes FollowSymLinks
       Require all granted
  </Directory>

greg rundlett writes:
> Apache also has a module (mod_userdir) and related directives for serving
> content from user home directories.  See
> http://httpd.apache.org/docs/current/howto/public_html.html

> If you remove the symbolic link 'moylan' and specify (in httpd.conf, or
> conf.d/mysite.conf)
> UserDir www

did this.

> Then
> sudo a2enmod userdir

root conf[649] yum list a2enmod
Loaded plugins: langpacks, refresh-packagekit
Error: No matching Packages to list

john abreau writes:
> Also check selinux.
> Become root. Although you could do this with sudo, it's more of a pain.
> You must ensure the auditd service is installed and started.
> yum -y install auditd policycoreutils-python
> service auditd start

root conf[651] yum -y install auditd policycoreutils-python
Loaded plugins: langpacks, refresh-packagekit
updates/20/x86_64/metalink                                   |  18 kB  00:00:00
updates                                                      | 4.9 kB  00:00:00
updates/20/x86_64/primary_db                                 |  12 MB  00:00:09
(1/2): updates/20/x86_64/pkgtags                             | 1.3 MB  00:00:00
(2/2): updates/20/x86_64/updateinfo                          | 1.7 MB  00:00:03
No package auditd available.
Package policycoreutils-python-2.2.5-4.fc20.x86_64 already installed and latest version
Nothing to do

greg rundlett writes:
> It's easier to just turn on the appropriate boolean:
> (as root):
> setsebool -P httpd_enable_homedirs on

this just hangs until finally i see "Killed".

tried it again using:
setsebool -P httpd_enable_homedirs 1

and though it took many seconds, it finally returned a prompt.

still no better.

richard pieri writes:
> An excerpt from your Apache error log that would indicate
> the reason for the behavior that you are seeing. Plenty of
> excellent suggestions have been made for correcting various
> possible problems but you should check the logs so that you
> can identify and correct the problem that you actually have.

matt gillen writes:
> Don't take medicine until you know what you're treating - If
> selinux blocking access to homedirs is the problem, then
> Matt's setsebool above will be good for you.  But you should
> probably do the stuff below first, to positively diagnose if
> that's the problem.

error_log:
  Tue Dec 09 22:30:55.286962 2014] [core:error] [pid 1990]
  [client 192.168.1.100:35495] AH00037: Symbolic link not
  allowed or link target not accessible: /var/www/off-lnk.htm

root www[804] ls -l off-lnk.htm
lrwxrwxrwx. 1 root root 28 141209:2152 off-lnk.htm ->
/home/moylan/www/lnk/off.htm

vi /var/www/off-lnk.htm shows it.

httpd.conf
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
  DocumentRoot "/var/www/"

# Relax access to content within /var/www.
  <Directory "/var/www">
       AllowOverride None
       Options Indexes FollowSymLinks
       Require all granted
  </Directory>

i seem to be going around in circles.

ole dan

j. daniel moylan
84 harvard ave
brookline, ma 02446-6202
617-777-0207 (cel)
jdm at moylan.us
www.moylan.us
[avoid html waste.]



More information about the Discuss mailing list