Apache2 mod_rewrite not present in Leap 15.6

I’m trying to use mod_rewrite but I cannot seem to find it here:

cat loadmodule.conf 
<IfModule prefork.c>
    LoadModule actions_module                 /usr/lib64/apache2-prefork/mod_actions.so
    LoadModule alias_module                   /usr/lib64/apache2-prefork/mod_alias.so
    LoadModule auth_basic_module              /usr/lib64/apache2-prefork/mod_auth_basic.so
    LoadModule authn_file_module              /usr/lib64/apache2-prefork/mod_authn_file.so
    LoadModule authz_host_module              /usr/lib64/apache2-prefork/mod_authz_host.so
    LoadModule authz_groupfile_module         /usr/lib64/apache2-prefork/mod_authz_groupfile.so
    LoadModule authz_user_module              /usr/lib64/apache2-prefork/mod_authz_user.so
    LoadModule autoindex_module               /usr/lib64/apache2-prefork/mod_autoindex.so
    LoadModule cgi_module                     /usr/lib64/apache2-prefork/mod_cgi.so
    LoadModule dir_module                     /usr/lib64/apache2-prefork/mod_dir.so
    LoadModule env_module                     /usr/lib64/apache2-prefork/mod_env.so
    LoadModule expires_module                 /usr/lib64/apache2-prefork/mod_expires.so
    LoadModule include_module                 /usr/lib64/apache2-prefork/mod_include.so
    LoadModule log_config_module              /usr/lib64/apache2-prefork/mod_log_config.so
    LoadModule mime_module                    /usr/lib64/apache2-prefork/mod_mime.so
    LoadModule negotiation_module             /usr/lib64/apache2-prefork/mod_negotiation.so
    LoadModule setenvif_module                /usr/lib64/apache2-prefork/mod_setenvif.so
    LoadModule ssl_module                     /usr/lib64/apache2-prefork/mod_ssl.so
    LoadModule socache_shmcb_module           /usr/lib64/apache2-prefork/mod_socache_shmcb.so
    LoadModule userdir_module                 /usr/lib64/apache2-prefork/mod_userdir.so
    LoadModule reqtimeout_module              /usr/lib64/apache2-prefork/mod_reqtimeout.so
    LoadModule authn_core_module              /usr/lib64/apache2-prefork/mod_authn_core.so
    LoadModule authz_core_module              /usr/lib64/apache2-prefork/mod_authz_core.so

Also /etc/sysconfig/apache2 shows this:

# EXAMPLES:
#
# fairly minimal
# APACHE_MODULES="authz_host alias auth dir log_config mime setenvif"
#
# apache's default installation
# APACHE_MODULES="authz_host actions alias asis auth autoindex cgi dir imap include log_config mime negotiation setenvif status userdir"
# your settings
APACHE_MODULES="actions alias auth_basic authn_core authn_file authz_host authz_groupfile authz_core authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl socache_shmcb userdir reqtimeout mod_proxy proxy_http"

I’ve looked up the mod on zypper or any mod package and nothing. Am I missing a repo here?

What if you run ls -lh /usr/lib64/apache2-prefork

1 Like

Hello Heitor! Thanks for replying! Yes, it’s there, how do I move it to the config? Will a2enmod suffice?

ls -lh /usr/lib64/apache2-prefork

total 3.8M


-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_access_compat.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_actions.so

-rwxr-xr-x 1 root root 19K Aug 27 14:59 mod_alias.so

-rwxr-xr-x 1 root root 6.2K Aug 27 14:59 mod_allowmethods.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_asis.so

-rwxr-xr-x 1 root root 15K Aug 27 14:59 mod_auth_basic.so

-rwxr-xr-x 1 root root 35K Aug 27 14:59 mod_auth_digest.so

-rwxr-xr-x 1 root root 27K Aug 27 14:59 mod_auth_form.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_authn_anon.so

-rwxr-xr-x 1 root root 15K Aug 27 14:59 mod_authn_core.so

-rwxr-xr-x 1 root root 15K Aug 27 14:59 mod_authn_dbd.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_authn_dbm.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_authn_file.so

-rwxr-xr-x 1 root root 19K Aug 27 14:59 mod_authn_socache.so

-rwxr-xr-x 1 root root 31K Aug 27 14:59 mod_authnz_fcgi.so

