LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-26-2010, 04:09 AM   #1
pushpendra
LQ Newbie
 
Registered: May 2010
Posts: 13

Rep: Reputation: 0
Angry View directory in Apache


Hello Everyone,

I want to view directory content in apache server, for that i configure apache server, but i don't know how to enable autoindxing module, only apache test page is opening when i open my web site.

Please help me to find some tutorial or step or any example to solve my problem.
 
Old 08-26-2010, 04:16 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
Could you please brief more on your issue? Auto indexing? What problem are you facing? And what directories do you need to view? Do you need to recurse into a directory?
If your default configuration has index.html as start up page, then it will be displayed. If you have virtual directories configured, you will need to explicitly visit the location like
http://<your-server-ip>/test
assuming that test is a configured virtual directory. And if you have indexes option in the configuration, your browser should list the directories.
 
Old 08-26-2010, 04:35 AM   #3
pushpendra
LQ Newbie
 
Registered: May 2010
Posts: 13

Original Poster
Rep: Reputation: 0
Question

Thanx chaitanya for ur rply.

i have two file a.txt and b.txt in /var/www/virtual directory, and i also configure virtual host, virtual host conf is mention below,

<VirtualHost 192.168.0.1:80>
ServerAdmin webmaster@server.example.com
DocumentRoot /var/www/virtual
ServerName server.example.com
ErrorLog logs/server.example.com-error_log
CustomLog logs/server.example.com-access_log common
</VirtualHost>

I want that my browser will list files which are available in /var/www/virtual directory.

Please tell me what to do next...

Last edited by pushpendra; 08-26-2010 at 04:42 AM.
 
Old 08-26-2010, 04:51 AM   #4
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
In the virtual directory configurations, use this option and see if it works:
Code:
Options All Indexes FollowSymLinks MultiViews
 
Old 08-26-2010, 05:27 AM   #5
pushpendra
LQ Newbie
 
Registered: May 2010
Posts: 13

Original Poster
Rep: Reputation: 0
Boss i think, we r going on wright way ...

now i have only one problem

i can open sab directory through http://server.example.com/abc

but http://server.example.com still showing the test page.
 
Old 08-26-2010, 05:34 AM   #6
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
Just a minute. What a miss. You are not configuring virtual directories but virtual host. Can you comment the line for DirectoryIndex?
 
Old 08-26-2010, 06:04 AM   #7
pushpendra
LQ Newbie
 
Registered: May 2010
Posts: 13

Original Poster
Rep: Reputation: 0
i do comment the line

DirectoryIndex index.html index.html.tar


but still the same onlt Apache test page is coming...
 
Old 08-26-2010, 06:15 AM   #8
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

Don't know if it's needed but did you restart or reload Apache to make it aware of the configuration changes?

Kind regards,

Eric
 
Old 08-26-2010, 06:42 AM   #9
pushpendra
LQ Newbie
 
Registered: May 2010
Posts: 13

Original Poster
Rep: Reputation: 0
Thumbs up

I restarted the httpd service, but only sub directory content is visible when I access http://server.example.com/abc

No prob, guys thanx for ur help.

I think I need to do more studies, guys do one more thing please share some tutorial or guide about Apache so I can learn more about it.
 
Old 08-26-2010, 07:00 AM   #10
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
You could add "+" to options like Options +Indexes +Followsymlinks and try if it makes difference. And yes, though you know it, restart the apache service to make the changes visible.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to view home directory bcbotha Fedora 4 11-27-2008 09:38 AM
Apache Directory Listing Of NFS Mount, cannot view directory list via apache luqmana Linux - Networking 2 12-19-2005 06:03 AM
how to view the .wine directory in linux ALInux Linux - Software 1 04-30-2005 09:59 AM
view home directory through samba on winxp jsmarshall85 Linux - Networking 4 10-07-2004 02:37 PM
Can't view home directory with Samba Phaethar Fedora 2 12-04-2003 10:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration