6

I need to put something in a directory on my web server that starts with ., i.e. the path would be my.domain/.something/somefile.

However, it seems that my Apache configuration blocks all access to hidden directories.

How do I change the config so that access to this one particular directory is allowed?

Rami
  • 7,879
  • 12
  • 36
  • 66
Echows
  • 317
  • 2
  • 5
  • 14
  • This is one reason why I switched to nginx, way better and easier configuration. Try this answer maybe helps you http://serverfault.com/questions/245922/how-to-configure-apache-to-view-hidden-files – Daniel W. Dec 04 '15 at 14:56
  • @sjagr .htaccess files are protected by a rule that matches `.ht*` in the default apache configuration. It does not affect directories starting with a dot. – Daniel W. Dec 04 '15 at 15:04
  • It says in apache documentation that "The IndexIgnore directive adds to the list of files to hide when listing a directory. File is a shell-style wildcard expression or full filename. Multiple IndexIgnore directives add to the list, rather than replacing the list of ignored files.". Does this mean that IndexIgnore also makes all directories (and sub-directories) that match unaccessible or just makes them invisible to file listings? – Echows Dec 04 '15 at 15:13
  • It's specific to how they're indexed, not whether they can be accessed or not. In other words, this stuff is related to the question. – covener Dec 04 '15 at 15:18

1 Answers1

4

The default configuration from the apache.org distribution has no problem serving files from a .something subdirectory of the document root. You'd have to search your own logs and configuration for a problem.

covener
  • 17,402
  • 2
  • 31
  • 45
  • You were right. There indeed was a configuration file set up by some previous admin of my server that prevented serving of hidden files and directories. I disabled it and now everything seems to work. – Echows Dec 07 '15 at 14:30
  • 2
    @Echows Would be good to know what exactly the former admin configured. Was it `IndexIgnore` or something different? – Thorsten Schöning Jul 15 '20 at 18:24
  • 2022: See https://stackoverflow.com/a/5266186/1207049 – marekful Jun 25 '22 at 10:49