# Options Indexes bug in Apache 2.2.3?



## gyrgrls (Nov 22, 2004)

Either that, or I have something wrong.
I have not been able to allow indexes on 
any of my vhosts since the server upgrade

(The old server, running Valhalla with Apache
1.3.2, hard drive passed away; we toe-tageed it)

Well, this new server is running Centos 5.2,
and Apache 2.2.3.

All I get is 403 (*Forbidden*)

I know I could make index pages, to list directories,
as could all other users, but this is cumbersome and
unacceptable.

What is wrong? 

I have searched the apache forums, to no avail.
None of the common mistakes mentioned seem
to exist here, and I am at my wits end.

Here is my httpd.conf:


```
ServerTokens OS

ServerRoot /etc/httpd

PidFile run/httpd.pid

Timeout 120

KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15


<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  4000
</IfModule>

<IfModule worker.c>
StartServers         2
MaxClients         150
MinSpareThreads     25
MaxSpareThreads     75 
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>


Listen 80
Listen 8080

LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule version_module modules/mod_version.so

Include conf.d/*.conf

#ExtendedStatus On

User apache
Group apache

### Section 2: 'Main' server configuration

ServerAdmin [email protected]

ServerName gyrogearloose.com:80

UseCanonicalName On

DocumentRoot /var/www

<Directory />
    RewriteEngine On
    order allow,deny
    allow from all
    Options FollowSymLinks
    AllowOverride All
</Directory>

#<Directory /var/www>
#    Options Indexes FollowSymLinks
#    AllowOverride All
#    Order allow,deny
#    Allow from all
#</Directory>

<IfModule mod_userdir.c>
   #UserDir disable
    UserDir public_html /var/www /var/www/hosts
</IfModule>

DirectoryIndex index.html ndex.html index.htm default.htm index.php index.php3 index.phtml index.php5 index.shtml mwindex.phtml index.html.var

AccessFileName .htaccess

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


TypesConfig /etc/mime.types

DefaultType text/plain

<IfModule mod_mime_magic.c>
#   MIMEMagicFile /usr/share/magic.mime
    MIMEMagicFile conf/magic
</IfModule>

HostnameLookups Off

#EnableMMAP off

#EnableSendfile off

ErrorLog logs/error_log

LogLevel warn

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
#LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio

#CustomLog logs/access_log common
#CustomLog logs/referer_log referer
#CustomLog logs/agent_log agent
CustomLog logs/access_log combined

ServerSignature On

Alias /icons/ /var/www/icons/

<Directory /var/www/icons>
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

<IfModule mod_dav_fs.c>
    # Location of the WebDAV lock database.
    DAVLockDB /var/lib/dav/lockdb
</IfModule>

ScriptAlias /cgi-bin/ /var/www/cgi-bin/

<Directory /var/www/cgi-bin>
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable

AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

DefaultIcon /icons/unknown.gif

#AddDescription "GZIP compressed document" .gz
#AddDescription "tar archive" .tar
#AddDescription "GZIP compressed tar archive" .tgz

ReadmeName README.html
HeaderName HEADER.html


IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw

LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW

ForceLanguagePriority Prefer Fallback


AddDefaultCharset UTF-8

#AddType application/x-tar .tgz

#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz

AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

#AddHandler cgi-script .cgi
#AddHandler send-as-is asis
AddHandler type-map var

AddType text/html .shtml

AddOutputFilter INCLUDES .shtml

Alias /error/ /var/www/error/

<IfModule mod_negotiation.c>
<IfModule mod_include.c>
    <Directory "/var/www/error">
        AllowOverride None
        Options IncludesNoExec
        AddOutputFilter Includes html
        AddHandler type-map var
        Order allow,deny
        Allow from all
        LanguagePriority en es de fr
        ForceLanguagePriority Prefer Fallback
    </Directory>

#    ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
#    ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
#    ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
#    ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
#    ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
#    ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
#    ErrorDocument 410 /error/HTTP_GONE.html.var
#    ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
#    ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
#    ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
#    ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
#    ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
#    ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
#    ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
#    ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
#    ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
#    ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var

</IfModule>
</IfModule>

BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0

BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully

#<Location /server-status>
#    SetHandler server-status
#    Order deny,allow
#    Deny from all
#    Allow from .example.com
#</Location>

#<Location /server-info>
#    SetHandler server-info
#    Order deny,allow
#    Deny from all
#    Allow from .example.com
#</Location>


#<IfModule mod_proxy.c>

#ProxyRequests On
#
#<Proxy *>
#    Order deny,allow
#    Deny from all
#    Allow from .example.com
#</Proxy>

#ProxyVia On

#<IfModule mod_disk_cache.c>
#   CacheEnable disk /
#   CacheRoot "/var/cache/mod_proxy"
#</IfModule>

#</IfModule>

### Section 3: Virtual Hosts

<Directory /var/www>
Options +Indexes +FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>

<Directory /var/www/hosts>
Options +Indexes +FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>


<Directory /var/www/hosts/lotzapix/www>
Options +Indexes +FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>

<Directory /var/www/hosts/lindafan.com/www>
Options +Indexes +FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>

<Directory /var/www/hosts/okby.us/www>
Options +Indexes +FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>

<Directory /var/www/hosts/throttle.info/www>
Options +Indexes +FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>

<Directory /var/www/hosts/lightstrip.com/www>
Options +Indexes +FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>

<Directory /var/www/hosts/pics.lightstrip.com/www>
Options +Indexes +FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>

<Directory /var/www/robogasm.org/www>
Options +Indexes +FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>


<Directory /var/www/hosts/spiritwine.com/www>
Options +Indexes +FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>

<Directory /var/www/hosts/thsrmns/www>
Options +Indexes +FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>

<Directory /var/www/hosts/thsrmns/www2>
Options +Indexes +FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>


#######################
######## john #########
#######################

NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName www.gyrogearloose.com
    DocumentRoot /var/www/html
    ErrorLog logs/www.gyrogearloose.com-error_log
    CustomLog logs/www.gyrogearloose.com-access_log common
</VirtualHost>


<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName catch.gyrogearloose.com
    DocumentRoot /var/www/hosts/catch.gyrogearloose.com/www
    ErrorLog logs/catch.gyrogearloose.com-error_log
    CustomLog logs/catch.gyrogearloose.com-access_log common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName www.lightstrip.com
    ServerAlias lightstrip.com
    DocumentRoot /var/www/hosts/lightstrip.com/www
    ErrorLog logs/lightstrip.com-error_log
    CustomLog logs/lightstrip.com-access_log common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName lvfd.lightstrip.com
    DocumentRoot /var/www/hosts/lvfd.lightstrip.com/www
    ErrorLog logs/lvfd.lightstrip.com-error_log
    CustomLog logs/lvfd.lightstrip.com-access_log common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName pics.lightstrip.com
    DocumentRoot /var/www/hosts/pics.lightstrip.com/www
    ErrorLog logs/pics.lightstrip.com-error_log
    CustomLog logs/pics.lightstrip.com-access_log common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName www.lindafan.com
    ServerAlias lindafan.com
    DocumentRoot /var/www/hosts/lindafan.com/www
    ErrorLog logs/lindafan.com-error_log
    CustomLog logs/lindafan.com-access_log common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName www.okby.us
    ServerAlias okby.us
    DocumentRoot /var/www/hosts/okby.us/www
    ErrorLog logs/okby.us-error_log
    CustomLog logs/okby.us-access_log common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName t.okby.us
    DocumentRoot /var/www/hosts/t.okby.us/www
    ErrorLog logs/t.okby.us-error_log
    CustomLog logs/t.okby.us-access_log common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName sissel.is.okby.us
    DocumentRoot /var/www/hosts/sissel.is.okby.us/www
    ErrorLog logs/sissel.is.okby.us-error_log
    CustomLog logs/sissel.is.okby.us-access_log common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName robogasm.org
    ServerAlias www.robogasm.org
    DocumentRoot /var/www/hosts/robogasm.org/www
    ErrorLog logs/robogasm.org-error_log
    CustomLog logs/robogasm.org-access_log common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName www.sirten.com
    ServerAlias sirten.com
    DocumentRoot /var/www/hosts/sirten.com/www
    ErrorLog logs/sirten.com-error_log
    CustomLog logs/sirten.com-access_log common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName sc.sirten.com
    DocumentRoot /var/www/hosts/sirten.com/www/sc
    ErrorLog logs/sc.sirten.com-error_log
    CustomLog logs/sc.sirten.com-access_log common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName www.spiritwine.com
    ServerAlias spiritwine.com
    DocumentRoot /var/www/hosts/spiritwine.com/www
    ErrorLog logs/spiritwine.com-error_log
    CustomLog logs/spiritwine.com-access_log common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName www.spiritwine.com
    ServerAlias wwww.spiritwine.com
    DocumentRoot /var/www/hosts/spiritwine.com/www
    ErrorLog logs/spiritwine.com-error_log
    CustomLog logs/spiritwine.com-access_log common
</VirtualHost>


<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName www.throttle.info
    ServerAlias throttle.info
    DocumentRoot /var/www/hosts/throttle.info/www
    ErrorLog logs/throttle.info-error_log
    CustomLog logs/throttle.info-access_log common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName madd.throttle.info
    DocumentRoot /var/www/hosts/throttle.info/www/madd/
    ErrorLog logs/madd.throttle.info-error_log
    CustomLog logs/madd.throttle.info-access_log common
</VirtualHost>

#######################
######## free #########
#######################

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName www.TheSermons.com
    ServerAlias TheSermons.com
    DocumentRoot /var/www/hosts/thsrmns/www
    ErrorLog logs/TheSermons.com-error_log
    CustomLog logs/TheSermons.com-access_log common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName www2.TheSermons.com
    DocumentRoot /var/www/hosts/thsrmns/www2
    ErrorLog logs/TheSermons.com-error_log2
    CustomLog logs/TheSermons.com-access_log2 common
</VirtualHost>


<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName www.lotzapix.com
    ServerAlias lotzapix.com
    DocumentRoot /var/www/hosts/lotzapix/www
    ErrorLog logs/lotzapix.com-error_log
    CustomLog logs/lotzapix.com-access_log common
</VirtualHost>
```


