Change in dir.conf?


Since the update last night, one of the sites stopped working. It has an index.shtml as the root for the domain. Before it worked fine, but it was giving a 403. After digging, I found this file:


was missing index.shtml from it:

<IfModule mod_dir.c>
	DirectoryIndex index.html index.cgi index.php index.xhtml index.htm

I added it in, and it works fine now - but will this get lost in future updates? I looked in the repo, and couldn’t find a dir.conf file anywhere - so not too sure?



We should never touch that config file…

Maybe Apache2 update?

Thanks. It is indeed weird! Looking at the 2 servers I setup with this config, they are both:

Server version: Apache/2.4.54 (Ubuntu)

The other server (that I didn’t tweak, as we don’t care about index.shtml) shows a file mod of 08/06/2022 for dir.conf, so that wasn’t updated.

Interestingly, if I take it back out again it gives the 403, and the error is:

AH01276: Cannot serve directory /home/msega/web/ No matching DirectoryIndex (index.html,index.cgi,,index.php,index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive

So its Apache complaining. Yet it shouldn’t even get to Apache? This is the nginx rule:

    location / {
        proxy_pass      http://%ip%:%web_port%;
        location ~* ^.+\.(%proxy_extensions%)$ {
            root           %docroot%;
            access_log     /var/log/%web_system%/domains/%domain%.log combined;
            access_log     /var/log/%web_system%/domains/%domain%.bytes bytes;
            expires        max;
            try_files      $uri @fallback;

Which builds as:

    location / {
        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|htm|html|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|eps|ps|zip|tar|tgz|gz|rar|bz2|7z|aac|m4a|mp3|mp4|ogg|wav|wma|3gp|avi|flv|m4v|mkv|mov|mpeg|mpg|wmv|exe|iso|dmg|swf|shtml)$ {
            root           /home/msega/web/;
            access_log     /var/log/apache2/domains/ combined;
            access_log     /var/log/apache2/domains/ bytes;
            expires        max;
            try_files      $uri @fallback;

So I’m confused as to why it ends up as Apache anyway, and not processed by nginx?

BTW this was all working fine until yesterday. So I’m a bit baffled as to what happened! (could just be coincidence that it happened after the update, or it could be that the lady did some sort of change and neglected to tell me, which wouldn’t be the first time :zipper_mouth_face:)

TBH, if dir.conf isn’t updated automatically it shouldn’t be an issue - but it would still be good to understand whats going on :slight_smile: