Can't install mod proxy on Linux

Hi
I’ve been trying to get Lucee running on Linux for the past few days now.
I cant get the Apache connector working. Lucee itself runs fine, So does Apache.
Every time i try to install the Apache connector I get the following error:

Warning: Problem running post-install step. Installation may not complete
correctly
 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.
apachectl: The "-M" option is not supported.
apachectl: The "-M" option is not supported.

If you need more info’s I’m happy to provide them.

Thanks
Ori

OS: Fedora Linux 38 (KDE Plasma) x86_64
Java Version: java-1.8.0-openjdk-1.8.0.362.b09-2.fc38.x86_64
Apache Version: Apache/2.4.57
Lucee Version: 5.3.10.120

Did you try this?

Yes I already disabled SElinux

is that a typo in

apachectl takes the same args as httpd?

https://httpd.apache.org/docs/2.4/programs/apachectl.html

https://httpd.apache.org/docs/2.4/programs/httpd.html

Sorry I don’t quite understand the Point you’re trying to make

Mod proxy is shipped with RHEL/Fedora core as part of the base install of the httpd (apache httpd) package.

Here is what you do to correct this.

Complete the install without mod_proxy, you dont NEED IT. I need to upload the corrected bash script for this and have it approved, but here for now is how to make this work:

sed -i ‘s/#LoadModule proxy_module/LoadModule proxy_module/’ /etc/httpd/conf/httpd.conf

this makes sure the proxy module is uncommented

now in your main /etc/httpd/conf/httpd.conf at the bottom add the following lines:

<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
# optional mappings
#ProxyPassMatch ^/flex2gateway/(.)$ http://127.0.0.1:8888/flex2gateway/$1
#ProxyPassMatch ^/messagebroker/(.
)$ http://127.0.0.1:8888/messagebroker/$1
#ProxyPassMatch ^/flashservices/gateway(.)$ http://127.0.0.1:8888/flashservices/gateway$1
#ProxyPassMatch ^/openamf/gateway/(.
)$ http://127.0.0.1:8888/openamf/gateway/$1
#ProxyPassMatch ^/rest/(.*)$ http://127.0.0.1:8888/rest/$1
ProxyPassReverse / http://127.0.0.1:8888/
<IfModule"

Now restart apache with

systemctl restart httpd

Assuming you already have lucee running and correctly installed, the above will work

1 Like

Thank you.
I will test this as soon as I’m booted back into Linux and then I will let you know how it goes.

Note, You will need to complete the greater than and less than around the IFModule directives and remove the trailing double qoute, My browser is either reading this as HTML or the forum software is stripping the completed tag, either way let me know if you need further help.

1 Like

/usr/sbin/apachectl -M

However it is very strange that this command does not work, it shows the modules loaded.
It is available from the first version of Apache…

That is also what I thought, but looks like some versions need a different approach. Just saw this here while looking after it.

1 Like

If what @Terry_Whitney didn’t work, can you check the following command on your OS?

apachectl help

It should spit out the available options. Take a look to see if you can see the option “-M” there, and maybe the alternative for it. This information might be useful to adapt the Lucee installer for it.

@OriCat101 please, can you try to exec this command on your server?

httpd -t -D DUMP_MODULES

or, if previous doesnt work, this:

apache2 -t -D DUMP_MODULES

Many thanks.
(I’m so curious)

1 Like

I’m currently at work and I kinda have to use a working dev environment so I’m currently booted into Widows. However, I’ll do that after work and Imma let you know about the results.
But what I know is that the command apache2 does not exist in fedora resp REHL

2 Likes

in Fedora / RHEL clones its httpd

Everyting seems to be working.
Thank you s much :heart:
I have wasted so many hours on this and now its finally woring

For anyone having the same issue in the future:

The last line should also be a closed tag, like this

</IfModule"

And:

As a best practice, do not modify /etc/httpd/conf/httpd.conf or any of the /etc/httpd/conf.d files shipped by Fedora packages directly. If you make any local changes to these files, then any changes to them in newer package versions will not be directly applied. Instead, a .rpmnew file will be created, and you will have to merge the changes manually.

It is recommended to create a new file in /etc/httpd/conf.d/ which will take precedence over the file you wish to modify, and edit the required settings. For instance, to change a setting specified in /etc/httpd/conf.d/foo.conf you could create the file /etc/httpd/conf.d/z-foo-local.conf, and place your setting in that file.
https://docs.fedoraproject.org/en-US/quick-docs/getting-started-with-apache-http-server/

The output of this is as following:

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::2d17:edee:b6a:adc8%eth0. Set the 'ServerName' directive globally to suppress this message
Loaded Modules:
 core_module (static)
 so_module (static)
 http_module (static)
 access_compat_module (shared)
 actions_module (shared)
 alias_module (shared)
 allowmethods_module (shared)
 auth_basic_module (shared)
 auth_digest_module (shared)
 authn_anon_module (shared)
 authn_core_module (shared)
 authn_dbd_module (shared)
 authn_dbm_module (shared)
 authn_file_module (shared)
 authn_socache_module (shared)
 authnz_fcgi_module (shared)
 authz_core_module (shared)
 authz_dbd_module (shared)
 authz_dbm_module (shared)
 authz_groupfile_module (shared)
 authz_host_module (shared)
 authz_owner_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 cache_module (shared)
 cache_disk_module (shared)
 cache_socache_module (shared)
 data_module (shared)
 dbd_module (shared)
 deflate_module (shared)
 dir_module (shared)
 dumpio_module (shared)
 echo_module (shared)
 env_module (shared)
 expires_module (shared)
 ext_filter_module (shared)
 filter_module (shared)
 headers_module (shared)
 include_module (shared)
 info_module (shared)
 log_config_module (shared)
 logio_module (shared)
 macro_module (shared)
 mime_magic_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 remoteip_module (shared)
 reqtimeout_module (shared)
 request_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 slotmem_plain_module (shared)
 slotmem_shm_module (shared)
 socache_dbm_module (shared)
 socache_memcache_module (shared)
 socache_redis_module (shared)
 socache_shmcb_module (shared)
 status_module (shared)
 substitute_module (shared)
 suexec_module (shared)
 unique_id_module (shared)
 unixd_module (shared)
 userdir_module (shared)
 version_module (shared)
 vhost_alias_module (shared)
 watchdog_module (shared)
 brotli_module (shared)
 dav_module (shared)
 dav_fs_module (shared)
 dav_lock_module (shared)
 lua_module (shared)
 mpm_event_module (shared)
 proxy_module (shared)
 lbmethod_bybusyness_module (shared)
 lbmethod_byrequests_module (shared)
 lbmethod_bytraffic_module (shared)
 lbmethod_heartbeat_module (shared)
 proxy_ajp_module (shared)
 proxy_balancer_module (shared)
 proxy_connect_module (shared)
 proxy_express_module (shared)
 proxy_fcgi_module (shared)
 proxy_fdpass_module (shared)
 proxy_ftp_module (shared)
 proxy_http_module (shared)
 proxy_hcheck_module (shared)
 proxy_scgi_module (shared)
 proxy_uwsgi_module (shared)
 proxy_wstunnel_module (shared)
 systemd_module (shared)
 cgid_module (shared)
 http2_module (shared)
 proxy_http2_module (shared)

2 Likes

I’m running into the same issue on AWS Linux 2013 - did you get a fix to this? I tried the above but it apache wont restart when I mod the files