LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 12-16-2011, 12:25 PM   #1
Gil@LQ
Member
 
Registered: Apr 2010
Location: India /Hyderabad
Distribution: RedHat, CentOS
Posts: 273

Rep: Reputation: 1
Apache Directoy index


hi all,

i installed apache, my purpose is to make files files available to users through webpage. so i created a config file like below

Quote:
vi /etc/http/conf.d/download.conf
Alias /download /var/data
<Directory /var/data>
AllowOverride Options
</Directory>
but not displaying in browser.. Please is it correct or not >> please help me ..
thank you.
 
Old 12-16-2011, 12:32 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

You are editing the wrong .conf file. The file that you should be looking for is /etc/httpd/conf/httpd.conf

There are many documents available on internet which explains how to configure apache web server.
 
Old 12-16-2011, 04:11 PM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
@T3RM1NVT0R
Quote:
You are editing the wrong .conf file. The file that you should be looking for is /etc/httpd/conf/httpd.conf
OP didn't mentioned the distro, but looks like an RHEL based.
AFAIK RHEL base distros use "Include conf.d/*.conf", so the download.conf file will be read by apache.

@OP
You need:
Code:
Options Indexes
inside the <Directory /var/data>...</Directory> stanza, or since you have an "AllowOverride Options", you can put the same Options directive inside a .htaccess file in that directory

Regards
 
1 members found this post helpful.
Old 12-16-2011, 04:48 PM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

@ bathony,

Thanks for the information. I always prefer to manage it via httpd.conf just to make sure everything is there in the same file :-)

@ subbarao_ganeshna,

Do you see the default apache page when you type in the address in your browser. If that is the case then you should comment out lines in the following file:

/var/httpd/conf.d/welcome.conf

Comment out (put a # sign) in front of all lines in the above mentioned files and then it should show you the file listing.
 
Old 12-16-2011, 10:33 PM   #5
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
you also need to add a virtual host in your config file to do the same

Code:
<VirtualHost server-ip:80>
        ServerAdmin root@server.example.com
        ServerName server.example.com
        DocumentRoot /var/data
        <Directory /var/data/>
        Options Indexes
        Order allow,deny
        Allow from all
        </Directory>
</VirtualHost>

Alias /download  /var/data
<Directory /var/data/>
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
</Directory>
 
Old 12-16-2011, 11:01 PM   #6
pantdk
Member
 
Registered: Oct 2011
Location: New Delhi
Posts: 248
Blog Entries: 3

Rep: Reputation: 17
Hi user this & changes your config as per your environment

<VirtualHost 192.168.0.185>
ServerName dk.pant.com
ServerAdmin root@dk.pant.com
DocumentRoot /tank/pant
DirectoryIndex index.html
<Directory "/tank/pant/wmv">
Options Indexes
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
 
  


Reply



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
Apache 404 index.php not Found but index.php exists at document root mark84 Linux - Server 20 07-27-2008 01:55 AM
apache index.html doesn't show up but index.php do zoffmann Linux - Server 5 01-28-2008 03:53 PM
apache and index Sapient Linux - Software 8 12-31-2005 09:26 AM
apache directory index spank Linux - Newbie 1 12-10-2003 11:47 AM
Apache's Index XxAndyxX Linux - Software 2 03-16-2003 12:34 PM

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

All times are GMT -5. The time now is 02:09 AM.

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