Find the answer to your Linux question:
Results 1 to 5 of 5
Hey all, I'd like to share my html docs to any computer on my LAN. On CentOS server documentation is located in /usr/share/doc/. I added an alias to the default ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2006
    Location
    Des Moines, IA
    Posts
    10

    Share the html docs directory to the LAN


    Hey all,

    I'd like to share my html docs to any computer on my LAN. On CentOS server documentation is located in /usr/share/doc/. I added an alias to the default httpd.conf file and turned on the service get this done:
    Code:
    alias   /docs   /usr/share/doc/
    <Directory /usr/share/doc/>
            Order      deny,allow
            Deny       from all
            Options    +Indexes
            Allow from 10.0.0.0/24 127.0.0.1
    </Directory>
    If I were then to navigate to docs alias on the server via internal URL: the contents of /usr/share/doc/ on that server is displayed:
    Index of /docs
    [ICO] Name Last modified Size Description
    [DIR] Parent Directory -
    [DIR] GConf2-2.14.0/ 23-Jun-2010 13:12 -
    [DIR] HTML/ 28-Sep-2009 18:29 -
    [DIR] MAKEDEV-3.23/ 23-Jun-2010 13:11 -
    [DIR] ORBit2-2.14.3/ 23-Jun-2010 13:10 -
    [DIR] SysVinit-2.86/ 23-Jun-2010 13:12 -
    [DIR] alsa-lib-1.0.17/ 23-Jun-2010 13:11 -
    ...

    But, when I click on some links for example the postfix-2.3.3 link it displays an empty directory
    It's blank:
    Index of /docs/postfix-2.3.3
    [ICO] Name Last modified Size Description
    [DIR] Parent Directory -

    Listing the same directory on the file system looks like this:
    ll /usr/share/doc/postfix-2.3.3/*
    -rw-r--r-- 1 root root 19725 Aug 14 2008 /usr/share/doc/postfix-2.3.3/README-Postfix-SASL-RedHat.txt

    /usr/share/doc/postfix-2.3.3/README_FILES:
    total 960
    -rw-r--r-- 1 root root 2771 Aug 14 2008 AAAREADME
    -rw-r--r-- 1 root root 9405 Aug 14 2008 ADDRESS_CLASS_README
    -rw-r--r-- 1 root root 43724 Aug 14 2008 ADDRESS_REWRITING_README
    -rw-r--r-- 1 root root 17186 Aug 14 2008 ADDRESS_VERIFICATION_README
    -rw-r--r-- 1 root root 9141 Aug 14 2008 BACKSCATTER_README
    ...

    To fix this I found references to the .htaccess file on the net. I put one in the root of /usr/share/doc directory that looks like this:
    Code:
    <Directory /usr/share/doc>
            Options Indexes FollowSymLinks
            Allow from 10.0.0.0/24
            Allow from 127.0.0.0/8
    </Directory>
    It's still not working for me. Some directories are still displaying blank pages. Some appear to be listing all of the right stuff. I'm ok with everything else but still haven't focused on Apache yet. If someone could shed some light on me it would be helpful.

    Thanks, TT

  2. #2
    Linux Enthusiast scathefire's Avatar
    Join Date
    Jan 2010
    Location
    Western Kentucky
    Posts
    626
    if i were you, i'd check the following:

    - look in your logs. /var/log/httpd/error.log and/or/maybe /var/log/httpd/access.log may shed some light on the issue.

    - you may also want to see if perhaps selinux is running on your system
    Code:
    sestatus
    if its running, try turning it off and see if that fixes the issue using:
    Code:
    setenforce permissive
    linux user # 503963

  3. #3
    Just Joined!
    Join Date
    Dec 2006
    Location
    Des Moines, IA
    Posts
    10

    Tails from the Logs

    scathefire, sorry I didn't get a notification about your reply. The answer is no, selinux is turned off on this particular box.


    Code:
    Navigating to:
    docs/postfix-2.3.3/
    looks like this:
    $ tail -f /var/log/httpd/access_log
    10.0.0.100 - - [21/Jul/2010:13:49:33 -0500] "GET /icons/back.gif HTTP/1.1" 304 - "docs/postfix-2.3.3/" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.4) Gecko/20100622 Fedora/3.6.4-1.fc13 Firefox/3.6.4"
    
    Again, I can't see the links but I can locate them on the filesystem, navigating to:
    docs/postfix-2.3.3/README_FILES/AAAREADME
    looks like this:
    10.0.0.100 - - [21/Jul/2010:13:51:20 -0500] "GET /docs/postfix-2.3.3/README_FILES/AAAREADME HTTP/1.1" 200 2771 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.4) Gecko/20100622 Fedora/3.6.4-1.fc13 Firefox/3.6.4"
    It all looks fairly self-explanatory.

    Code:
    Navigating to:
    docs/postfix-2.3.3/
    looks like this:
    $ tail -f /var/log/httpd/error_log 
    [Wed Jul 21 13:32:52 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
    [Wed Jul 21 13:32:52 2010] [notice] Digest: generating secret for digest authentication ...
    [Wed Jul 21 13:32:52 2010] [notice] Digest: done
    [Wed Jul 21 13:32:52 2010] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
    Nothing really suspicious though

    TT

  4. #4
    Linux Enthusiast scathefire's Avatar
    Join Date
    Jan 2010
    Location
    Western Kentucky
    Posts
    626
    have you tried playing with the permissions of the file/directory? i know with FTP certain permission (i believe execute) has to be present in order to show the files in DIR or ls command. its possible the same thing could be occurring.

    or try changing the ownership of the folder so that apache is the owner, otherwise world permission settings are applied.

    worth a shot anyways.
    linux user # 503963

  5. #5
    Just Joined!
    Join Date
    Dec 2006
    Location
    Des Moines, IA
    Posts
    10

    Not so much

    I opened permissions all the way up and incrementally locked them back down.

    from:
    chmod -R 777 /usr/share/doc

    incrementally to

    chmod -R 544 /usr/share/doc

    Refreshing the page on each iteration - no luck. Thanks for taking a stab though. Anything further is still welcome till it's fixed.

    TT

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •