Solved

Directory Browsing for Apache 2.2.14 not working.

Posted on 2011-03-24
9
391 Views
Last Modified: 2012-06-22
I have several sites hosted and need to enable directory browsing on one of them.  I have edited the .htaccess file in the site directory as attached.  The 2nd snippet is the apache2.conf file.  There is nothing in the httpd.conf file.  After adding the +Indexes we have restart the server and still can't get any listing on our /newsletter directory, just says that we don't have permission.
DocumentRoot "/home/os01/www"
ServerName www.os01.us
<Directory "/home/os01/www">
allow from all
Options +Indexes
</Directory>
ServerAlias os01.us
IndexOptions FancyIndexing HTMLTable

Open in new window

ServerRoot "/etc/apache2"

LockFile /var/lock/apache2/accept.lock

PidFile /var/run/apache2.pid

Timeout 300

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule mpm_prefork_module>
    StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>

<IfModule mpm_worker_module>
    StartServers          2
    MaxClients          150
    MinSpareThreads      25
    MaxSpareThreads      75 
    ThreadsPerChild      25
    MaxRequestsPerChild   0
</IfModule>
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

AccessFileName .htaccess

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


HostnameLookups Off

ErrorLog /var/log/apache2/error.log

LogLevel warn

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

Include /etc/apache2/httpd.conf

Include /etc/apache2/ports.conf
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
#
ServerTokens ProductOnly

ServerSignature On
Include /etc/apache2/conf.d/

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/

Open in new window

0
Comment
Question by:andygee1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 3
9 Comments
 
LVL 6

Expert Comment

by:HyperBPP
ID: 35206770
Does a index.htm or index.html exist at the document root?  If so, rename it.
0
 
LVL 6

Expert Comment

by:HyperBPP
ID: 35206802
Sorry didn't read the permission part, have you checked to make sure the directory has Apache permissions?
0
 
LVL 1

Author Comment

by:andygee1
ID: 35206808
At the document root meaning the root of the site, or the root of the folder that we want to be able to browse.  The site root does have a index, but the /newsletter folder does not have any index file, just pdf's and folders.
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 8

Expert Comment

by:pilson66
ID: 35206814
Check the permissions in /newsletter directory
it must be an equal as apache user, and owner`s permissions are rwx in directory
Example:

drwxr-xr-x 11 apache apache  504 Aug 7  2010 roundcube
0
 
LVL 6

Expert Comment

by:HyperBPP
ID: 35206832
0
 
LVL 1

Author Comment

by:andygee1
ID: 35206886
Newsletter directory permissions:

drwxrwxr-x 16 root    root    4096 2011-03-24 08:41 newsletters

Content within the newsletters directory has same:
drwxrwxr-x 3 root root 4096 2009-10-28 12:05 Det News 1997


0
 
LVL 8

Accepted Solution

by:
pilson66 earned 500 total points
ID: 35206999
remove .htaccess file and try again
0
 
LVL 1

Author Comment

by:andygee1
ID: 35207018
ok that worked for me.  Is there anything else I should do to it or is it ok to leave without the .htaccess file?
0
 
LVL 8

Expert Comment

by:pilson66
ID: 35207082
. htaccess needs to add the settings without changing the global server configuration.
0

Featured Post

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
bash file 10 64
Apache module 5 63
Certificate Request CentOS/Apache 1 19
SMTP log file for IMSVA 5 29
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question