----------



## tomdkat (May 6, 2006)

gyrgrls said:


> All I get is 403 (*Forbidden*)


Can you post the text from one of the error logs that corresponds to one of these 403 error codes you get?

Peace...


----------



## gyrgrls (Nov 22, 2004)

Not much help, there.
Error logs are empty.

but an access log, based on a test query (from my own IP address) shows:

75.111.43.67 - - [12/Jan/2009:20:37:15 -0800] "GET / HTTP/1.1" 403 -
75.111.43.67 - - [12/Jan/2009:20:37:16 -0800] "GET /favicon.ico HTTP/1.1" 404 293
75.111.43.67 - - [12/Jan/2009:20:37:29 -0800] "GET /1024 HTTP/1.1" 301 324
75.111.43.67 - - [12/Jan/2009:20:37:30 -0800] "GET /1024/ HTTP/1.1" 200 890
75.111.43.67 - - [12/Jan/2009:20:37:31 -0800] "GET /icons/blank.gif HTTP/1.1" 403 301
75.111.43.67 - - [12/Jan/2009:20:37:31 -0800] "GET /icons/back.gif HTTP/1.1" 403 300
75.111.43.67 - - [12/Jan/2009:20:37:31 -0800] "GET /icons/image2.gif HTTP/1.1" 403 302
75.111.43.67 - - [12/Jan/2009:20:47:41 -0800] "GET / HTTP/1.1" 403 -
75.111.43.67 - - [12/Jan/2009:20:48:41 -0800] "GET /pitbull HTTP/1.1" 301 327
75.111.43.67 - - [12/Jan/2009:20:48:42 -0800] "GET /pitbull/ HTTP/1.1" 200 1914
75.111.43.67 - - [12/Jan/2009:20:48:42 -0800] "GET /pitbull/images/background.gif HTTP/1.1" 200 799
75.111.43.67 - - [12/Jan/2009:20:48:42 -0800] "GET /pitbull/empty.gif HTTP/1.1" 200 55
75.111.43.67 - - [12/Jan/2009:20:48:42 -0800] "GET /pitbull/cornertop.gif HTTP/1.1" 200 59
75.111.43.67 - - [12/Jan/2009:20:48:42 -0800] "GET /pitbull/enter.gif HTTP/1.1" 200 1112
75.111.43.67 - - [12/Jan/2009:20:48:43 -0800] "GET /pitbull/background2.gif HTTP/1.1" 200 55
75.111.43.67 - - [12/Jan/2009:20:48:43 -0800] "GET /pitbull/cornerbottom.gif HTTP/1.1" 200 59
75.111.43.67 - - [12/Jan/2009:20:48:51 -0800] "GET / HTTP/1.1" 403 -
75.111.43.67 - - [12/Jan/2009:21:12:46 -0800] "GET / HTTP/1.1" 403 -
75.111.43.67 - - [12/Jan/2009:21:15:58 -0800] "GET / HTTP/1.1" 403 -
75.111.43.67 - - [12/Jan/2009:21:16:00 -0800] "GET / HTTP/1.1" 403 -
75.111.43.67 - - [12/Jan/2009:21:19:23 -0800] "GET / HTTP/1.1" 403 -
75.111.43.67 - - [12/Jan/2009:21:19:26 -0800] "GET / HTTP/1.1" 403 -
75.111.43.67 - - [12/Jan/2009:21:23:30 -0800] "GET / HTTP/1.1" 403 -
75.111.43.67 - - [12/Jan/2009:21:23:32 -0800] "GET / HTTP/1.1" 403 -
75.111.43.67 - - [12/Jan/2009:21:23:35 -0800] "GET / HTTP/1.1" 403 -
75.111.43.67 - - [12/Jan/2009:21:27:55 -0800] "GET / HTTP/1.1" 403 -
75.111.43.67 - - [12/Jan/2009:21:27:57 -0800] "GET / HTTP/1.1" 403 -
75.111.43.67 - - [12/Jan/2009:21:28:00 -0800] "GET / HTTP/1.1" 403 -
75.111.43.67 - - [12/Jan/2009:21:28:02 -0800] "GET / HTTP/1.1" 403 -
75.111.43.67 - - [12/Jan/2009:21:28:04 -0800] "GET / HTTP/1.1" 403 -
75.111.43.67 - - [12/Jan/2009:21:28:06 -0800] "GET / HTTP/1.1" 403 -
75.111.43.67 - - [13/Jan/2009:08:37:12 -0800] "GET / HTTP/1.1" 403 -
75.111.43.67 - - [13/Jan/2009:08:37:14 -0800] "GET / HTTP/1.1" 403 -

