Questions tagged [directoryindex]
50 questions
11
votes
5 answers
Disable directory listings with 404 instead of 403
I've disabled directory listings like so...
Options -Indexes
When I try and access a directory like this:-
www.example.com/secret/
I get a 403 Forbidden response.
However, I want a 404 Not Found response, so hackers can't guess my directory…

Rik Heywood
- 269
- 1
- 2
- 6
8
votes
1 answer
ext3_dx_add_entry: Directory index full
Background: I'm running lighttpd 1.4.28-1 on CentOS 5.3 to serve the static assets.
Signal: recently, it gets slow sometimes. I'm getting the below errors in the kernel log and /var/log/messages:
proftpd[5145]: (::ffff:xx[::ffff:xx]) - FTP session…

quanta
- 51,413
- 19
- 159
- 217
6
votes
1 answer
How do I make virtual host DirectoryIndex file appear in the url?
I have setup a virtual host which specifies a default file to load when the URL is called.
The problem I have is that I need that default DirectoryIndex file to appear in the URL.
So when I go to: www.mysite.co.uk, I want www.mysite.co.uk/app.php to…

Bob Flemming
- 1,245
- 3
- 14
- 17
4
votes
2 answers
Force nginx to always autoindex and ignore index.html files?
I am trying to get nginx to ignore index.html files and always show a directory listing from the autoindex module.
If I remove my index line, nginx still defaults to serving index.html files, so that is not a solution.
A similar question was asked…

Maximillian Laumeister
- 162
- 1
- 11
4
votes
2 answers
DirectoryIndex not working properly for rewritten URL
I have domain.com and sub.domain.com pointing to the same server and I'm using mod_rewrite to rewrite URLs for sub.domain.com to the sub subdirectory. I have the following .htaccess file in the document root:
DirectoryIndex index.html index.php
#…

mxxk
- 163
- 2
- 7
3
votes
1 answer
Set date format in nginx autoindex HTML listing
The default date format in nginx autoindex HTML directory listings is 19-Jun-2019. Can I change it to ISO YYYY-MM-DD format instead?

Lassi
- 495
- 1
- 5
- 10
3
votes
3 answers
Apache will not display index in web root, subfolders are fine
I have an Apache 2.2.3 server running on CentOS 5.5. In the root of my web directory, there is an index.html file.
Going to something like, say, www.exampledomain.egg/index.html works, but going to www.exampledomain.egg/ displays a completely blank…

zach.hinchy
- 31
- 1
- 3
2
votes
2 answers
Apache2: Allow directory indexing, but restrict file access by type
I need to configure my Apache2 server (version 2.2.22) such that I allow auto-indexing of the WWW root folder and its sub-directories, but restrict access (i.e. restrict download) to just a set of specific file types (i.e. .txt and .log). In other…

Keith Morgan
- 121
- 1
- 3
2
votes
1 answer
using nginx try_files and autoindex together
I have the following server configuration:
server {
listen 80;
server_name _;
root /var/www/;
location /calendars/ {
autoindex on;
try_files $uri.ics $uri =404;
}
}
If would expect to get the autoindex page on…

Tyilo
- 125
- 1
- 5
2
votes
1 answer
Apache2 on Ubuntu 12.04 -- DirectoryIndex ignored
I have a relatively fresh installation of LAMP on Ubuntu 12.04 (installed using tasksel). I've got a virtual host pointed at a development project in my home directory containing plain Hello World index.html. Apache is showing the directory index…

James
- 21
- 1
- 3
2
votes
1 answer
nginx - How to... DirectoryIndex to a folder
I want to set a initial page inside a folder, besides the common index.htm
I want to change index.htm to /folder/file.htm
Is it possible using nginx?
In my Apache server all I have to do is config the htaccess file, putting this:
DirectoryIndex…

Gus
- 21
- 1
- 2
2
votes
1 answer
When changed to WWW, all URLs showing index.php?page= how to remove index.php?page=?
I recently managed to direct all URLs from non-www to www as I had an SEO error regarding duplicate websites.
Once I have applied www rules then all my URLs start showing index.php?page= which doesn't look pretty.
Here are my current .htaccess…

Siham Lahmine
- 21
- 1
1
vote
1 answer
Apache2 unexpected redirect: Virtualhost DirectoryIndex not serving index.php automatically
I have two Apache virtual hosts set up on an Ubuntu 16.04 VPS.
site1.example.com is a properly functioning WordPress site.
site2.example.com is a newly added site with only index.php in its document root.
When I visit site2.example.com in a…

Approval Junkie
- 13
- 4
1
vote
1 answer
Trouble with Passenger/Apache2 - Error 403
I need to upgrade my Redmine installation. I'm on a Mac OS X Server 10.6.8 (unfortunately, this is a given - can't update the system to a new version right now).
In the process, I had issues with installing a newer version of Ruby (required by the…

Sebastian Sulger
- 91
- 6
1
vote
1 answer
How can I password protect a directory with nginx, but not the files within the directory?
I know this can be done with Apache, however I've started using nginx and would like to know if this is possible, and if so, how I can implement it.
On my web server I have the directory /mcscreens which contains a number of images. The directory is…

Torvero
- 414
- 7
- 14