LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-03-2010, 08:47 AM   #1
rrrssssss
Member
 
Registered: Mar 2005
Posts: 288

Rep: Reputation: 34
Apache2 question - How to disable file browsing using IP address


Hello forum,

Whenever I type in my IP address or local domain name in my browser (http://myipaddress), my entire directory tree shows up in the browser. Normally I would not mind this behavior but I am networking my main computer through a router and if anybody within the range of the router types in my IP address in their browser (using their computer), I think they too will be able to access every file on my computer. How do I disable this?

I am running Linux Mint 9 (based on Ubuntu Lucid) and Apache2. I would rather just be limited to using Nautilus to connect to the HTTP server using a password.

Help will be appreciated,
Roy

Last edited by rrrssssss; 10-04-2010 at 06:37 AM.
 
Old 10-03-2010, 08:57 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
*every* file?? if that's the case then you're doing something far more wrong than enabling indexing. In order to answer your actual question, you would ensure that the Options directives do not include "Indexes" and that would cover it. However based on what you're saying is happening, doing that is really a trivial thing compared to the other huge security issues you are already exposing yourself to. the *entire* filesystem?? How??
 
Old 10-03-2010, 09:08 AM   #3
rrrssssss
Member
 
Registered: Mar 2005
Posts: 288

Original Poster
Rep: Reputation: 34
Hello Chris,

I really did not understand the basics when I configured Apache2 but I got help from Googling the Internet. But honestly, I do not know how I managed to accomplish this behavior but the entire directory tree, including mounted drives in /media, shows up in the browser by typing http://myipaddress .

I might just disable Apache2 and stick with ssh or sftp.

I'm still open for suggestions.

All the best,
Roy
 
Old 10-03-2010, 09:09 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
if you aren't serving a website, then you should not use a web server, regardless of simplity etc. ssh / sftp / sshfs is a great way to achieve remoted file access, and i'd certainly recommend that over a webserver.
 
Old 10-03-2010, 10:58 AM   #5
rrrssssss
Member
 
Registered: Mar 2005
Posts: 288

Original Poster
Rep: Reputation: 34
I fixed my problem by putting a minus sign "-" in front of the word "Indexes" for the Options line in httpd.conf and everywhere else it showed up.

I also noticed that DocumentRoot was set to "/" and <Directory "/"> was set in httpd.conf. I think that is what caused the problem in the first place.

All the best,
Roy

Last edited by rrrssssss; 10-04-2010 at 06:37 AM.
 
  


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
[SOLVED] disable directory and file browsing konzo Linux - Newbie 8 07-30-2010 09:09 AM
Apache2 Directory Browsing File Size Limitations... BillyGalbreath Linux - Software 0 06-23-2006 06:54 PM
Disable Directory Browsing Apache bentman78 Linux - Software 2 07-09-2004 02:10 AM
apache file browsing question zovres Linux - General 3 08-14-2003 10:49 PM
Network Browsing and Virtual IP address jarmstrong Linux - Networking 5 02-17-2003 08:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:59 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