I can't figure this one out.

In /etc/httpd/conf/httpd.conf I have:
#
<Directory /var/www/hosts/lightstrip.com/www>
Options +Indexes +FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>

<Directory /var/www/hosts/pics.lightstrip.com/www>
Options +Indexes +FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
#

Now, after much grief, 
in .htaccess under /var/www/hosts/lightstrip.com, I have:
Redirect 302 / http://www.sedoparking.com/lightstrip.com/. 
But of *course* indexes won't work there, now! 

But no .htaccess file under the directory:
/var/www/hosts/pics.lightstrip.com,
because I shouldn't need one.

This way, I can park domains for free, with click through
benefits, without redirecting the subdomains.
I want to see up the subdomain `pics.lightstrip.com'
for indexes (looks like FTP index), but I keep getting 403,
even though this is allowed in the Apache directive, above.
And before anypne asks: yes, I even tried putting .htaccess
files in the docroot folders to allow indexes. No dice.

Since subdomains are defined in DNS (I have address records, 
not CNAMES, defined for each subdomain in each zone file),
the domain parking redirect doesn't block access to them.

But,
pics.lightstrip.com/test
pics.lightstrip.com/pj
will yield indexes, since there is no index page, while 
pics.lightstrip.com/petrol 
will yield a page, because it does have an index file.
However, none of the domain or subdomain / ("slash", or root)
directories will allow indexes...
...so I decided to just park them on Sedo.

It looks like Apache 2 doesn't allow this, by default.
It used to work as expected on the old Apache 1.1x .
But I'm not sure. Weird.

I am beating by head against the wall on this one.

Options +Indexes +FollowSymlinks

OOPS!
Bad editing.

I meant to say the root .htaccess
_used to_ contain the above line,
_before _I redirected it to Sedo.


----------



## tomdkat (May 6, 2006)

I've got an Apache 2.2.6 server running at home I can play with tonight.

For now, what happens if you add the Options directive to the VirtualHost definition:


```
<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName pics.lightstrip.com
    DocumentRoot /var/www/hosts/pics.lightstrip.com/www
    ErrorLog logs/pics.lightstrip.com-error_log
    CustomLog logs/pics.lightstrip.com-access_log common
    [b][color=red]Options +Indexes +FollowSymLinks[/color][/b]