-rwxr-xr-x 1 root root 51K Aug 27 14:59 mod_authnz_ldap.so

-rwxr-xr-x 1 root root 23K Aug 27 14:59 mod_authz_core.so

-rwxr-xr-x 1 root root 15K Aug 27 14:59 mod_authz_dbd.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_authz_dbm.so

-rwxr-xr-x 1 root root 15K Aug 27 14:59 mod_authz_groupfile.so

-rwxr-xr-x 1 root root 15K Aug 27 14:59 mod_authz_host.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_authz_owner.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_authz_user.so

-rwxr-xr-x 1 root root 39K Aug 27 14:59 mod_autoindex.so

-rwxr-xr-x 1 root root 19K Aug 27 14:59 mod_brotli.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_bucketeer.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_buffer.so

-rwxr-xr-x 1 root root 71K Aug 27 14:59 mod_cache.so

-rwxr-xr-x 1 root root 35K Aug 27 14:59 mod_cache_disk.so

-rwxr-xr-x 1 root root 35K Aug 27 14:59 mod_cache_socache.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_case_filter.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_case_filter_in.so

-rwxr-xr-x 1 root root 27K Aug 27 14:59 mod_cgi.so

-rwxr-xr-x 1 root root 23K Aug 27 14:59 mod_charset_lite.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_data.so

-rwxr-xr-x 1 root root 111K Aug 27 14:59 mod_dav.so

-rwxr-xr-x 1 root root 51K Aug 27 14:59 mod_dav_fs.so

-rwxr-xr-x 1 root root 19K Aug 27 14:59 mod_dav_lock.so

-rwxr-xr-x 1 root root 23K Aug 27 14:59 mod_dbd.so

-rwxr-xr-x 1 root root 35K Aug 27 14:59 mod_deflate.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_dialup.so

-rwxr-xr-x 1 root root 15K Aug 27 14:59 mod_dir.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_dumpio.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_echo.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_env.so

-rwxr-xr-x 1 root root 15K Aug 27 14:59 mod_expires.so

-rwxr-xr-x 1 root root 23K Aug 27 14:59 mod_ext_filter.so

-rwxr-xr-x 1 root root 15K Aug 27 14:59 mod_file_cache.so

-rwxr-xr-x 1 root root 19K Aug 27 14:59 mod_filter.so

-rwxr-xr-x 1 root root 23K Aug 27 14:59 mod_headers.so

-rwxr-xr-x 1 root root 23K Aug 27 14:59 mod_heartmonitor.so

-rwxr-xr-x 1 root root 260K Aug 27 14:59 mod_http2.so

-rwxr-xr-x 1 root root 15K Aug 27 14:59 mod_imagemap.so

-rwxr-xr-x 1 root root 51K Aug 27 14:59 mod_include.so

-rwxr-xr-x 1 root root 27K Aug 27 14:59 mod_info.so

-rwxr-xr-x 1 root root 6.2K Aug 27 14:59 mod_lbmethod_bybusyness.so

-rwxr-xr-x 1 root root 6.2K Aug 27 14:59 mod_lbmethod_byrequests.so

-rwxr-xr-x 1 root root 6.2K Aug 27 14:59 mod_lbmethod_bytraffic.so

-rwxr-xr-x 1 root root 15K Aug 27 14:59 mod_lbmethod_heartbeat.so

-rwxr-xr-x 1 root root 79K Aug 27 14:59 mod_ldap.so

-rwxr-xr-x 1 root root 31K Aug 27 14:59 mod_log_config.so

-rwxr-xr-x 1 root root 15K Aug 27 14:59 mod_log_debug.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_log_forensic.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_logio.so

-rwxr-xr-x 1 root root 127K Aug 27 14:59 mod_lua.so

-rwxr-xr-x 1 root root 19K Aug 27 14:59 mod_macro.so

-rwxr-xr-x 1 root root 331K Aug 27 14:59 mod_md.so

-rwxr-xr-x 1 root root 23K Aug 27 14:59 mod_mime.so

-rwxr-xr-x 1 root root 27K Aug 27 14:59 mod_mime_magic.so

-rwxr-xr-x 1 root root 35K Aug 27 14:59 mod_negotiation.so

