apache - Is it possible to check a .htaccess file using the -t option of the apache2 command? -


i've got .htaccess file copied 1 apache httpd server , deployed onto another. unfortunately, foolishly didn't check version of destination server , put file in place; site stopped working because it's apache 2.4 , file has 2.2 syntax. reverted previous version , hoped nobody noticed!

now, of course, i'm paranoid.

i tried copying broken-on-2.4 version elsewhere , using apache2 -t .htaccess find out what's wrong, error:

apache2: not open configuration file /etc/apache2/.htaccess: no such file or directory 

if supply full path (i.e. apache2 -t /path/to/it/.htaccess) get:

ah00534: apache2: configuration error: no mpm loaded. 

this error appears unrelated same error message , exit code (1) regardless of whether or not there's error in .htaccess file.

so question is: can use apache2 -t [...] test .htaccess file, , if not, can use instead (aside manual)? there this site doesn't seem allow me version of apache check against.

i haven't found out how asked, have come workaround.

i created new directory on server , put incompatible .htaccess file in there. accessed directory via browser whilst tail -fing error log (/var/log/apache2/error.log) see problem was.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -