I’m trying to script and install and setup on Alma Linux 9 (says installer is supported).
I’m on Hetzner Cloud using Alma Linux 9
I’m having trouble when it comes to running the lucee installer in unattended mode
The error I get is (running as root):
Error running /opt/lucee/sys/install_mod_proxy.sh -m install -t 8888 -f /etc/httpd/conf/httpd.conf -c /usr/sbin/apachectl: apachectl: The "-M" option is not supported.
apachectl: The "-M" option is not supported.
Failed to install Lucee
Thanks.
Thats the output of httpd -v
I’m not adding any other flags to the install so I would asume all the defaults are in place, unless there’s another flag I need to run with the installer
Server version: Apache/2.4.62 (AlmaLinux)
I’m a bit stuck here,
I’ve followed the requirements of supported OS and instructions for the unattended install, just trying a vanilla install to start with, before I get more adventurous and pull my own site in and try and configure that.
I’ve removed any of my own customisation and now just - install apache and then lucee
But that throws this error:
Problem running post-install step. Installation may not complete correctly
Error running /opt/lucee/sys/install_mod_cfml.sh -m install -f /etc/httpd/conf/httpd.conf -d /usr/lib64/httpd/modules/ -c /usr/sbin/httpd -k ab9923ebf6da949f1a976c9cd7e47aa08f858bd511edf7c7d4646496fb8abcb2: Usage: /usr/sbin/httpd [-D name] [-d directory] [-f file]
I listed the modules (/usr/lib64/httpd/modules/) and noticed the switches for t mod_cfml.so are different to the rest of the modules listed, perhaps a clue?
-rwxr-xr-x. 1 root root 40496 Jan 21 21:25 mod_cache_socache.so
-rw-r--r--. 1 root root 46695 Mar 3 17:00 mod_cfml.so
I wonder if there are any script examples for autoconfiguring a basic Lucee install I can peruse to see if I’m doing something especially wrong.
No, I get this:
Passing arguments to httpd using apachectl is no longer supported.
You can only start/stop/restart httpd using this script.
To pass extra arguments to httpd, see the httpd.service(8)
man page.
I am currently trying to manually run the installer using the /usr/sbin/httpd path to apache control and have come across thi same issue during the final install process:
I have a virtual host in my httpd.conf for the ROOT default lucee site, and I can see that the installer has added lines, but going to my IP and I am just geting the Apache default page.
relevant lines of my httpd.conf
<VirtualHost *:80>
DocumentRoot /opt/lucee/tomcat/webapps/ROOT
ServerName mydomain.com
DirectoryIndex index.cfm
<Directory "/opt/lucee/tomcat/webapps/ROOT">
Options -Indexes
AllowOverride All
Require all granted
DirectoryIndex index.cfm
RewriteEngine On
RewriteRule ^index.cfm / [R=301,L,NC]
RewriteRule ^($|.*\.cf[mc])$ ajp://localhost:8009/$1 [P]
</Directory>
<Location /lucee>
<RequireAny>
Require ip my IP
</RequireAny>
</Location>
ServerSignature Off
# TODO remove this when we're sure the load balancers are doing this
# RequestHeader set host "mydomain.com"
CustomLog /var/log/httpd/sonic_access.log combined
ErrorLog /var/log/httpd/sonic_error.log
<Proxy *>
Require all granted
</Proxy>
ProxyPreserveHost On
ProxyPassMatch ^/(.+\.cf[cm])(/.*)?$ ajp://127.0.0.1:8009/$1$2
</VirtualHost>
<IfModule mod_proxy.c>
ProxyPreserveHost On
ProxyPassMatch ^/(.+\.cf[cm])(/.*)?$ http://127.0.0.1:8888/$1$2
ProxyPassMatch ^/(.+\.cfml)(/.*)?$ http://127.0.0.1:8888/$1$2
ProxyPassReverse / http://127.0.0.1:8888/
</IfModule>
LoadModule modcfml_module modules/mod_cfml.so
CFMLHandlers ".cfm .cfc .cfml"
ModCFML_SharedKey "df3b42923f49d6a3d562956b91a331aac0dbabf622c01c5f4bc20a7d85553f4f"
LogHeaders false
LogHandlers false
LogAliases false
VDirHeader false
From the man page for apachectl it appears that (at least) AlmaLinux 9 (that is all I have tested on so far) has replaced the usual apachectl package with a wrapper:
Compatibility
The version of apachectl used on this system is a replacement script intended to be mostly (but not completely) compatible with version
provided with Apache httpd. This apachectl mostly acts as a wrapper around systemctl and manipulates the systemd service for httpd. The
interface to the Apache version of apachectl is described at apachectl - Apache HTTP Server Control Interface - Apache HTTP Server Version 2.4.
I don’t know on what world they consider “mostly” to be valid given the number of arguments that apachectl used to include, but I suppose there isn’t much we can do about it.