Sentora Support Forums
How to update Apache to 2.4.x - Printable Version

+- Sentora Support Forums (https://senforums.mach-hosting.com)
+-- Forum: Sentora Forum Archives (https://senforums.mach-hosting.com/forumdisplay.php?fid=5)
+--- Forum: Sentora Public Support Forums v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=32)
+---- Forum: Sentora on Windows (Un-Official) v1.0 (https://senforums.mach-hosting.com/forumdisplay.php?fid=61)
+---- Thread: How to update Apache to 2.4.x (/showthread.php?tid=4217)



How to update Apache to 2.4.x - AlexeyDr - 11-19-2017

Greats to you all!

In the beginning of 2017 if have updated my zpanel (running 2012 server std) to 10.1.1 and then used
http://forums.sentora.org/showthread.php?tid=2198 tutorial to update to Sentora 1.0.3

Now i have a problem with security on my server, seems that because of old Apache or myphpadmin.
That problem allows hacker to create user on my server...

Code:
C:\Windows\System32>httpd -v Server version: Apache/2.4.3 (Win32) Server built: Aug 18 2012 12:41:37

When I close Apache port on Windows firewall - problem disappears
Should I update my Apache and PHPmyAdmin? How to localize a problem? How to Update Apache?
Maybe will be better to install http://awserver.ru/ ?
Huge respect for any help...


RE: How to update Apache to 2.4.x - Me.B - 11-20-2017

When you update to apache 2.4 the vhosts config change and so it will cause issues.

So take care.

M B


RE: How to update Apache to 2.4.x - TGates - 11-21-2017

AWServer is a good solution but I do not know if he is keeping it updated at this time. I haven't heard from him in a while.
Although, in both versions, some newer modules may break as they are not setup to use ZPanel file and folder paths Sad

The best solution? Switch to either Ubuntu 14.04 or CentOS 7 operating systems.


RE: How to update Apache to 2.4.x - AlexeyDr - 11-21-2017

(11-21-2017, 06:34 AM)TGates Wrote: AWServer is a good solution but I do not know if he is keeping it updated at this time. I haven't heard from him in a while.
Although, in both versions, some newer modules may break as they are not setup to use ZPanel file and folder paths Sad

The best solution? Switch to either Ubuntu 14.04 or CentOS 7 operating systems.

Dear forumers!  Thank you  for your kind support!

In  my  case  Control  panel  content  isnt  a  problem  to  deal  with. But  i  cant  switch  to  another OS.
What  is  the easiest  way  to  find and  investigate traces of  hacker  activity? Should  i  look  into  Apache  logs?


RE: How to update Apache to 2.4.x - TGates - 11-21-2017

Yes, apache logs, auth logs, ftp logs.. anything you can find to pin point where your server is compromised. If you can narrow it down to a specific site, then you can check that site's access and error logs for even more information.


RE: How to update Apache to 2.4.x - muratkaragoz - 05-24-2020

If you want to upgrade Apache from 2.2 to 2.4 , you should check this page: https://httpd.apache.org/docs/2.4/upgrading.html

I have upgraded it to Apache 2.4.4.3 . I have changed  OnDaemonRun.hook.php file in      C:\Sentora\panel\modules\apache_admin\hooks


Code:
2.2 configuration: Order deny,allow Deny from all 2.4 configuration: Require all denied


You should also check .htaccess files for "Order deny,..." modification. 
You had better use Notepad++ . It allows you to search in files quickly.

Apache 2.2 has security vulnerabilities. You can check them at https://www.cvedetails.com/vulnerability-list/vendor_id-45/product_id-66/version_id-35676/Apache-Http-Server-2.2.html


RE: How to update Apache to 2.4.x - andykimpe - 07-01-2020

yes this version is latest compatibility binary for php5

https://www.apachelounge.com/download/VC11/

just stop service apache

backup httpd.conf and php.ini

php latest php 5.6.40

https://windows.php.net/downloads/releases/archives/php-5.6.40-Win32-VC11-x86.zip

https://windows.php.net/downloads/releases/archives/php-5.6.40-nts-Win32-VC11-x64.zip

suhosin 0.9.38 for php 5.6

32 bit

https://github.com/andykimpe/suhosin-windows/raw/master/binary/ts/x86/php-5.6.7/php_suhosin.dll

64 bit

https://github.com/andykimpe/suhosin-windows/raw/master/binary/ts/x64/php-5.6.7/php_suhosin.dll

if you want the latest version of apache

2.4.43 it will have to be recompiled here is a batch which does it almost automatically

Code:
@echo off rem check admin or force enable admin mode echo "admin" > C:\Windows\System32\admin IF EXIST "C:\Windows\System32\admin" (GOTO gotAdmin) ELSE (GOTO UACPrompt) :UACPrompt echo "no admin"    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"    set params = %*:"="    echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"    "%temp%\getadmin.vbs"    del "%temp%\getadmin.vbs" exit :gotAdmin echo "admin" > C:\Windows\System32\admin del C:\Windows\System32\admin echo "admin2" > C:\Windows\System32\admin2 IF EXIST "C:\Windows\System32\admin2" (GOTO endAdmin) ELSE (GOTO UACPrompt) :endAdmin del C:\Windows\System32\admin2 rem start script rem check cygwin installed or install IF EXIST "C:\cygwin\bin\wget.exe" (GOTO ENDCYGWIN) IF EXIST "C:\setup-x86.exe" (GOTO INSTALLCYGWIN) ELSE (GOTO CYGWIN) :CYGWIN echo "please download cygwin 32bit version" echo "and place file setup-x86.exe in C:\" pause IF EXIST "C:\setup-x86.exe" (GOTO INSTALLCYGWIN) ELSE (GOTO CYGWIN) :INSTALLCYGWIN C:\setup-x86.exe --arch x86 --root C:\Cygwin --quiet-mode --packages wget,unzip,zip --site http://cygwin.mirrors.pair.com :ENDCYGWIN SET OLDPATH=%PATH% SET PATH=%PATH%;C:\Cygwin\bin rem download and install visual studio 2012 (VC11) wget https://download.microsoft.com/download/D/E/8/DE8E42D8-7598-4F4E-93D4-BB011094E2F9/VS2012_PRO_enu.iso -O C:\VS2012_PRO_enu.iso rem wget http://download.microsoft.com/download/9/B/8/9B8A9C12-66E2-42CF-9E67-F94A3E872020/VS2012_WDX_FRA.iso -O C:\VS2012_WDX_FRA.iso PowerShell Mount-DiskImage C:\VS2012_PRO_enu.iso rem PowerShell Mount-DiskImage C:\VS2012_WDX_FRA.iso IF EXIST "D:\vs_professional.exe" (GOTO VCDFINAL) ELSE (GOTO VCE) rem IF EXIST "D:\wdexpress_full.exe" (GOTO VCDFINAL) ELSE (GOTO VCE) :VCDFINAL D:\vs_professional.exe /q /norestart timeout /t 250 > null rem D:\wdexpress_full.exe /q /norestart GOTO VCEND :VCE IF EXIST "E:\vs_professional.exe" (GOTO VCEFINAL) ELSE (GOTO VCF) rem IF EXIST "E:\wdexpress_full.exe" (GOTO VCEFINAL) ELSE (GOTO VCF) :VCEFINAL E:\vs_professional.exe /q /norestart timeout /t 250 > null rem E:\wdexpress_full.exe /q /norestart GOTO VCEND :VCF IF EXIST "F:\vs_professional.exe" (GOTO VCFFINAL) ELSE (GOTO VCG) rem IF EXIST "F:\wdexpress_full.exe" (GOTO VCFFINAL) ELSE (GOTO VCG) :VCFFINAL F:\vs_professional.exe /q /norestart timeout /t 250 > null rem F:\wdexpress_full.exe /q /norestart GOTO VCEND :VCG IF EXIST "G:\vs_professional.exe" (GOTO VCGFINAL) ELSE (GOTO VHG) rem IF EXIST "G:\wdexpress_full.exe" (GOTO VCGFINAL) ELSE (GOTO VHG) :VCGFINAL G:\vs_professional.exe /q /norestart timeout /t 250 > null rem G:\wdexpress_full.exe /q /norestart GOTO VCEND :VHG H:\vs_professional.exe /q /norestart timeout /t 250 > null rem H:\wdexpress_full.exe /q /norestart :VCEND PowerShell Dismount-DiskImage C:\VS2012_PRO_enu.iso rem PowerShell Dismount-DiskImage C:\VS2012_WDX_FRA.iso del C:\VS2012_WDX_FRA.iso rem variable 32 or 64 bit :64BIT SET VC="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" SET WINARCH=64 SET ARCH=x64 GOTO NEXT64 :32BIT SET VC="C:\Program Files\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" SET WINARCH=32 SET ARCH=x86 :NEXT64 rem install nasm cd C:\ wget https://www.nasm.us/pub/nasm/releasebuilds/2.15.01/win%WINARCH%/nasm-2.15.01-win%WINARCH%.zip unzip nasm-2.15.01-win%WINARCH%.zip del nasm-2.15.01-win%WINARCH%.zip SET PATH=%PATH%;C:\nasm-2.15.01 rem install perl (strawberry-perl) wget http://strawberryperl.com/download/5.30.2.1/strawberry-perl-5.30.2.1-%WINARCH%bit.msi msiexec /i C:\strawberry-perl-5.30.2.1-%WINARCH%bit.msi /q /norestart timeout /t 20 > null del C:\strawberry-perl-5.30.2.1-%WINARCH%bit.msi SET PATH=%PATH%;C:\Strawberry\perl\bin rem install cmake wget https://github.com/Kitware/CMake/releases/download/v3.18.0-rc2/cmake-3.18.0-rc2-win%WINARCH%-%ARCH%.msi msiexec /i C:\cmake-3.18.0-rc2-win%WINARCH%-%ARCH%.msi /q /norestart timeout /t 30 > null del C:\cmake-3.18.0-rc2-win%WINARCH%-%ARCH%.msi SET PATH=%PATH%;C:\Program Files\CMake\bin IF EXIST "%PROGRAMFILES(X86)%" (GOTO END64) ELSE (GOTO END) :END64 call %VC% amd64 mkdir C:\Development mkdir C:\Development\Apache24\ mkdir C:\Development\Apache24\src mkdir C:\Development\Apache24\build\pcre mkdir C:\Development\Apache24\build\apr mkdir C:\Development\Apache24\build\apr-util mkdir C:\Development\Apache24\build\httpd mkdir C:\Development\Apache24\build\expat cd C:\Development\Apache24\src wget http://ftp.pcre.org/pub/pcre/pcre-8.44.zip unzip C:\Development\Apache24\src\pcre-8.44.zip cd C:\Development\Apache24\build\pcre cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=C:\Apache24 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=ON -DPCRE_BUILD_TESTS=OFF -DPCRE_BUILD_PCRECPP=OFF -DPCRE_BUILD_PCREGREP=OFF -DPCRE_SUPPORT_PCREGREP_JIT=OFF -DPCRE_SUPPORT_UTF=ON -DPCRE_SUPPORT_UNICODE_PROPERTIES=ON -DPCRE_NEWLINE=CRLF -DINSTALL_MSVC_PDB=OFF ..\..\src\pcre-8.44 nmake nmake install cd C:\Development\Apache24\src wget --no-check-certificate https://www.openssl.org/source/openssl-1.1.1g.tar.gz gzip -d openssl-1.1.1g.tar.gz tar -xvf openssl-1.1.1g.tar cd C:\Development\Apache24\src\openssl-1.1.1g perl Configure VC-WIN64A --prefix=C:\Apache24 --openssldir=C:\Apache24\conf enable-camellia no-idea no-mdc2 no-ssl2 no-ssl3 no-zlib nmake nmake install cd C:\Development\Apache24\src wget --no-check-certificate https://apache.mirrors.benatherton.com/apr/apr-1.7.0-win32-src.zip unzip apr-1.7.0-win32-src.zip cd C:\Development\Apache24\build\apr cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=C:\Apache24 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DMIN_WINDOWS_VER=0x0600 -DAPR_HAVE_IPV6=ON -DAPR_INSTALL_PRIVATE_H=ON -DAPR_BUILD_TESTAPR=OFF -DINSTALL_PDB=OFF ..\..\src\apr-1.7.0 nmake nmake install cd C:\Development\Apache24\src C:\wget\bin\wget.exe --no-check-certificate http://github.com/libexpat/libexpat/releases/download/R_2_2_9/expat-2.2.9.tar.gz gzip -d expat-2.2.9.tar.gz tar -xvf expat-2.2.9.tar cd C:\Development\Apache24\build\expat cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=C:\Apache24 -DOPENSSL_ROOT_DIR=C:\Apache24 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DAPU_HAVE_CRYPTO=ON -DAPR_BUILD_TESTAPR=OFF -DINSTALL_PDB=OFF ..\..\src\expat-2.2.9 nmake nmake install cd C:\Development\Apache24\src wget --no-check-certificate https://apache.mirrors.benatherton.com//apr/apr-util-1.6.1-win32-src.zip unzip apr-util-1.6.1-win32-src.zip cd C:\Development\Apache24\build\apr-util cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=C:\Apache24 -DOPENSSL_ROOT_DIR=C:\Apache24 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DAPU_HAVE_CRYPTO=ON -DAPR_BUILD_TESTAPR=OFF -DINSTALL_PDB=OFF ..\..\src\apr-util-1.6.1 nmake nmake install cd C:\Development\Apache24\src wget --no-check-certificate http://us.mirrors.quenda.co/apache//httpd/httpd-2.4.43.tar.gz gzip -d httpd-2.4.43.tar.gz tar -xvf httpd-2.4.43.tar cd C:\Development\Apache24\build\httpd cd C:\Development\Apache24\build\httpd cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=C:\Apache24 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_MODULES=i -DINSTALL_PDB=OFF ..\..\src\httpd-2.4.43 nmake nmake install :END call %VC% x86 mkdir C:\Development mkdir C:\Development\Apache24\ mkdir C:\Development\Apache24\src mkdir C:\Development\Apache24\build\pcre mkdir C:\Development\Apache24\build\apr mkdir C:\Development\Apache24\build\apr-util mkdir C:\Development\Apache24\build\httpd mkdir C:\Development\Apache24\build\expat cd C:\Development\Apache24\src wget http://ftp.pcre.org/pub/pcre/pcre-8.44.zip unzip C:\Development\Apache24\src\pcre-8.44.zip cd C:\Development\Apache24\build\pcre cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=C:\Apache24 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=ON -DPCRE_BUILD_TESTS=OFF -DPCRE_BUILD_PCRECPP=OFF -DPCRE_BUILD_PCREGREP=OFF -DPCRE_SUPPORT_PCREGREP_JIT=OFF -DPCRE_SUPPORT_UTF=ON -DPCRE_SUPPORT_UNICODE_PROPERTIES=ON -DPCRE_NEWLINE=CRLF -DINSTALL_MSVC_PDB=OFF ..\..\src\pcre-8.44 nmake nmake install cd C:\Development\Apache24\src wget --no-check-certificate https://www.openssl.org/source/openssl-1.1.1g.tar.gz gzip -d openssl-1.1.1g.tar.gz tar -xvf openssl-1.1.1g.tar cd C:\Development\Apache24\src\openssl-1.1.1g perl Configure VC-WIN32 --prefix=C:\Apache24 --openssldir=C:\Apache24\conf enable-camellia no-idea no-mdc2 no-ssl2 no-ssl3 no-zlib nmake nmake install cd C:\Development\Apache24\src wget --no-check-certificate https://apache.mirrors.benatherton.com/apr/apr-1.7.0-win32-src.zip unzip apr-1.7.0-win32-src.zip cd C:\Development\Apache24\build\apr cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=C:\Apache24 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DMIN_WINDOWS_VER=0x0600 -DAPR_HAVE_IPV6=ON -DAPR_INSTALL_PRIVATE_H=ON -DAPR_BUILD_TESTAPR=OFF -DINSTALL_PDB=OFF ..\..\src\apr-1.7.0 nmake nmake install cd C:\Development\Apache24\src C:\wget\bin\wget.exe --no-check-certificate http://github.com/libexpat/libexpat/releases/download/R_2_2_9/expat-2.2.9.tar.gz gzip -d expat-2.2.9.tar.gz tar -xvf expat-2.2.9.tar cd C:\Development\Apache24\build\expat cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=C:\Apache24 -DOPENSSL_ROOT_DIR=C:\Apache24 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DAPU_HAVE_CRYPTO=ON -DAPR_BUILD_TESTAPR=OFF -DINSTALL_PDB=OFF ..\..\src\expat-2.2.9 nmake nmake install cd C:\Development\Apache24\src wget --no-check-certificate https://apache.mirrors.benatherton.com//apr/apr-util-1.6.1-win32-src.zip unzip apr-util-1.6.1-win32-src.zip cd C:\Development\Apache24\build\apr-util cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=C:\Apache24 -DOPENSSL_ROOT_DIR=C:\Apache24 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DAPU_HAVE_CRYPTO=ON -DAPR_BUILD_TESTAPR=OFF -DINSTALL_PDB=OFF ..\..\src\apr-util-1.6.1 nmake nmake install cd C:\Development\Apache24\src wget --no-check-certificate http://us.mirrors.quenda.co/apache//httpd/httpd-2.4.43.tar.gz gzip -d httpd-2.4.43.tar.gz tar -xvf httpd-2.4.43.tar cd C:\Development\Apache24\build\httpd cd C:\Development\Apache24\build\httpd cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=C:\Apache24 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_MODULES=i -DINSTALL_PDB=OFF ..\..\src\httpd-2.4.43 nmake nmake install cd C:\ zip -r httpd-2.4.43-win32-VC11.zip Apache24 rmdir /S /Q C:\Apache24 rmdir /S /Q C:\Development rmdir /S /Q C:\nasm-2.15.01 SET PATH=%OLDPATH%