Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 26th January 2010, 07:44 PM
tahaa Offline
Registered User
 
Join Date: Jan 2010
Posts: 13
linuxfedorafirefox
Angry Help- How to enable directory indexing in Apache

I am newbie to Linux.

I want to enable directory indexing in "/var/www/html/" [dont want to use index.html or something else htm or php file , just want to show all files and folders when browsing http://localhost ] security risk but i damn care about it.


Code:
1- Using Fedora 12
2- Apache version 2.2.14-1   .fc12.i686
3- SELINUX=disabled
getsebool -a | grep http
getsebool:  SELinux is disabled

My permissions for /var/www/html are
Code:
ls -la /var/www/html
total 120
drwxr-xr-x 2 root root  4096 2010-01-26 18:18 .
drwxr-xr-x 8 root root  4096 2010-01-26 00:57 ..
-rwxr-xr-x 1 root root  1102 2010-01-26 18:16 grub editor.txt
-rw-r--r-- 1 root root 21262 2010-01-26 00:28 linux_software_installtion.html
-rw-r--r-- 1 root root 60002 2010-01-26 18:16 linux_software_installtion.pdf
-rwxr-xr-x 1 root root  2576 2010-01-26 18:16 Login as a root from GUI Fedora 12
-rw-r--r-- 1 root root  1199 2010-01-26 18:16 Login_as_root_F12
-rw-r--r-- 1 root root    91 2010-01-26 18:16 vim_commands

my httpd.conf file configuration is
Code:
DocumentRoot /var/www/html
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>


<Directory "/var/www/html">
     Options Indexes FollowSymLinks
     AllowOverride None
     Order allow,deny
     Allow from all
</Directory>
Code:
http://localhost
Getting the Fedora Test Page. There is no directory indexing Please Help
Thanks
======================
Reply With Quote
  #2  
Old 26th January 2010, 08:04 PM
smurffit's Avatar
smurffit Offline
Registered User
 
Join Date: Dec 2009
Posts: 190
linuxfirefox
Code:
<Directory "/var/www/html">
     Options +Indexes FollowSymLinks
     AllowOverride None
     Order allow,deny
     Allow from all
</Directory>
Then /etc/init.d/apache2 reload
__________________
Linux Registered User #503365 :)

Last edited by smurffit; 26th January 2010 at 08:07 PM.
Reply With Quote
  #3  
Old 26th January 2010, 08:11 PM
tahaa Offline
Registered User
 
Join Date: Jan 2010
Posts: 13
linuxfedorafirefox
Quote:
Originally Posted by smurffit View Post
Code:
<Directory "/var/www/html">
     Options +Indexes FollowSymLinks
     AllowOverride None
     Order allow,deny
     Allow from all
</Directory>
Then /etc/init.d/apache2 reload
added +indexes
[root@localhost init.d]# /etc/init.d/httpd reload
Reloading httpd: [ OK ]
[root@localhost init.d]#


same default page i e fedora test page
i created a folder name tahaa in /var/www/html/ now after opening

http://localhost > fedora test page but i know there is directory name tahaa so
http://localhost/tahaa works fine , but not showing directory index on /var/www/html/

Last edited by tahaa; 26th January 2010 at 08:16 PM.
Reply With Quote
  #4  
Old 26th January 2010, 08:14 PM
smurffit's Avatar
smurffit Offline
Registered User
 
Join Date: Dec 2009
Posts: 190
linuxfirefox
Well, my line looks like this and works as a charme. :/
Code:
IndexOptions FancyIndexing ScanHTMLTitles IconsAreLinks FoldersFirst HTMLTable TrackModified VersionSort ShowForbidden
__________________
Linux Registered User #503365 :)
Reply With Quote
  #5  
Old 26th January 2010, 08:35 PM
tahaa Offline
Registered User
 
Join Date: Jan 2010
Posts: 13
linuxfedorafirefox
Quote:
Originally Posted by smurffit View Post
Well, my line looks like this and works as a charme. :/
Code:
IndexOptions FancyIndexing ScanHTMLTitles IconsAreLinks FoldersFirst HTMLTable TrackModified VersionSort ShowForbidden
would u like to paste ur document root and directory settings?
Reply With Quote
  #6  
Old 26th January 2010, 08:48 PM
Dangermouse's Avatar
Dangermouse Offline
Administrator
 
Join Date: Aug 2007
Location: London Postbox (the red one)
Age: 47
Posts: 3,849
linuxfedorafirefox
Quote:
http://localhost > fedora test page but i know there is directory name tahaa so
Have you edited /etc/httpd/conf.d/welcome.conf and hashed out the lines

Quote:
su
gedit /etc/httpd/conf.d/welcome.conf
IE
Quote:
#
# This configuration file enables the default "Welcome"
# page if there is no default index page present for
# the root URL. To disable the Welcome page, comment
# out all the lines below.
#
#<LocationMatch "^/+$">
# Options -Indexes
# ErrorDocument 403 /error/noindex.html
#</LocationMatch>
Reply With Quote
  #7  
Old 27th January 2010, 08:55 AM
tahaa Offline
Registered User
 
Join Date: Jan 2010
Posts: 13
linuxfedorafirefox
Smile

Quote:
Originally Posted by Dangermouse View Post
Have you edited /etc/httpd/conf.d/welcome.conf and hashed out the lines

IE
Thanks dear problem solved, now its opening directory indexes
I just hashed out the lines of /etc/httpd/conf.d/welcome.conf file.
Code:
#<LocationMatch "^/+$">
 #   Options -Indexes
  #  ErrorDocument 403 /error/noindex.html
#</LocationMatch>
Reply With Quote
Reply

Tags
apache, directory, enable, indexing

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache and local Directory Min Using Fedora 1 28th July 2009 11:05 AM
Apache directory help granade Servers & Networking 8 10th December 2008 01:46 AM
How to enable Apache not to be case sensitive like IIS ntwdavid Using Fedora 3 28th September 2008 06:54 PM
Apache directory listing krneki Servers & Networking 5 19th June 2006 06:01 AM
Apache secure directory jrmontg Servers & Networking 20 3rd January 2006 06:16 PM


Current GMT-time: 08:46 (Sunday, 26-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat