Showing posts with label CWP. Show all posts
Showing posts with label CWP. Show all posts

Wednesday, April 17, 2024

Saturday, September 2, 2023

Set HTTP to HTTPS redirect in CWP


RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Tuesday, June 20, 2023

How to Setup Web Hosting platform with CWP

hostnamectl set-hostname my.new-hostname.server

sudo vim /etc/hosts

Installer for CentOS 7:


cd /usr/local/src
wget http://centos-webpanel.com/cwp-el7-latest 
sh cwp-el7-latest

Installer for CentOS 8, Alma Linux and Rocky Linux:

cd /usr/local/src 
wget http://centos-webpanel.com/cwp-el8-latest 
sh cwp-el8-latest


Optional Installer Arguments

Available long name arguments
–restart yes (for automatic restart after successfull install)
–phpfpm [5.3|5.4|5.5|5.6|7.0|7.1|7.2|7.3|7.4] (you can use only one)
–softaculous yes (install softaculous – script installer)

Available short name arguments
-r yes (for automatic restart after successfull install)
-p [5.3|5.4|5.5|5.6|7.0|7.1|7.2|7.3|7.4] (you can use only one)
-s yes (install softaculous – script installer)

Example for centos 7 (you can combine short and long name arguments)
sh cwp-el7-latest -r yes --phpfpm 7.3 --softaculous yes

Any of this additionals can be also installed later from cwp gui.

Reboot Server:

Reboot your server so that all updates can take effect and CWP gets started.
reboot

Cloud Linux Installer:

You need to have CloudLinux License.
wget //repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy
sh cldeploy -k YOUR-KEY
cd /usr/local/src/
wget //dl1.centos-webpanel.com/files/c_scripts/cloudlinux.sh
sh cloudlinux.sh


After CloudLinux installer is done it will automatically reboot the server!!
After reboot, you need to build CageFS and enable it:

/usr/sbin/cagefsctl --init
cagefsctl --enable-all




Log in to your CWP server using the link provided by the installer on your server.

Control WebPanel Admin GUI at http://SERVER-IP:2030/
Username: root
Password: YOUR_ROOT_PASSWORDSetup root email
Setup at least one hosting package

Or edit default package.
Setup shared IP

Must be your public IP address.
Setup nameservers


And now you are ready to host domains.

For additional configuration instruction, please check our wiki/documentation site:

Tuesday, June 6, 2023

Install argon2 on centos

yum install -y  libargon2 libargon2-devel

 

Upgrde PHP 7.4/8.0/8.1/8.2 on CWP CentOS 7

You should put PHP version as you need:

Comands are as follows for shell:

--

dnf install oniguruma oniguruma-devel gcc make gcc-c++ cpp kernel-headers.x86_64 libxml2-devel openssl-devel bzip2-devel libjpeg-devel libpng-devel freetype-devel openldap-devel postgresql-devel aspell-devel net-snmp-devel libxslt-devel libc-client-devel libicu-devel gmp-devel curl-devel libmcrypt-devel pcre-devel sqlite-devel libdb-devel enchant-devel libXpm-devel mysql-devel readline-devel libedit-devel recode-devel libtidy-devel libtool-ltdl-devel libwebp libwebp-devel expat expat-devel libmemcached libmemcached-devel


--


dnf install libzip libzip-devel

dnf install cmake zlib-devel


--


cd /usr/local/src

rm -rf libzip*

wget https://libzip.org/download/libzip-1.9.2.tar.gz

tar zxvf libzip*

cd libzip*/

mkdir build

cd build

/usr/bin/cmake3 ..

make && make install


--


cd /usr/local/src

rm -rf pcre2*

wget https://github.com/PhilipHazel/pcre2/releases/download/pcre2-10.41/pcre2-10.41.zip -O pcre2.zip

unzip pcre2.zip

cd pcre2-*/

./configure

make && make install


--


cd /usr/local/src

rm -rf master* libavif-master*

wget https://github.com/AOMediaCodec/libavif/archive/refs/heads/master.zip

unzip master.zip

cd libavif-main

mkdir build-dir

cd build-dir

cmake ..

make

make install


--


export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig


--


mkdir -p /usr/local/php-82

cd /usr/local/php-82

wget http://php.net/distributions/php-8.2.0.tar.gz

tar zxvf php-8.2.0.tar.gz

cd php-8.2.0

./configure --with-config-file-path=/usr/local/php --enable-cgi --with-config-file-scan-dir=/usr/local/php/php.d --with-zlib=/usr --enable-mbstring --with-zip --enable-bcmath --enable-pcntl --enable-ftp --enable-exif --enable-calendar --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-tidy --with-curl --with-iconv --with-gmp --with-pspell --enable-gd --with-avif --with-jpeg --with-freetype --enable-gd-jis-conv --with-webp --with-zlib-dir=/usr --with-xpm --with-openssl --with-pdo-mysql=mysqlnd --with-gettext=/usr --with-bz2=/usr --with-mysqli --enable-soap --enable-phar --with-xsl --with-kerberos --enable-posix --enable-sockets --with-external-pcre --with-libdir=lib64 --with-mysql-sock=/var/lib/mysql/mysql.sock --enable-intl --with-password-argon2 --enable-litespeed --with-ldap=/usr --with-ldap-sasl=/usr 

make

make install


--


php -v


You should see (if all went well):


PHP 8.2.0 (cli) (built: Dec 12 2022 17:57:50) (NTS)

Copyright (c) The PHP Group

Zend Engine v4.2.0, Copyright (c) Zend Technologies

Extract Domain from email in Excel or Google sheet

  =TEXTAFTER( A2 , "@") or, =MID(A1, FIND("@", A1) + 1, LEN(A1) - FIND("@", A1))