</VirtualHost>
```
Try that and see what happens. I'll report more when I'm home and able to experiment some.

Peace...


----------



## tomdkat (May 6, 2006)

Ok, I just tried a quick experiment using my Apache 2.2.6 server. I didn't get the same results as you. Granted, I'm not currently using a VirtualHost but I got two different errors logged when I viewed a directory with no DirectoryIndex file present.

The first error I received was this:


```
[Tue Jan 20 18:33:57 2009] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /mnt/data/websites/somesite/
```
This is because my <Directory /mnt/data/websites> directive contained:

Options FollowSymlinks

specified only.

I then changed it to:

Options Indexes FollowSymlinks

bounced Apache, and I received the directory index listing you're expecting. Then, I changed the permissions on "somesite" to 744 and got THIS error when I tried to refresh the directory index listing:


```
[Tue Jan 20 18:38:21 2009] [error] [client 127.0.0.1] (13)Permission denied: access to /somesite/index.html denied
```
So, make sure the directory permissions on your website directories are correct, namely g+x and o+x.

As I have more time, I'll play around with a VirtualHost and see if that changes anything for me.

Peace...


----------



## gyrgrls (Nov 22, 2004)

I'm still stumped by this one.
All the .htaccess directives work, and
indexes work in all directories except
for $docroot (document root) on all users,
whether domains or virtual domains serving
web pages.

It seems Apache 2 was built that way.
Worse still, it appears that it's hard-coded
into the source, so there are no config options
for this "feature". 

Sure, symlinks and a little js can fix that,
by placing everything under the docroot and
redirecting, but that's a kludge. 

Hmmm... Apache is open -source.
Well, no. I'll stick to hang gliding and 
bungee jumping for my cheap thrills.


----------



## tomdkat (May 6, 2006)

Did you check the directory permissions as I mentioned above?

Peace...


----------



## gyrgrls (Nov 22, 2004)

Yup!


```
[[email protected] ~]$ cd /var/www/hosts
[[email protected] hosts]$ ll -a
total 80
drwxr-xr-x 19 gyrogear apache 4096 Jan 12 20:26 .
drwxr-xr-x  7 root     root   4096 Jan 12 02:49 ..
drwxr-xr-x  3 gyrogear apache 4096 Jan 12 05:15 catch.gyrogearloose.com
drwxr-xr-x  4 david    apache 4096 Sep 29 07:50 david
drwxr-xr-x  3 gyrogear apache 4096 Jan 12 08:42 lightstrip.com
drwxr-xr-x  3 gyrogear apache 4096 Jan 11 23:43 lindafan.com
drwxr-xr-x  5 lotzapix apache 4096 Dec 28 13:16 lotzapix
drwxr-xr-x  3 gyrogear apache 4096 Jan 12 07:39 lvfd.lightstrip.com
drwxr-xr-x  3 gyrogear apache 4096 Jan 12 05:18 okby.us
drwxr-xr-x  2 gyrogear apache 4096 Sep 28 09:25 osfan.com
drwxr-xr-x  3 gyrogear apache 4096 Jan 12 20:13 pics.lightstrip.com
drwxr-xr-x  3 gyrogear apache 4096 Jan 12 12:10 robogasm.org
drwxr-xr-x  3 gyrogear apache 4096 Jan 12 02:03 sirten.com
drwxr-xr-x  3 gyrogear apache 4096 Jan 12 05:16 sissel.is.okby.us
drwxr-xr-x  3 gyrogear apache 4096 Jan 12 00:01 spiritwine.com
drwxr-xr-x  3 gyrogear apache 4096 Jan 12 00:09 throttle.info
drwxr-xr-x  8 thsrmns  apache 4096 Jan 28 00:57 thsrmns
drwxr-xr-x  4 gyrogear apache 4096 Jan 12 05:16 t.okby.us
drwxr-xr-x  2 gyrogear apache 4096 Sep 28 09:25 wa6frn.us
```


----------



## gyrgrls (Nov 22, 2004)

...same thing with /var/www/html , etc...


----------



## tomdkat (May 6, 2006)

Did you also try adding the Options directive to a VirtualHost definition?

Peace...


----------

