KrasniyRus

Member
Dec 23, 2016
20
1
3
Russia
cPanel Access Level
Root Administrator
Hello,

I have installed Magento 2.2.2 version via Softaculous and instantly when the website is accessed "Internal Server Error" message occur. I have checked the Apache error log and noticed the following message:
Code:
[Sat Dec 23 22:28:41.395892 2017] [core:alert] [pid 423060:tid 140020161705728] [client xxx.xxx.xxx.xxx:51271] /home/user/example.com/.htaccess: Invalid command '<IfVersion', perhaps misspelled or defined by a module not included in the server configuration, referer: [URL]http://example.com.com/[/URL]
I have researched over the net for a solution and it occur that such issue could be caused due to missing mod_version in Apache. I have tried to install the same with the following command:

/usr/bin/apxs -c -i mod_version.c

The console output of the command above is:
Code:
/opt/cpanel/ea-apr15/lib64/apr-1/build/libtool --silent --mode=compile gcc -std=gnu99 -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/apache2  -I/opt/cpanel/ea-apr15/include/apr-1   -I/opt/cpanel/ea-apr15/include/apr-1   -c -o mod_version.lo mod_version.c && touch mod_version.slo
/opt/cpanel/ea-apr15/lib64/apr-1/build/libtool --silent --mode=link gcc -std=gnu99 -Wl,-z,relro,-z,now   -o mod_version.la  -rpath /usr/lib64/apache2/modules -module -avoid-version    mod_version.lo
/usr/lib64/apache2/build/instdso.sh SH_LIBTOOL='/opt/cpanel/ea-apr15/lib64/apr-1/build/libtool' mod_version.la /usr/lib64/apache2/modules
/opt/cpanel/ea-apr15/lib64/apr-1/build/libtool --mode=install install mod_version.la /usr/lib64/apache2/modules/
libtool: install: install .libs/mod_version.so /usr/lib64/apache2/modules/mod_version.so
libtool: install: install .libs/mod_version.lai /usr/lib64/apache2/modules/mod_version.la
libtool: install: install .libs/mod_version.a /usr/lib64/apache2/modules/mod_version.a
libtool: install: chmod 644 /usr/lib64/apache2/modules/mod_version.a
libtool: install: ranlib /usr/lib64/apache2/modules/mod_version.a
libtool: finish: PATH="/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/cpanel/composer/bin:/root/bin:/sbin" ldconfig -n /usr/lib64/apache2/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/lib64/apache2/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
chmod 755 /usr/lib64/apache2/modules/mod_version.so
I have checked the mod_version.so in the provided directory and the same is available with correct permissions.

I am using cPanel v68.0.21 with CloudLinux on CentOS 6.9 KVM. Any suggestion and insights are welcome, thank you in advance!
 
Last edited by a moderator: