09-25-2004
apache directory browsing
How do i prevent clients from browsing directory structures if there is no index.html in a directory?
For example, lets say that i dynamically create directories on in my doc root of an apache based web server. I know if i type the url and there is no index or default page in there, then apache will allow the browser to see all the files in that directory. I don't want this, I'd rather force a redirect or a 404 or anything but letting them see my document.
Any ideas?
System:
FreeBSD 5.2.1 64-Bit
www: apache 2
10 More Discussions You Might Find Interesting
1. IP Networking
Helo !
I want to do something and I don't know where to start... I want to make a small web hosting server (just for me and a few friends) and for the sake of learning I'd like to make an account for every user. The thing is that I want everyone to log into the server and to be put in his home... (3 Replies)
Discussion started by: Sergiu-IT
3 Replies
2. Web Development
Hi,
I have a directory and I need a url that users can surf it.like ftp.
my web server is apache.
Thanks in advance. (2 Replies)
Discussion started by: Zaxon
2 Replies
3. UNIX for Dummies Questions & Answers
Hello,
I want to restrict access to our Subversion repositories to only our internal network.
I have a virtual host directive setup in Apache for the IP and port 443. When I put the following:
<VirtualHost 205.147.86.33:443>
<Directory "/var/www/svn/">
Order deny,allow
AllowOverride... (0 Replies)
Discussion started by: mojoman
0 Replies
4. UNIX for Dummies Questions & Answers
Hello,
I want to restrict access to our Subversion repositories to only our internal network.
I have a virtual host directive setup in Apache for the IP and port 443. When I put the following:
<Directory "/var/www/svn/">
Order allow,deny
AllowOverride None
Allow from 10.5.10.0/24
Allow... (1 Reply)
Discussion started by: mojoman
1 Replies
5. Shell Programming and Scripting
Hi ,
I have installed apache and configured Document root as /home
DocumentRoot "/home"
The files under home directory is listed on the web server, i have one text file under "/home/test/1.txt" i can view the file when i set DocumentRoot to /home.
But when i change Document root to ... (1 Reply)
Discussion started by: asak
1 Replies
6. UNIX for Dummies Questions & Answers
I've made a webpage has a button that backs up the /var/www directory to a mounted USB drive. Assume that the page that this is on is completely safe and there is no way that anyone can see it. (unless actually relevant)
PHP code for the button: (I'm quite sure this isn't the issue, it works... (2 Replies)
Discussion started by: cuvvvie
2 Replies
7. Linux
Hi all,
I have a web site that I'm serving on an Apache server, and it has a number of different folders, but I only want the user to be able to access certain ones -- the majority of them I don't want the user to access. I tried modifying my /etc/apache2/conf.d/security file to do this, but I... (1 Reply)
Discussion started by: Zel2008
1 Replies
8. Web Development
Hi
I am trying to make a web program which is command line equivalent. i have done the coding in cgi program in perl and html for basic forms to take inputs. when i ran the program from web application i see permission denied messages. after analyzing i found apache is running as wwwrun which... (2 Replies)
Discussion started by: rakeshkumar
2 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
I have installed apache using yum on centos. I know that the default installation directory is /var/www/html.
Now I want to change the installation directory to /mnt/ebs. How can I do this ? (5 Replies)
Discussion started by: Palak Sharma
5 Replies
10. Red Hat
Hi
I am exactly according to this link
CentOS 6 - Apache httpd - Enable Userdir : Server World
I Enabled userDirectory
Server version: Apache/2.2.15
CentOS release 6.8 (Final)
But Iget this Error
Forbidden
You don't have permission to access /~mn/index.html on this server
Goal... (2 Replies)
Discussion started by: mnnn
2 Replies
LEARN ABOUT DEBIAN
mrtg-webserver
MRTG-WEBSERVER(1) mrtg MRTG-WEBSERVER(1)
NAME
mrtg-webserver - hints for web server configuration
SYNOPSIS
If you want people to actually see the results of your network monitoring efforts you will need a webserver.
This document lists some configuration hints for webservers. Contributions welcome.
APACHE
Configuring mod_expire
A big issue with mrtg monitoring data is the expiry time. All these nice graphs you can create are only valid for a short time. If you do
not take special action some webbrowsers will not notice this and you may end up with people seeing old data because of caching issues.
The apache module mod_expire allows you to setup special expiry properties for individual file.
Here is an example for how this may look for an mrtg web directory. The configuration directives can be stored into a .htaccess file.
############################################################
# Example .htaccess for use with apache-1.2 and mod_expire.
# (mod_expire come with apache-1.2 but you have to explicitly
# activate it when compiling the httpd ...)
#############################################################
#
<Files "*-day.png">
ExpiresActive On # enable expirations
# five minutes
ExpiresDefault M300
</Files>
<Files "*-week.png">
ExpiresActive On
ExpiresDefault M1800
</Files>
<Files "*-month.png">
ExpiresActive On
ExpiresDefault M7200
</Files>
<Files "*-year.png">
ExpiresActive On
ExpiresDefault M86400
</Files>
<Files "*.html">
ExpiresActive On
ExpiresDefault M300
</Files>
# index.html is not automatically generated
<Files "index.html">
ExpiresActive Off
</Files>
AUTHOR
Unknown
2.17.4 2012-01-12 MRTG-WEBSERVER(1)