Discussion:
[PLUG] Apache DirectoryIndex...
m***@robinson-west.com
2018-10-19 23:55:39 UTC
Permalink
How do I allow index.html or index.php and not just one or the other?

I found if I create a Directory section for subdirectories of the document root that I can explicitly set the DirectoryIndex
for each subdirectory, but that's a pain. I'm running multiple sites and multiple document roots on Apache 2.4.34 custom compiled.

I'm having difficulty figuring out how to snag the systemd scripts and make them work with my custom compiled Apache.

CentOS 7 stock apache and php-fpm seem to have a module for working with systemd.

-- Michael C Robinson
Paul Heinlein
2018-10-20 16:07:09 UTC
Permalink
Post by m***@robinson-west.com
How do I allow index.html or index.php and not just one or the other?
I found if I create a Directory section for subdirectories of the
document root that I can explicitly set the DirectoryIndex for each
subdirectory, but that's a pain. I'm running multiple sites and
multiple document roots on Apache 2.4.34 custom compiled.
The documentation is pretty clear about how to allow different index
pages.

https://httpd.apache.org/docs/2.4/mod/mod_dir.html#directoryindex

In your case,

DirectoryIndex index.html index.php

Or you can flip-flop them, depending on your priorities.
--
Paul Heinlein
***@madboa.com
45°38' N, 122°6' W
Loading...