awesomesites

Member
Mar 28, 2022
5
0
1
Singapore
cPanel Access Level
Root Administrator
httpd -V command shows the following. Anyone have any idea how to enable IPv4-mapped addresses?

Server loaded: APR 1.7.0, APR-UTIL 1.6.1, PCRE 8.32 2012-11-30
Compiled using: APR 1.7.0, APR-UTIL 1.6.1, PCRE 8.32 2012-11-30
Architecture: 64-bit
Server MPM: event
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses disabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT="/etc/apache2"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="/var/run/apache2/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
 
Last edited by a moderator:

awesomesites

Member
Mar 28, 2022
5
0
1
Singapore
cPanel Access Level
Root Administrator
Thanks for the reply.

This is the issue i am facing. My client's website went down when this is added to the .htaccess file

<IfModule mod_authz_core.c>
<RequireAll>
Require all granted
Require not env DenyAccess
Require not ip ::ffff:X.X.X.X
</RequireAll>
</IfModule>


When i checked the error_log file, i can see that apache doesn't recognise IPv4 Mapped addresss

.htaccess: ip address '::ffff:X.X.X.X' appears to be invalid: The specified IP address is invalid.

I read online that this is due to apache not compiled with IPv4-mapped addresses enabled. So, i am wondering how can i do that.
 

awesomesites

Member
Mar 28, 2022
5
0
1
Singapore
cPanel Access Level
Root Administrator
Yes.

Server loaded: APR 1.7.0, APR-UTIL 1.6.1, PCRE 8.32 2012-11-30
Compiled using: APR 1.7.0, APR-UTIL 1.6.1, PCRE 8.32 2012-11-30
Architecture: 64-bit
Server MPM: event
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses disabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT="/etc/apache2"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="/var/run/apache2/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
11,743
1,868
363
cPanel Access Level
Root Administrator
Thanks for the additional details. I spoke with our developers and confirmed this isn't something that is available on a cPanel machine. Since we don't include that, it would have to be compiled manually in a custom version of Apache.

Is there a reason that user can't just use the IPv4 address in the .htaccess file?
 

awesomesites

Member
Mar 28, 2022
5
0
1
Singapore
cPanel Access Level
Root Administrator
Those are not entered manually. It is managed by a wordpress plugin. Right now we have disabled the feature to prevent the website from going down in the middle of the night when no one is monitoring.

Do you have any articles on things to note when compiling a custom version of apache?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
11,743
1,868
363
cPanel Access Level
Root Administrator
We don't recommend trying to use a custom Apache version on a cPanel machine. cPanel makes so many changes to that service that I wouldn't expect it to work well at all. I'd recommend not using that particular plugin, or contacting the developer of that plugin to see if there is a way to just have it list the IPv4 version of the address.