-rwxr-xr-x 1 root root 6.1K Aug 27 14:59 mod_optional_fn_export.so

-rwxr-xr-x 1 root root 6.1K Aug 27 14:59 mod_optional_fn_import.so

-rwxr-xr-x 1 root root 6.1K Aug 27 14:59 mod_optional_hook_export.so

-rwxr-xr-x 1 root root 6.1K Aug 27 14:59 mod_optional_hook_import.so

-rwxr-xr-x 1 root root 151K Aug 27 14:59 mod_proxy.so

-rwxr-xr-x 1 root root 55K Aug 27 14:59 mod_proxy_ajp.so

-rwxr-xr-x 1 root root 63K Aug 27 14:59 mod_proxy_balancer.so

-rwxr-xr-x 1 root root 15K Aug 27 14:59 mod_proxy_connect.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_proxy_express.so

-rwxr-xr-x 1 root root 31K Aug 27 14:59 mod_proxy_fcgi.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_proxy_fdpass.so

-rwxr-xr-x 1 root root 43K Aug 27 14:59 mod_proxy_ftp.so

-rwxr-xr-x 1 root root 35K Aug 27 14:59 mod_proxy_hcheck.so

-rwxr-xr-x 1 root root 35K Aug 27 14:59 mod_proxy_html.so

-rwxr-xr-x 1 root root 39K Aug 27 14:59 mod_proxy_http.so

-rwxr-xr-x 1 root root 67K Aug 27 14:59 mod_proxy_http2.so

-rwxr-xr-x 1 root root 19K Aug 27 14:59 mod_proxy_scgi.so

-rwxr-xr-x 1 root root 19K Aug 27 14:59 mod_proxy_uwsgi.so

-rwxr-xr-x 1 root root 19K Aug 27 14:59 mod_proxy_wstunnel.so

-rwxr-xr-x 1 root root 15K Aug 27 14:59 mod_ratelimit.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_reflector.so

-rwxr-xr-x 1 root root 27K Aug 27 14:59 mod_remoteip.so

-rwxr-xr-x 1 root root 15K Aug 27 14:59 mod_reqtimeout.so

-rwxr-xr-x 1 root root 15K Aug 27 14:59 mod_request.so

-rwxr-xr-x 1 root root 75K Aug 27 14:59 mod_rewrite.so

-rwxr-xr-x 1 root root 39K Aug 27 14:59 mod_sed.so

-rwxr-xr-x 1 root root 23K Aug 27 14:59 mod_session.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_session_cookie.so

-rwxr-xr-x 1 root root 23K Aug 27 14:59 mod_session_crypto.so

-rwxr-xr-x 1 root root 19K Aug 27 14:59 mod_session_dbd.so

-rwxr-xr-x 1 root root 15K Aug 27 14:59 mod_setenvif.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_slotmem_plain.so

-rwxr-xr-x 1 root root 19K Aug 27 14:59 mod_slotmem_shm.so

-rwxr-xr-x 1 root root 15K Aug 27 14:59 mod_socache_dbm.so

-rwxr-xr-x 1 root root 15K Aug 27 14:59 mod_socache_memcache.so

-rwxr-xr-x 1 root root 15K Aug 27 14:59 mod_socache_redis.so

-rwxr-xr-x 1 root root 27K Aug 27 14:59 mod_socache_shmcb.so

-rwxr-xr-x 1 root root 15K Aug 27 14:59 mod_speling.so

-rwxr-xr-x 1 root root 251K Aug 27 14:59 mod_ssl.so

-rwxr-xr-x 1 root root 27K Aug 27 14:59 mod_status.so

-rwxr-xr-x 1 root root 19K Aug 27 14:59 mod_substitute.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_suexec.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_unique_id.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_userdir.so

-rwxr-xr-x 1 root root 15K Aug 27 14:59 mod_usertrack.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_version.so

-rwxr-xr-x 1 root root 11K Aug 27 14:59 mod_vhost_alias.so

-rwxr-xr-x 1 root root 23K Aug 27 14:59 mod_watchdog.so

-rwxr-xr-x 1 root root 23K Aug 27 14:59 mod_xml2enc.so

You need to restart the service afterwards.

1 Like

Perfect, thank you Heitor! Now I know how to proceed next time. Thanks!

I’m glad I could help.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.