Skip to content

Instantly share code, notes, and snippets.

@andriilive
Last active August 28, 2024 01:07
Show Gist options
  • Save andriilive/049c3cc9e77010cbd1528c21c8e1ff55 to your computer and use it in GitHub Desktop.
Save andriilive/049c3cc9e77010cbd1528c21c8e1ff55 to your computer and use it in GitHub Desktop.
Wordpress Utils

OLS 20.04 Setup From Digitalocean Droplet

Build custom

https://github.com/litespeedtech/ls-cloud-image/wiki/Build-WordPress-Image

Serv

Admin Panel Conf

drwxr-x---  5 lsadm www-data 4096 Aug 27 10:10 .
drwxr-xr-x 24 root  root     4096 Feb  8  2024 ..
drwxr-x---  2 lsadm www-data 4096 Feb  5  2024 cert
-rwxr-x---  1 lsadm www-data 1651 Feb  8  2024 example.crt
-rwxr-x---  1 lsadm www-data 1704 Feb  8  2024 example.key
-rwxr-x---  1 lsadm www-data 8437 Aug 27 10:10 httpd_config.conf
-rwxr-x---  1 lsadm www-data 7637 Feb  5  2024 httpd_config.conf.dpkg
-rwxr-x---  1 lsadm www-data 5562 Aug 28 00:00 httpd_config.conf.txt
-rwxr-x---  1 root  root     8437 Aug 27 10:10 httpd_config.conf0
-r-xr-x---  1 root  root     9891 Aug 27 10:10 httpd_config.conf0,v
-rwxr-x---  1 lsadm www-data 5123 Feb  5  2024 mime.properties
-rwxr-x---  1 lsadm www-data 5123 Feb  8  2024 mime.properties0
-rwxr-x---  1 lsadm www-data 5338 Feb  8  2024 mime.properties0,v
drwxr-x---  2 lsadm www-data 4096 Feb  8  2024 templates
drwxr-x---  4 lsadm www-data 4096 Feb  8  2024 vhosts

Wordpress Vhost

batcat /usr/local/lsws/conf/vhosts/wordpress*/* --paging never
───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: /usr/local/lsws/conf/vhosts/wordpress/vhconf.conf
───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ docRoot                   /var/www/html/
   2   │
   3   │ index  {
   4   │   useServer               0
   5   │   indexFiles              index.php index.html
   6   │ }
   7   │
   8   │ context /phpmyadmin/ {
   9   │   location                /var/www/phpmyadmin
  10   │   allowBrowse             1
  11   │   indexFiles              index.php
  12   │
  13   │   accessControl  {
  14   │     allow                 *
  15   │   }
  16   │
  17   │   rewrite  {
  18   │     enable                0
  19   │     inherit               0
  20   │
  21   │   }
  22   │   addDefaultCharset       off
  23   │
  24   │   phpIniOverride  {
  25   │
  26   │   }
  27   │ }
  28   │
  29   │ rewrite  {
  30   │   enable                1
  31   │   autoLoadHtaccess        1
  32   │ }
  33   │ vhssl  {
  34   │             keyFile                 /etc/letsencrypt/live/iphonehub.cz/privkey.pem
  35   │             certFile                /etc/letsencrypt/live/iphonehub.cz/fullchain.pem
  36   │             certChain               1
  37   │         }
───────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: /usr/local/lsws/conf/vhosts/wordpress/vhconf.conf.txt
───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ docroot /var/www/html/
   2   │
   3   │ rewrite  {
   4   │     enable 1
   5   │     autoloadhtaccess 1
   6   │ }
   7   │
   8   │ context /phpmyadmin/ {
   9   │     location /var/www/phpmyadmin
  10   │     adddefaultcharset off
  11   │     phpinioverride
  12   │     indexfiles index.php
  13   │     allowbrowse 1
  14   │
  15   │     rewrite  {
  16   │         enable 0
  17   │         inherit 0
  18   │     }
  19   │
  20   │     accesscontrol  {
  21   │         allow *
  22   │     }
  23   │ }
  24   │
  25   │ vhssl  {
  26   │     keyfile /etc/letsencrypt/live/iphonehub.cz/privkey.pem
  27   │     certfile /etc/letsencrypt/live/iphonehub.cz/fullchain.pem
  28   │     certchain 1
  29   │ }
  30   │
  31   │ index  {
  32   │     indexfiles index.php index.html
  33   │     useserver 0
  34   │ }
───────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: /usr/local/lsws/conf/vhosts/wordpress/vhconf.conf0
───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ docRoot                   /var/www/html/
   2   │
   3   │ index  {
   4   │   useServer               0
   5   │   indexFiles              index.php index.html
   6   │ }
   7   │
   8   │ context /phpmyadmin/ {
   9   │   location                /var/www/phpmyadmin
  10   │   allowBrowse             1
  11   │   indexFiles              index.php
  12   │
  13   │   accessControl  {
  14   │     allow                 *
  15   │   }
  16   │
  17   │   rewrite  {
  18   │     enable                0
  19   │     inherit               0
  20   │
  21   │   }
  22   │   addDefaultCharset       off
  23   │
  24   │   phpIniOverride  {
  25   │
  26   │   }
  27   │ }
  28   │
  29   │ rewrite  {
  30   │   enable                1
  31   │   autoLoadHtaccess        1
  32   │ }
  33   │ vhssl  {
  34   │             keyFile                 /etc/letsencrypt/live/iphonehub.cz/privkey.pem
  35   │             certFile                /etc/letsencrypt/live/iphonehub.cz/fullchain.pem
  36   │             certChain               1
  37   │         }
───────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: /usr/local/lsws/conf/vhosts/wordpress/vhconf.conf0,v
───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ head    1.3;
   2   │ access;
   3   │ symbols;
   4   │ locks
   5   │     root:1.3; strict;
   6   │ comment @# @;
   7   │
   8   │
   9   │ 1.3
  10   │ date    2024.08.27.10.10.48;    author root;    state Exp;
  11   │ branches;
  12   │ next    1.2;
  13   │
  14   │ 1.2
  15   │ date    2024.02.08.06.09.09;    author root;    state Exp;
  16   │ branches;
  17   │ next    1.1;
  18   │
  19   │ 1.1
  20   │ date    2024.02.08.06.07.56;    author root;    state Exp;
  21   │ branches;
  22   │ next    ;
  23   │
  24   │
  25   │ desc
  26   │ @/usr/local/lsws/conf/vhosts/wordpress/vhconf.conf0
  27   │ @
  28   │
  29   │
  30   │ 1.3
  31   │ log
  32   │ @Update
  33   │ @
  34   │ text
  35   │ @docRoot                   /var/www/html/
  36   │
  37   │ index  {
  38   │   useServer               0
  39   │   indexFiles              index.php index.html
  40   │ }
  41   │
  42   │ context /phpmyadmin/ {
  43   │   location                /var/www/phpmyadmin
  44   │   allowBrowse             1
  45   │   indexFiles              index.php
  46   │
  47   │   accessControl  {
  48   │     allow                 *
  49   │   }
  50   │
  51   │   rewrite  {
  52   │     enable                0
  53   │     inherit               0
  54   │
  55   │   }
  56   │   addDefaultCharset       off
  57   │
  58   │   phpIniOverride  {
  59   │
  60   │   }
  61   │ }
  62   │
  63   │ rewrite  {
  64   │   enable                1
  65   │   autoLoadHtaccess        1
  66   │ }
  67   │ vhssl  {
  68   │             keyFile                 /etc/letsencrypt/live/iphonehub.cz/privkey.pem
  69   │             certFile                /etc/letsencrypt/live/iphonehub.cz/fullchain.pem
  70   │             certChain               1
  71   │         }
  72   │ @
  73   │
  74   │
  75   │ 1.2
  76   │ log
  77   │ @Update
  78   │ @
  79   │ text
  80   │ @d33 5
  81   │ @
  82   │
  83   │
  84   │ 1.1
  85   │ log
  86   │ @Update
  87   │ @
  88   │ text
  89   │ @d1 2
  90   │ a2 1
  91   │ docRoot                   $VH_ROOT/
  92   │ d5 1
  93   │ a5 1
  94   │   indexFiles              index.php
  95   │ d8 2
  96   │ a9 2
  97   │ context / {
  98   │   location                $VH_ROOT
  99   │ d13 4
 100   │ d18 8
 101   │ a25 3
 102   │     enable                1
 103   │     inherit               1
 104   │     rewriteFile           /var/www/html.old/.htaccess
 105   │ d30 1
 106   │ a30 1
 107   │   enable                  1
 108   │ a32 1
 109   │
 110   │ @
/usr/bin

lrwxrwxrwx  1 root root          31 Feb  8  2024  php -> /usr/local/lsws/lsphp81/bin/php
lrwxrwxrwx  1 root root           7 Feb  1  2024  mysql -> mariadb
lrwxrwxrwx  1 root root          28 Feb  1  2024  mysql_convert_table_format -> mariadb-convert-table-format
lrwxrwxrwx  1 root root          17 Feb  1  2024  mysql_find_rows -> mariadb-find-rows
lrwxrwxrwx  1 root root          22 Feb  1  2024  mysql_fix_extensions -> mariadb-fix-extensions
lrwxrwxrwx  1 root root          18 Feb  1  2024  mysql_install_db -> mariadb-install-db
lrwxrwxrwx  1 root root          14 Feb  1  2024  mysql_plugin -> mariadb-plugin
lrwxrwxrwx  1 root root          27 Feb  1  2024  mysql_secure_installation -> mariadb-secure-installation
lrwxrwxrwx  1 root root          21 Feb  1  2024  mysql_setpermission -> mariadb-setpermission
lrwxrwxrwx  1 root root          21 Feb  1  2024  mysql_tzinfo_to_sql -> mariadb-tzinfo-to-sql
lrwxrwxrwx  1 root root          15 Feb  1  2024  mysql_upgrade -> mariadb-upgrade
lrwxrwxrwx  1 root root          15 Feb  1  2024  mysql_waitpid -> mariadb-waitpid
lrwxrwxrwx  1 root root          14 Feb  1  2024  mysqlaccess -> mariadb-access
lrwxrwxrwx  1 root root          13 Feb  1  2024  mysqladmin -> mariadb-admin
lrwxrwxrwx  1 root root          13 Feb  1  2024  mysqlanalyze -> mariadb-check
lrwxrwxrwx  1 root root          14 Feb  1  2024  mysqlbinlog -> mariadb-binlog
lrwxrwxrwx  1 root root          13 Feb  1  2024  mysqlcheck -> mariadb-check
lrwxrwxrwx  1 root root          14 Feb  1  2024  mysqld_multi -> mariadbd-multi
lrwxrwxrwx  1 root root          13 Feb  1  2024  mysqld_safe -> mariadbd-safe
lrwxrwxrwx  1 root root          20 Feb  1  2024  mysqld_safe_helper -> mariadbd-safe-helper
lrwxrwxrwx  1 root root          12 Feb  1  2024  mysqldump -> mariadb-dump
lrwxrwxrwx  1 root root          16 Feb  1  2024  mysqldumpslow -> mariadb-dumpslow
lrwxrwxrwx  1 root root          15 Feb  1  2024  mysqlhotcopy -> mariadb-hotcopy
lrwxrwxrwx  1 root root          14 Feb  1  2024  mysqlimport -> mariadb-import
lrwxrwxrwx  1 root root          13 Feb  1  2024  mysqloptimize -> mariadb-check
lrwxrwxrwx  1 root root          13 Feb  1  2024  mysqlrepair -> mariadb-check
lrwxrwxrwx  1 root root          14 Feb  1  2024  mysqlreport -> mariadb-report
lrwxrwxrwx  1 root root          12 Feb  1  2024  mysqlshow -> mariadb-show
lrwxrwxrwx  1 root root          12 Feb  1  2024  mysqlslap -> mariadb-slap

-rwxr-xr-x  1 root root     5336816 Feb  1  2024  mariadb
-rwxr-xr-x  1 root root      111933 Feb  1  2024  mariadb-access
-rwxr-xr-x  1 root root     5073400 Feb  1  2024  mariadb-admin
lrwxrwxrwx  1 root root          13 Feb  1  2024  mariadb-analyze -> mariadb-check
-rwxr-xr-x  1 root root     5387440 Feb  1  2024  mariadb-binlog
-rwxr-xr-x  1 root root     5066648 Feb  1  2024  mariadb-check
-rwxr-xr-x  1 root root     4795600 Feb  1  2024  mariadb-conv
-rwxr-xr-x  1 root root        4221 Feb  1  2024  mariadb-convert-table-format
-rwxr-xr-x  1 root root     5162168 Feb  1  2024  mariadb-dump
-rwxr-xr-x  1 root root        8242 Feb  1  2024  mariadb-dumpslow
-rwxr-xr-x  1 root root        3290 Feb  1  2024  mariadb-find-rows
-rwxr-xr-x  1 root root        1250 Feb  1  2024  mariadb-fix-extensions
-rwxr-xr-x  1 root root       35344 Feb  1  2024  mariadb-hotcopy
-rwxr-xr-x  1 root root     5061400 Feb  1  2024  mariadb-import
-rwxr-xr-x  1 root root       23449 Feb  1  2024  mariadb-install-db
lrwxrwxrwx  1 root root          13 Feb  1  2024  mariadb-optimize -> mariadb-check
-rwxr-xr-x  1 root root     4747160 Feb  1  2024  mariadb-plugin
lrwxrwxrwx  1 root root          13 Feb  1  2024  mariadb-repair -> mariadb-check
-rwxr-xr-x  1 root root       50201 Feb  1  2024  mariadb-report
-rwxr-xr-x  1 root root       13699 Feb  1  2024  mariadb-secure-installation
-rwxr-xr-x  1 root root        2506 Feb  1  2024  mariadb-service-convert
-rwxr-xr-x  1 root root       17977 Feb  1  2024  mariadb-setpermission
-rwxr-xr-x  1 root root     5059928 Feb  1  2024  mariadb-show
-rwxr-xr-x  1 root root     5079160 Feb  1  2024  mariadb-slap
-rwxr-xr-x  1 root root     4746488 Feb  1  2024  mariadb-tzinfo-to-sql
-rwxr-xr-x  1 root root     5201784 Feb  1  2024  mariadb-upgrade
-rwxr-xr-x  1 root root     4733944 Feb  1  2024  mariadb-waitpid
lrwxrwxrwx  1 root root          13 Feb  1  2024  mariadbcheck -> mariadb-check
-rwxr-xr-x  1 root root       27335 Feb  1  2024  mariadbd-multi
-rwxr-xr-x  1 root root       31145 Feb  1  2024  mariadbd-safe
-rwxr-xr-x  1 root root     4708632 Feb  1  2024  mariadbd-safe-helper
/usr/local/bin -> wp

ls -la /var/www
total 20
drwxr-xr-x  5 www-data www-data  4096 Aug 27 10:56 .
drwxr-xr-x 14 root     root      4096 Feb  8  2024 ..
drwxr-xr-x  5 www-data wordpress 4096 Aug 27 22:57 html
drwxr-xr-x  2 www-data www-data  4096 Feb  8  2024 html.land
srwxrwx---  1 www-data www-data     0 Aug 27 10:56 memcached.sock
drwxr-xr-x 13 www-data www-data  4096 Aug 27 10:22 phpmyadmin
/usr/local/lsws/Example/
├── cgi-bin
│   └── helloworld
├── fcgi-bin
├── html
│   ├── blocked
│   │   └── index.html
│   ├── css
│   │   ├── bootstrap.min.css
│   │   └── custom.css
│   ├── error404.html
│   ├── img
│   │   ├── 404-icon.png
│   │   ├── blocked_content-icon.png
│   │   ├── cgi-icon.png
│   │   ├── file_upload-icon.png
│   │   ├── olsws_logo.png
│   │   ├── php-icon.png
│   │   ├── powered_by_ols-new.png
│   │   └── pwd_protect-icon.png
│   ├── index.html
│   ├── phpinfo.php
│   ├── protected
│   │   └── index.html
│   ├── upload.html
│   └── upload.php
└── logs
    └── access.log
    
ls -lha /usr/local/lsws/fcgi-bin/
total 4.8M
drwxr-xr-x  2 root root 4.0K Feb  8  2024 .
drwxr-xr-x 24 root root 4.0K Feb  8  2024 ..
-rwxr-xr-x  1 root root 4.3K Feb  5  2024 RackRunner.rb
-rw-r--r--  1 root root 3.0K Feb  5  2024 lsnode.js
-rwxr-xr-x  1 root root 3.3K Feb  5  2024 lsperld.fpl
lrwxrwxrwx  1 root root    6 Feb  5  2024 lsphp -> lsphp5
-rwxr-xr-x  1 root root 4.8M Feb  5  2024 lsphp5
lrwxrwxrwx  1 root root   33 Feb  8  2024 lsphpnew -> /usr/local/lsws/lsphp81/bin/lsphp


├── lsphp74
│   ├── bin
│   │   ├── lsphp
│   │   ├── phar7.4 -> phar7.4.phar
│   │   ├── phar7.4.phar
│   │   ├── php
│   │   ├── php-helper
│   │   ├── php-maintscript-helper
│   │   ├── php7.4
│   │   ├── phpdismod
│   │   ├── phpenmod
│   │   ├── phpquery
│   │   └── sessionclean
│   ├── etc
│   │   └── php
│   │       └── 7.4
│   │           ├── litespeed
│   │           │   └── php.ini
│   │           └── mods-available
│   │               ├── imap.ini
│   │               ├── json.ini
│   │               ├── mysqli.ini
│   │               ├── opcache.ini
│   │               └── pdo_mysql.ini
│   ├── lib
│   │   └── php
│   │       ├── 20190902
│   │       │   ├── imap.so
│   │       │   ├── json.so
│   │       │   ├── mysqli.so
│   │       │   ├── opcache.so
│   │       │   └── pdo_mysql.so
│   │       └── 7.4
│   │           ├── php.ini-development
│   │           ├── php.ini-production
│   │           ├── php.ini-production.cli
│   │           └── sapi
│   │               └── litespeed
│   ├── share
│   │   ├── doc
│   │   │   └── lsphp74-common
│   │   ├── lsphp74-imap
│   │   │   └── imap
│   │   │       └── imap.ini
│   │   ├── lsphp74-json
│   │   │   └── json
│   │   │       └── json.ini
│   │   ├── lsphp74-mysql
│   │   │   └── mysql
│   │   │       ├── mysqli.ini
│   │   │       └── pdo_mysql.ini
│   │   ├── lsphp74-opcache
│   │   │   └── opcache
│   │   │       └── opcache.ini
│   │   └── man
│   │       └── man1
│   │           ├── phar7.4.1
│   │           ├── phar7.4.phar.1
│   │           └── php7.4.1


├── lsphp81
│   ├── bin
│   │   ├── lsphp
│   │   ├── phar8.1 -> phar8.1.phar
│   │   ├── phar8.1.phar
│   │   ├── php
│   │   ├── php-helper
│   │   ├── php-maintscript-helper
│   │   ├── php8.1
│   │   ├── phpdismod
│   │   ├── phpenmod
│   │   ├── phpquery
│   │   └── sessionclean
│   ├── etc
│   │   └── php
│   │       └── 8.1
│   │           ├── litespeed
│   │           │   └── php.ini
│   │           └── mods-available
│   │               ├── 40-igbinary.ini
│   │               ├── 40-imagick.ini
│   │               ├── 40-msgpack.ini
│   │               ├── 50-memcached.ini
│   │               ├── 50-redis.ini
│   │               ├── curl.ini
│   │               ├── imap.ini
│   │               ├── intl.ini
│   │               ├── mysqli.ini
│   │               ├── opcache.ini
│   │               └── pdo_mysql.ini
│   ├── include
│   │   └── php
│   │       └── ext
│   │           ├── igbinary
│   │           │   ├── igbinary.h
│   │           │   ├── php_igbinary.h
│   │           │   └── src
│   │           │       └── php7
│   │           │           ├── igbinary.h
│   │           │           └── php_igbinary.h
│   │           ├── imagick
│   │           │   └── php_imagick_shared.h
│   │           └── msgpack
│   │               └── php_msgpack.h
│   ├── lib
│   │   └── php
│   │       ├── 20210902
│   │       │   ├── curl.so
│   │       │   ├── igbinary.so
│   │       │   ├── imagick.so
│   │       │   ├── imap.so
│   │       │   ├── intl.so
│   │       │   ├── memcached.so
│   │       │   ├── msgpack.so
│   │       │   ├── mysqli.so
│   │       │   ├── opcache.so
│   │       │   ├── pdo_mysql.so
│   │       │   └── redis.so
│   │       └── 8.1
│   │           ├── php.ini-development
│   │           ├── php.ini-production
│   │           ├── php.ini-production.cli
│   │           └── sapi
│   │               └── litespeed
│   ├── share
│   │   ├── doc
│   │   │   └── lsphp81-common
│   │   ├── lsphp81-curl
│   │   │   └── curl
│   │   │       └── curl.ini
│   │   ├── lsphp81-imap
│   │   │   └── imap
│   │   │       └── imap.ini
│   │   ├── lsphp81-intl
│   │   │   └── intl
│   │   │       └── intl.ini
│   │   ├── lsphp81-mysql
│   │   │   └── mysql
│   │   │       ├── mysqli.ini
│   │   │       └── pdo_mysql.ini
│   │   ├── lsphp81-opcache
│   │   │   └── opcache
│   │   │       └── opcache.ini
│   │   └── man
│   │       └── man1
│   │           ├── phar8.1.1
│   │           ├── phar8.1.phar.1
│   │           └── php8.1.1
│   └── var
│       └── lib
│           └── php
│               └── sessions
├── lsrecaptcha
│   ├── _recaptcha
│   └── _recaptcha.shtml
├── modules
│   ├── cache.def
│   ├── modcompress.def
│   └── moddecompress.def
├── password
├── php
├── phpbuild

WP

Pluginlist and env

OS:	Linux 5.15.0-94-generic #104-Ubuntu SMP Tue Jan 9 15:25:40 UTC 2024 x86_64
Shell:	/bin/bash
PHP binary:	/usr/local/lsws/lsphp81/bin/php
PHP version:	8.1.27
php.ini used:	/usr/local/lsws/lsphp81/etc/php/8.1/litespeed/php.ini
MySQL binary:	/usr/bin/mysql
MySQL version:	mysql  Ver 15.1 Distrib 10.11.7-MariaDB, for debian-linux-gnu (x86_64) using  EditLine wrapper
SQL modes:	
WP-CLI root dir:	phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:	phar://wp-cli.phar/vendor
WP_CLI phar path:	/var/www/html
WP-CLI packages dir:	
WP-CLI cache dir:	/home/sftpuser/.wp-cli/cache
WP-CLI global config:	
WP-CLI project config:	
WP-CLI version:	2.9.0

+--------------------------------+----------+-----------+---------+
| name                           | status   | update    | version |
+--------------------------------+----------+-----------+---------+
| akismet                        | inactive | available | 5.3.1   |
| all-in-one-wp-migration        | inactive | available | 7.79    |
| dologin                        | inactive | available | 3.7.1   |
| google-analytics-for-wordpress | inactive | available | 8.23.1  |
| jetpack                        | inactive | available | 13.1.1  |
| litespeed-cache                | active   | available | 6.1     |
| object-cache.php               | dropin   | none      |         |
+--------------------------------+----------+-----------+---------+

wp-content/.litespeed_conf.dat

{"object-kind":false,"object-host":"\/var\/www\/memcached.sock","object-port":0,"object-life":360,"object-user":"","object-pswd":"","object-db_id":0,"object-persistent":true,"object-admin":true,"object-transients":true,"object-global_groups":["users","userlogins","useremail","userslugs","usermeta","user_meta","site-transient","site-options","site-lookup","site-details","blog-lookup","blog-details","blog-id-cache","rss","global-posts","global-cache-test"],"object-non_persistent_groups":["comment","counts","plugins","wc_session_id"]}

plugins settings export

LSCWP_cfg-iphonehub.cz_-20240828_000111.data

["_version","6.1"]

["hash","sDZdRyD48KsWX1C4D56ZVE0hHnLG3NwQ"]

["auto_upgrade",true]

["api_key",""]

["server_ip",""]

["guest",false]

["guest_optm",false]

["news",true]

["guest_uas",["Lighthouse","GTmetrix","Google","Pingdom","bot","PTST","HeadlessChrome"]]

["guest_ips",["208.70.247.157","172.255.48.130","172.255.48.131","172.255.48.132","172.255.48.133","172.255.48.134","172.255.48.135","172.255.48.136","172.255.48.137","172.255.48.138","172.255.48.139","172.255.48.140","172.255.48.141","172.255.48.142","172.255.48.143","172.255.48.144","172.255.48.145","172.255.48.146","172.255.48.147","52.229.122.240","104.214.72.101","13.66.7.11","13.85.24.83","13.85.24.90","13.85.82.26","40.74.242.253","40.74.243.13","40.74.243.176","104.214.48.247","157.55.189.189","104.214.110.135","70.37.83.240","65.52.36.250","13.78.216.56","52.162.212.163","23.96.34.105","65.52.113.236","172.255.61.34","172.255.61.35","172.255.61.36","172.255.61.37","172.255.61.38","172.255.61.39","172.255.61.40","104.41.2.19","191.235.98.164","191.235.99.221","191.232.194.51","52.237.235.185","52.237.250.73","52.237.236.145","104.211.143.8","104.211.165.53","52.172.14.87","40.83.89.214","52.175.57.81","20.188.63.151","20.52.36.49","52.246.165.153","51.144.102.233","13.76.97.224","102.133.169.66","52.231.199.170","13.53.162.7","40.123.218.94"]]

["cache",true]

["cache-priv",true]

["cache-commenter",true]

["cache-rest",true]

["cache-page_login",true]

["cache-favicon",true]

["cache-resources",true]

["cache-mobile",false]

["cache-mobile_rules",["Mobile","Android","Silk\/","Kindle","BlackBerry","Opera Mini","Opera Mobi"]]

["cache-browser",true]

["cache-exc_useragents",[]]

["cache-exc_cookies",[]]

["cache-exc_qs",[]]

["cache-exc_cat",[]]

["cache-exc_tag",[]]

["cache-force_uri",[]]

["cache-force_pub_uri",[]]

["cache-priv_uri",[]]

["cache-exc",[]]

["cache-exc_roles",[]]

["cache-drop_qs",["fbclid","gclid","utm*","_ga"]]

["cache-ttl_pub",604800]

["cache-ttl_priv",1800]

["cache-ttl_frontpage",604800]

["cache-ttl_feed",604800]

["cache-ttl_rest",604800]

["cache-ttl_browser",31557600]

["cache-ttl_status",["403 3600","404 3600","500 3600"]]

["cache-login_cookie",""]

["cache-vary_cookies",[]]

["cache-vary_group",[]]

["purge-upgrade",true]

["purge-stale",false]

["purge-post_all",false]

["purge-post_f",true]

["purge-post_h",true]

["purge-post_p",true]

["purge-post_pwrp",true]

["purge-post_a",true]

["purge-post_y",false]

["purge-post_m",true]

["purge-post_d",false]

["purge-post_t",true]

["purge-post_pt",true]

["purge-timed_urls",[]]

["purge-timed_urls_time",""]

["purge-hook_all",["switch_theme","wp_create_nav_menu","wp_update_nav_menu","wp_delete_nav_menu","create_term","edit_terms","delete_term","add_link","edit_link","delete_link"]]

["esi",false]

["esi-cache_admbar",true]

["esi-cache_commform",true]

["esi-nonce",["stats_nonce","subscribe_nonce"]]

["util-instant_click",false]

["util-no_https_vary",false]

["debug-disable_all",false]

["debug",0]

["debug-ips",["127.0.0.1"]]

["debug-level",false]

["debug-filesize",3]

["debug-cookie",false]

["debug-collaps_qs",false]

["debug-inc",[]]

["debug-exc",[]]

["debug-exc_strings",[]]

["db_optm-revisions_max",0]

["db_optm-revisions_age",0]

["optm-css_min",false]

["optm-css_comb",false]

["optm-css_comb_ext_inl",true]

["optm-ucss",false]

["optm-ucss_inline",false]

["optm-ucss_whitelist",[]]

["optm-ucss_file_exc_inline",[]]

["optm-ucss_exc",[]]

["optm-css_exc",[]]

["optm-js_min",false]

["optm-js_comb",false]

["optm-js_comb_ext_inl",true]

["optm-js_delay_inc",[]]

["optm-js_exc",["jquery.js","jquery.min.js"]]

["optm-html_min",false]

["optm-html_lazy",[]]

["optm-qs_rm",false]

["optm-ggfonts_rm",false]

["optm-css_async",false]

["optm-ccss_per_url",false]

["optm-ccss_sep_posttype",["page"]]

["optm-ccss_sep_uri",[]]

["optm-css_async_inline",true]

["optm-css_font_display",false]

["optm-js_defer",0]

["optm-emoji_rm",false]

["optm-noscript_rm",false]

["optm-ggfonts_async",false]

["optm-exc_roles",[]]

["optm-ccss_con",""]

["optm-js_defer_exc",["jquery.js","jquery.min.js","gtm.js","analytics.js"]]

["optm-gm_js_exc",[]]

["optm-dns_prefetch",[]]

["optm-dns_prefetch_ctrl",false]

["optm-dns_preconnect",[]]

["optm-exc",[]]

["optm-guest_only",true]

["object",true]

["object-kind",false]

["object-host","\/var\/www\/memcached.sock"]

["object-port",0]

["object-life",360]

["object-persistent",true]

["object-admin",true]

["object-transients",true]

["object-db_id",0]

["object-user",""]

["object-pswd",""]

["object-global_groups",["users","userlogins","useremail","userslugs","usermeta","user_meta","site-transient","site-options","site-lookup","site-details","blog-lookup","blog-details","blog-id-cache","rss","global-posts","global-cache-test"]]

["object-non_persistent_groups",["comment","counts","plugins","wc_session_id"]]

["discuss-avatar_cache",false]

["discuss-avatar_cron",false]

["discuss-avatar_cache_ttl",604800]

["optm-localize",false]

["optm-localize_domains",["### Popular scripts ###","https:\/\/platform.twitter.com\/widgets.js","https:\/\/connect.facebook.net\/en_US\/fbevents.js"]]

["media-preload_featured",false]

["media-lazy",false]

["media-lazy_placeholder",""]

["media-placeholder_resp",false]

["media-placeholder_resp_color","#cfd4db"]

["media-placeholder_resp_svg","<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"{width}\" height=\"{height}\" viewBox=\"0 0 {width} {height}\"><rect width=\"100%\" height=\"100%\" style=\"fill:{color};fill-opacity: 0.1;\"\/><\/svg>"]

["media-lqip",false]

["media-lqip_qual",4]

["media-lqip_min_w",150]

["media-lqip_min_h",150]

["media-placeholder_resp_async",true]

["media-iframe_lazy",false]

["media-add_missing_sizes",false]

["media-lazy_exc",[]]

["media-lazy_cls_exc",["wmu-preview-img"]]

["media-lazy_parent_cls_exc",[]]

["media-iframe_lazy_cls_exc",[]]

["media-iframe_lazy_parent_cls_exc",[]]

["media-lazy_uri_exc",[]]

["media-lqip_exc",[]]

["media-vpi",false]

["media-vpi_cron",false]

["img_optm-auto",false]

["img_optm-cron",true]

["img_optm-ori",true]

["img_optm-rm_bkup",false]

["img_optm-webp",true]

["img_optm-lossless",false]

["img_optm-exif",true]

["img_optm-webp_attr",["img.src","div.data-thumb","img.data-src","img.data-lazyload","div.data-large_image","img.retina_logo_url","div.data-parallax-image","div.data-vc-parallax-image","video.poster"]]

["img_optm-webp_replace_srcset",false]

["img_optm-jpg_quality",82]

["crawler",false]

["crawler-usleep",500]

["crawler-run_duration",400]

["crawler-run_interval",600]

["crawler-crawl_interval",302400]

["crawler-threads",3]

["crawler-timeout",30]

["crawler-load_limit",1]

["crawler-sitemap",""]

["crawler-drop_domain",true]

["crawler-map_timeout",120]

["crawler-roles",[]]

["crawler-cookies",[]]

["misc-heartbeat_front",false]

["misc-heartbeat_front_ttl",60]

["misc-heartbeat_back",false]

["misc-heartbeat_back_ttl",60]

["misc-heartbeat_editor",false]

["misc-heartbeat_editor_ttl",15]

["cdn",false]

["cdn-ori",[]]

["cdn-ori_dir",["wp-content","wp-includes"]]

["cdn-exc",[]]

["cdn-quic",false]

["cdn-cloudflare",false]

["cdn-cloudflare_email",""]

["cdn-cloudflare_key",""]

["cdn-cloudflare_name",""]

["cdn-cloudflare_zone",""]

["cdn-mapping",[{"url":"","inc_img":"1","inc_css":"1","inc_js":"1","filetype":[".aac",".css",".eot",".gif",".jpeg",".js",".jpg",".less",".mp3",".mp4",".ogg",".otf",".pdf",".png",".svg",".ttf",".webp",".woff",".woff2"]}]]

["cdn-attr",[".src",".data-src",".href",".poster","source.srcset"]]

["qc-token",""]

["qc-nameservers",""]

["_cache",true]

Open Litespeed Admin demo config

Server config:

Screen Shot 2024-08-28 at 02 52 54

Screen Shot 2024-08-28 at 02 50 58

Screen Shot 2024-08-28 at 02 51 11

Screen Shot 2024-08-28 at 02 51 22

Screen Shot 2024-08-28 at 02 51 33

Screen Shot 2024-08-28 at 02 51 55

Screen Shot 2024-08-28 at 02 52 03

Screen Shot 2024-08-28 at 02 52 21

Screen Shot 2024-08-28 at 02 51 55

Screen Shot 2024-08-28 at 02 51 22

Listeners

80 443 SSL

Vhost Wordpress

Screenshot 2024-08-28 at 03-00-08 LiteSpeed WebAdmin Console

Screenshot 2024-08-28 at 03-00-31 LiteSpeed WebAdmin Console

Screenshot 2024-08-28 at 03-00-42 LiteSpeed WebAdmin Console

Screenshot 2024-08-28 at 03-00-49 LiteSpeed WebAdmin Console

Screenshot 2024-08-28 at 03-00-58 LiteSpeed WebAdmin Console

Screenshot 2024-08-28 at 03-01-06 LiteSpeed WebAdmin Console

Screenshot 2024-08-28 at 03-01-13 LiteSpeed WebAdmin Console

Screenshot 2024-08-28 at 03-01-28 LiteSpeed WebAdmin Console

Screenshot 2024-08-28 at 03-01-36 LiteSpeed WebAdmin Console

Server config files:

batcat /usr/local/lsws/conf/httpd** --paging never
───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: /usr/local/lsws/conf/httpd_config.conf
───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ #
   2   │ # PLAIN TEXT CONFIGURATION FILE
   3   │ #
   4   │
   5   │ # If not set, will use host name as serverName
   6   │ serverName
   7   │ user                             www-data
   8   │ group                            www-data
   9   │ priority                         0
  10   │ autoRestart                      1
  11   │ chrootPath                       /
  12   │ enableChroot                     0
  13   │ inMemBufSize                     60M
  14   │ swappingDir                      /tmp/lshttpd/swap
  15   │ autoFix503                       1
  16   │ gracefulRestartTimeout           300
  17   │ mime                             conf/mime.properties
  18   │ showVersionNumber                0
  19   │ adminEmails root@localhost
  20   │ #adminEmails                      root@localhost
  21   │ indexFiles                       index.html, index.php
  22   │ disableWebAdmin                  0
  23   │
  24   │ errorlog logs/error.log {
  25   │         keepDays             1
  26   │         logLevel             DEBUG
  27   │         debugLevel           0
  28   │         rollingSize          10M
  29   │         enableStderrLog      1
  30   │ }
  31   │
  32   │ accessLog logs/access.log {
  33   │         rollingSize          10M
  34   │         keepDays             30
  35   │         compressArchive      0
  36   │         logReferer           1
  37   │         logUserAgent         1
  38   │ }
  39   │
  40   │ expires {
  41   │     enableExpires           1
  42   │     expiresByType           image/*=A604800,text/css=A604800,application/x-javascript=A604800,application/javascript=A604800,font/*=A604800,application/x-fo
       │ nt-ttf=A604800
  43   │ }
  44   │
  45   │ tuning{
  46   │     maxConnections               10000
  47   │     maxSSLConnections            10000
  48   │     connTimeout                  300
  49   │     maxKeepAliveReq              10000
  50   │     smartKeepAlive               0
  51   │     keepAliveTimeout             5
  52   │     sndBufSize                   0
  53   │     rcvBufSize                   0
  54   │     gzipStaticCompressLevel      6
  55   │     gzipMaxFileSize              10M
  56   │     eventDispatcher              best
  57   │     maxCachedFileSize            4096
  58   │     totalInMemCacheSize          20M
  59   │     maxMMapFileSize              256K
  60   │     totalMMapCacheSize           40M
  61   │     useSendfile                  1
  62   │     fileETag                     28
  63   │     SSLCryptoDevice              null
  64   │     maxReqURLLen                 32768
  65   │     maxReqHeaderSize             65536
  66   │     maxReqBodySize               2047M
  67   │     maxDynRespHeaderSize         32768
  68   │     maxDynRespSize               2047M
  69   │     enableGzipCompress           1
  70   │     enableBrCompress             4
  71   │     enableDynGzipCompress        1
  72   │     gzipCompressLevel            6
  73   │     brStaticCompressLevel        6
  74   │     compressibleTypes            default
  75   │     gzipAutoUpdateStatic         1
  76   │     gzipMinFileSize              300
  77   │
  78   │     quicEnable                   1
  79   │     quicShmDir                   /dev/shm
  80   │
  81   │ }
  82   │
  83   │ accessDenyDir{
  84   │     dir                  /
  85   │     dir                  /etc/*
  86   │     dir                  /dev/*
  87   │     dir                  conf/*
  88   │     dir                  admin/conf/*
  89   │ }
  90   │
  91   │ fileAccessControl{
  92   │     followSymbolLink                            1
  93   │     checkSymbolLink                             0
  94   │     requiredPermissionMask                      000
  95   │     restrictedPermissionMask                    000
  96   │ }
  97   │
  98   │ perClientConnLimit{
  99   │     staticReqPerSec                          0
 100   │     dynReqPerSec                             0
 101   │     outBandwidth                             0
 102   │     inBandwidth                              0
 103   │     softLimit                                10000
 104   │     hardLimit                                10000
 105   │     gracePeriod                              15
 106   │     banPeriod                                300
 107   │ }
 108   │
 109   │ CGIRLimit{
 110   │     maxCGIInstances                         20
 111   │     minUID                                  11
 112   │     minGID                                  10
 113   │     priority                                0
 114   │     CPUSoftLimit                            10
 115   │     CPUHardLimit                            50
 116   │     memSoftLimit                            2047M
 117   │     memHardLimit                            2047M
 118   │     procSoftLimit                           400
 119   │     procHardLimit                           450
 120   │ }
 121   │
 122   │ accessControl{
 123   │     allow                                   ALL
 124   │     deny
 125   │ }
 126   │
 127   │ extProcessor lsphp{
 128   │     type                            lsapi
 129   │     address                         uds://tmp/lshttpd/lsphp.sock
 130   │     maxConns                        10
 131   │     env                             PHP_LSAPI_CHILDREN=10
 132   │     env                             LSAPI_AVOID_FORK=200M
 133   │     initTimeout                     60
 134   │     retryTimeout                    0
 135   │     persistConn                     1
 136   │     pcKeepAliveTimeout
 137   │     respBuffer                      0
 138   │     autoStart                       1
 139   │     path                            lsphp81/bin/lsphp
 140   │     backlog                         100
 141   │     instances                       1
 142   │     priority                        0
 143   │     memSoftLimit                    0
 144   │     memHardLimit                    0
 145   │     procSoftLimit                   1400
 146   │     procHardLimit                   1500
 147   │ }
 148   │
 149   │ scriptHandler{
 150   │     add lsapi:lsphp  php
 151   │ }
 152   │
 153   │ railsDefaults{
 154   │     binPath
 155   │     railsEnv                 1
 156   │     maxConns                 1
 157   │     env                      LSAPI_MAX_IDLE=60
 158   │     initTimeout              60
 159   │     retryTimeout             0
 160   │     pcKeepAliveTimeout       60
 161   │     respBuffer               0
 162   │     backlog                  50
 163   │     runOnStartUp             3
 164   │     extMaxIdleTime           300
 165   │     priority                 3
 166   │     memSoftLimit             0
 167   │     memHardLimit             0
 168   │     procSoftLimit            500
 169   │     procHardLimit            600
 170   │ }
 171   │
 172   │ wsgiDefaults{
 173   │     binPath
 174   │     railsEnv                 1
 175   │     maxConns                 5
 176   │     env                      LSAPI_MAX_IDLE=60
 177   │     initTimeout              60
 178   │     retryTimeout             0
 179   │     pcKeepAliveTimeout       60
 180   │     respBuffer               0
 181   │     backlog                  50
 182   │     runOnStartUp             3
 183   │     extMaxIdleTime           300
 184   │     priority                 3
 185   │     memSoftLimit             0
 186   │     memHardLimit             0
 187   │     procSoftLimit            500
 188   │     procHardLimit            600
 189   │ }
 190   │
 191   │ nodeDefaults{
 192   │     binPath
 193   │     railsEnv                 1
 194   │     maxConns                 5
 195   │     env                      LSAPI_MAX_IDLE=60
 196   │     initTimeout              60
 197   │     retryTimeout             0
 198   │     pcKeepAliveTimeout       60
 199   │     respBuffer               0
 200   │     backlog                  50
 201   │     runOnStartUp             3
 202   │     extMaxIdleTime           300
 203   │     priority                 3
 204   │     memSoftLimit             0
 205   │     memHardLimit             0
 206   │     procSoftLimit            500
 207   │     procHardLimit            600
 208   │ }
 209   │
 210   │ virtualHost Example{
 211   │     vhRoot                   Example/
 212   │     allowSymbolLink          1
 213   │     enableScript             1
 214   │     restrained               1
 215   │     maxKeepAliveReq
 216   │     smartKeepAlive
 217   │     setUIDMode               0
 218   │     chrootMode               0
 219   │     configFile               conf/vhosts/Example/vhconf.conf
 220   │ }
 221   │
 222   │ listener Default{
 223   │     address                  *:8088
 224   │     secure                   0
 225   │   map                     wordpress 46.101.222.231, iphonehub.cz, www.iphonehub.cz
 226   │ }
 227   │
 228   │ vhTemplate centralConfigLog{
 229   │     templateFile             conf/templates/ccl.conf
 230   │     listeners                Default
 231   │ }
 232   │
 233   │ vhTemplate EasyRailsWithSuEXEC{
 234   │     templateFile             conf/templates/rails.conf
 235   │     listeners                Default
 236   │ }
 237   │
 238   │ module cache {
 239   │     ls_enabled   1
 240   │ #          1
 241   │
 242   │     checkPrivateCache   1
 243   │     checkPublicCache    1
 244   │     maxCacheObjSize     10000000
 245   │     maxStaleAge         0
 246   │     qsCache             1
 247   │     reqCookieCache      1
 248   │     respCookieCache     1
 249   │     ignoreReqCacheCtrl  1
 250   │     ignoreRespCacheCtrl 0
 251   │
 252   │     enableCache         0
 253   │     expireInSeconds     3600
 254   │     enablePrivateCache  0
 255   │     privateExpireInSeconds 3600
 256   │
 257   │ }
 258   │
 259   │
 260   │ listener wordpress {
 261   │ address                 *:80
 262   │ secure                  0
 263   │   map                     wordpress 46.101.222.231, iphonehub.cz, www.iphonehub.cz
 264   │ }
 265   │
 266   │
 267   │ listener wordpressssl {
 268   │ address                 *:443
 269   │ secure                  1
 270   │   map                     wordpress 46.101.222.231, iphonehub.cz, www.iphonehub.cz
 271   │ keyFile                 /usr/local/lsws/conf/example.key
 272   │ certFile                /usr/local/lsws/conf/example.crt
 273   │ }
 274   │
 275   │
 276   │ virtualhost wordpress {
 277   │ vhRoot                  /var/www/html
 278   │ configFile              /usr/local/lsws/conf/vhosts/wordpress/vhconf.conf
 279   │ allowSymbolLink         1
 280   │ enableScript            1
 281   │ restrained              0
 282   │ setUIDMode              2
 283   │ }
───────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: /usr/local/lsws/conf/httpd_config.conf.dpkg
───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ #
   2   │ # PLAIN TEXT CONFIGURATION FILE
   3   │ #
   4   │
   5   │ # If not set, will use host name as serverName
   6   │ serverName
   7   │ user                             nobody
   8   │ group                            nogroup
   9   │ priority                         0
  10   │ autoRestart                      1
  11   │ chrootPath                       /
  12   │ enableChroot                     0
  13   │ inMemBufSize                     60M
  14   │ swappingDir                      /tmp/lshttpd/swap
  15   │ autoFix503                       1
  16   │ gracefulRestartTimeout           300
  17   │ mime                             conf/mime.properties
  18   │ showVersionNumber                0
  19   │ adminEmails                      root@localhost
  20   │ indexFiles                       index.html, index.php
  21   │ disableWebAdmin                  0
  22   │
  23   │ errorlog logs/error.log {
  24   │         logLevel             DEBUG
  25   │         debugLevel           0
  26   │         rollingSize          10M
  27   │         enableStderrLog      1
  28   │ }
  29   │
  30   │ accessLog logs/access.log {
  31   │         rollingSize          10M
  32   │         keepDays             30
  33   │         compressArchive      0
  34   │         logReferer           1
  35   │         logUserAgent         1
  36   │ }
  37   │
  38   │ expires {
  39   │     enableExpires           1
  40   │     expiresByType           image/*=A604800,text/css=A604800,application/x-javascript=A604800,application/javascript=A604800,font/*=A604800,application/x-fo
       │ nt-ttf=A604800
  41   │ }
  42   │
  43   │ tuning{
  44   │     maxConnections               10000
  45   │     maxSSLConnections            10000
  46   │     connTimeout                  300
  47   │     maxKeepAliveReq              10000
  48   │     smartKeepAlive               0
  49   │     keepAliveTimeout             5
  50   │     sndBufSize                   0
  51   │     rcvBufSize                   0
  52   │     gzipStaticCompressLevel      6
  53   │     gzipMaxFileSize              10M
  54   │     eventDispatcher              best
  55   │     maxCachedFileSize            4096
  56   │     totalInMemCacheSize          20M
  57   │     maxMMapFileSize              256K
  58   │     totalMMapCacheSize           40M
  59   │     useSendfile                  1
  60   │     fileETag                     28
  61   │     SSLCryptoDevice              null
  62   │     maxReqURLLen                 32768
  63   │     maxReqHeaderSize             65536
  64   │     maxReqBodySize               2047M
  65   │     maxDynRespHeaderSize         32768
  66   │     maxDynRespSize               2047M
  67   │     enableGzipCompress           1
  68   │     enableBrCompress             4
  69   │     enableDynGzipCompress        1
  70   │     gzipCompressLevel            6
  71   │     brStaticCompressLevel        6
  72   │     compressibleTypes            default
  73   │     gzipAutoUpdateStatic         1
  74   │     gzipMinFileSize              300
  75   │
  76   │     quicEnable                   1
  77   │     quicShmDir                   /dev/shm
  78   │
  79   │ }
  80   │
  81   │ accessDenyDir{
  82   │     dir                  /
  83   │     dir                  /etc/*
  84   │     dir                  /dev/*
  85   │     dir                  conf/*
  86   │     dir                  admin/conf/*
  87   │ }
  88   │
  89   │ fileAccessControl{
  90   │     followSymbolLink                            1
  91   │     checkSymbolLink                             0
  92   │     requiredPermissionMask                      000
  93   │     restrictedPermissionMask                    000
  94   │ }
  95   │
  96   │ perClientConnLimit{
  97   │     staticReqPerSec                          0
  98   │     dynReqPerSec                             0
  99   │     outBandwidth                             0
 100   │     inBandwidth                              0
 101   │     softLimit                                10000
 102   │     hardLimit                                10000
 103   │     gracePeriod                              15
 104   │     banPeriod                                300
 105   │ }
 106   │
 107   │ CGIRLimit{
 108   │     maxCGIInstances                         20
 109   │     minUID                                  11
 110   │     minGID                                  10
 111   │     priority                                0
 112   │     CPUSoftLimit                            10
 113   │     CPUHardLimit                            50
 114   │     memSoftLimit                            2047M
 115   │     memHardLimit                            2047M
 116   │     procSoftLimit                           400
 117   │     procHardLimit                           450
 118   │ }
 119   │
 120   │ accessControl{
 121   │     allow                                   ALL
 122   │     deny
 123   │ }
 124   │
 125   │ extProcessor lsphp{
 126   │     type                            lsapi
 127   │     address                         uds://tmp/lshttpd/lsphp.sock
 128   │     maxConns                        10
 129   │     env                             PHP_LSAPI_CHILDREN=10
 130   │     env                             LSAPI_AVOID_FORK=200M
 131   │     initTimeout                     60
 132   │     retryTimeout                    0
 133   │     persistConn                     1
 134   │     pcKeepAliveTimeout
 135   │     respBuffer                      0
 136   │     autoStart                       1
 137   │     path                            lsphp74/bin/lsphp
 138   │     backlog                         100
 139   │     instances                       1
 140   │     priority                        0
 141   │     memSoftLimit                    0
 142   │     memHardLimit                    0
 143   │     procSoftLimit                   1400
 144   │     procHardLimit                   1500
 145   │ }
 146   │
 147   │ scriptHandler{
 148   │     add lsapi:lsphp  php
 149   │ }
 150   │
 151   │ railsDefaults{
 152   │     binPath
 153   │     railsEnv                 1
 154   │     maxConns                 1
 155   │     env                      LSAPI_MAX_IDLE=60
 156   │     initTimeout              60
 157   │     retryTimeout             0
 158   │     pcKeepAliveTimeout       60
 159   │     respBuffer               0
 160   │     backlog                  50
 161   │     runOnStartUp             3
 162   │     extMaxIdleTime           300
 163   │     priority                 3
 164   │     memSoftLimit             0
 165   │     memHardLimit             0
 166   │     procSoftLimit            500
 167   │     procHardLimit            600
 168   │ }
 169   │
 170   │ wsgiDefaults{
 171   │     binPath
 172   │     railsEnv                 1
 173   │     maxConns                 5
 174   │     env                      LSAPI_MAX_IDLE=60
 175   │     initTimeout              60
 176   │     retryTimeout             0
 177   │     pcKeepAliveTimeout       60
 178   │     respBuffer               0
 179   │     backlog                  50
 180   │     runOnStartUp             3
 181   │     extMaxIdleTime           300
 182   │     priority                 3
 183   │     memSoftLimit             0
 184   │     memHardLimit             0
 185   │     procSoftLimit            500
 186   │     procHardLimit            600
 187   │ }
 188   │
 189   │ nodeDefaults{
 190   │     binPath
 191   │     railsEnv                 1
 192   │     maxConns                 5
 193   │     env                      LSAPI_MAX_IDLE=60
 194   │     initTimeout              60
 195   │     retryTimeout             0
 196   │     pcKeepAliveTimeout       60
 197   │     respBuffer               0
 198   │     backlog                  50
 199   │     runOnStartUp             3
 200   │     extMaxIdleTime           300
 201   │     priority                 3
 202   │     memSoftLimit             0
 203   │     memHardLimit             0
 204   │     procSoftLimit            500
 205   │     procHardLimit            600
 206   │ }
 207   │
 208   │ virtualHost Example{
 209   │     vhRoot                   Example/
 210   │     allowSymbolLink          1
 211   │     enableScript             1
 212   │     restrained               1
 213   │     maxKeepAliveReq
 214   │     smartKeepAlive
 215   │     setUIDMode               0
 216   │     chrootMode               0
 217   │     configFile               conf/vhosts/Example/vhconf.conf
 218   │ }
 219   │
 220   │ listener Default{
 221   │     address                  *:8088
 222   │     secure                   0
 223   │     map                      Example *
 224   │ }
 225   │
 226   │ vhTemplate centralConfigLog{
 227   │     templateFile             conf/templates/ccl.conf
 228   │     listeners                Default
 229   │ }
 230   │
 231   │ vhTemplate EasyRailsWithSuEXEC{
 232   │     templateFile             conf/templates/rails.conf
 233   │     listeners                Default
 234   │ }
 235   │
 236   │ module cache {
 237   │     ls_enabled          1
 238   │
 239   │     checkPrivateCache   1
 240   │     checkPublicCache    1
 241   │     maxCacheObjSize     10000000
 242   │     maxStaleAge         200
 243   │     qsCache             1
 244   │     reqCookieCache      1
 245   │     respCookieCache     1
 246   │     ignoreReqCacheCtrl  1
 247   │     ignoreRespCacheCtrl 0
 248   │
 249   │     enableCache         0
 250   │     expireInSeconds     3600
 251   │     enablePrivateCache  0
 252   │     privateExpireInSeconds 3600
 253   │
 254   │ }
 255   │
───────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: /usr/local/lsws/conf/httpd_config.conf.txt
───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ servername
   2   │ user www-data
   3   │ group www-data
   4   │ priority 0
   5   │ autorestart 1
   6   │ chrootpath /
   7   │ enablechroot 0
   8   │ inmembufsize 60M
   9   │ swappingdir /tmp/lshttpd/swap
  10   │ autofix503 1
  11   │ gracefulrestarttimeout 300
  12   │ mime conf/mime.properties
  13   │ showversionnumber 0
  14   │ adminemails root@localhost
  15   │ indexfiles index.html, index.php
  16   │ disablewebadmin 0
  17   │
  18   │ errorlog logs/error.log {
  19   │     keepdays 1
  20   │     loglevel DEBUG
  21   │     debuglevel 0
  22   │     rollingsize 10M
  23   │     enablestderrlog 1
  24   │ }
  25   │
  26   │ accesslog logs/access.log {
  27   │     rollingsize 10M
  28   │     keepdays 30
  29   │     compressarchive 0
  30   │     logreferer 1
  31   │     loguseragent 1
  32   │ }
  33   │
  34   │ expires  {
  35   │     enableexpires 1
  36   │     expiresbytype image/*=A604800,text/css=A604800,application/x-javascript=A604800,application/javascript=A604800,font/*=A604800,application/x-font-ttf=A60
       │ 4800
  37   │ }
  38   │
  39   │ tuning  {
  40   │     maxconnections 10000
  41   │     maxsslconnections 10000
  42   │     conntimeout 300
  43   │     maxkeepalivereq 10000
  44   │     smartkeepalive 0
  45   │     keepalivetimeout 5
  46   │     sndbufsize 0
  47   │     rcvbufsize 0
  48   │     gzipstaticcompresslevel 6
  49   │     gzipmaxfilesize 10M
  50   │     eventdispatcher best
  51   │     maxcachedfilesize 4096
  52   │     totalinmemcachesize 20M
  53   │     maxmmapfilesize 256K
  54   │     totalmmapcachesize 40M
  55   │     usesendfile 1
  56   │     fileetag 28
  57   │     sslcryptodevice null
  58   │     maxrequrllen 32768
  59   │     maxreqheadersize 65536
  60   │     maxreqbodysize 2047M
  61   │     maxdynrespheadersize 32768
  62   │     maxdynrespsize 2047M
  63   │     enablegzipcompress 1
  64   │     enablebrcompress 4
  65   │     enabledyngzipcompress 1
  66   │     gzipcompresslevel 6
  67   │     brstaticcompresslevel 6
  68   │     compressibletypes default
  69   │     gzipautoupdatestatic 1
  70   │     gzipminfilesize 300
  71   │     quicenable 1
  72   │     quicshmdir /dev/shm
  73   │ }
  74   │
  75   │ accessdenydir  {
  76   │     dir /
  77   │     dir /etc/*
  78   │     dir /dev/*
  79   │     dir conf/*
  80   │     dir admin/conf/*
  81   │ }
  82   │
  83   │ fileaccesscontrol  {
  84   │     followsymbollink 1
  85   │     checksymbollink 0
  86   │     requiredpermissionmask 000
  87   │     restrictedpermissionmask 000
  88   │ }
  89   │
  90   │ perclientconnlimit  {
  91   │     staticreqpersec 0
  92   │     dynreqpersec 0
  93   │     outbandwidth 0
  94   │     inbandwidth 0
  95   │     softlimit 10000
  96   │     hardlimit 10000
  97   │     graceperiod 15
  98   │     banperiod 300
  99   │ }
 100   │
 101   │ cgirlimit  {
 102   │     maxcgiinstances 20
 103   │     minuid 11
 104   │     mingid 10
 105   │     priority 0
 106   │     cpusoftlimit 10
 107   │     cpuhardlimit 50
 108   │     memsoftlimit 2047M
 109   │     memhardlimit 2047M
 110   │     procsoftlimit 400
 111   │     prochardlimit 450
 112   │ }
 113   │
 114   │ accesscontrol  {
 115   │     allow ALL
 116   │     deny
 117   │ }
 118   │
 119   │ extprocessor lsphp {
 120   │     type lsapi
 121   │     address uds://tmp/lshttpd/lsphp.sock
 122   │     maxconns 10
 123   │     env PHP_LSAPI_CHILDREN=10
 124   │     env LSAPI_AVOID_FORK=200M
 125   │     inittimeout 60
 126   │     retrytimeout 0
 127   │     persistconn 1
 128   │     pckeepalivetimeout
 129   │     respbuffer 0
 130   │     autostart 1
 131   │     path lsphp81/bin/lsphp
 132   │     backlog 100
 133   │     instances 1
 134   │     priority 0
 135   │     memsoftlimit 0
 136   │     memhardlimit 0
 137   │     procsoftlimit 1400
 138   │     prochardlimit 1500
 139   │ }
 140   │
 141   │ scripthandler  {
 142   │     add lsapi:lsphp  php
 143   │ }
 144   │
 145   │ railsdefaults  {
 146   │     binpath
 147   │     railsenv 1
 148   │     maxconns 1
 149   │     env LSAPI_MAX_IDLE=60
 150   │     inittimeout 60
 151   │     retrytimeout 0
 152   │     pckeepalivetimeout 60
 153   │     respbuffer 0
 154   │     backlog 50
 155   │     runonstartup 3
 156   │     extmaxidletime 300
 157   │     priority 3
 158   │     memsoftlimit 0
 159   │     memhardlimit 0
 160   │     procsoftlimit 500
 161   │     prochardlimit 600
 162   │ }
 163   │
 164   │ wsgiDefaults  {
 165   │     binpath
 166   │     railsenv 1
 167   │     maxconns 5
 168   │     env LSAPI_MAX_IDLE=60
 169   │     inittimeout 60
 170   │     retrytimeout 0
 171   │     pckeepalivetimeout 60
 172   │     respbuffer 0
 173   │     backlog 50
 174   │     runonstartup 3
 175   │     extmaxidletime 300
 176   │     priority 3
 177   │     memsoftlimit 0
 178   │     memhardlimit 0
 179   │     procsoftlimit 500
 180   │     prochardlimit 600
 181   │ }
 182   │
 183   │ nodeDefaults  {
 184   │     binpath
 185   │     railsenv 1
 186   │     maxconns 5
 187   │     env LSAPI_MAX_IDLE=60
 188   │     inittimeout 60
 189   │     retrytimeout 0
 190   │     pckeepalivetimeout 60
 191   │     respbuffer 0
 192   │     backlog 50
 193   │     runonstartup 3
 194   │     extmaxidletime 300
 195   │     priority 3
 196   │     memsoftlimit 0
 197   │     memhardlimit 0
 198   │     procsoftlimit 500
 199   │     prochardlimit 600
 200   │ }
 201   │
 202   │ virtualhost Example {
 203   │     vhroot Example/
 204   │     allowsymbollink 1
 205   │     enablescript 1
 206   │     restrained 1
 207   │     maxkeepalivereq
 208   │     smartkeepalive
 209   │     setuidmode 0
 210   │     chrootmode 0
 211   │     configfile conf/vhosts/Example/vhconf.conf
 212   │ }
 213   │
 214   │ listener Default {
 215   │     address *:8088
 216   │     secure 0
 217   │     map wordpress 46.101.222.231, iphonehub.cz, www.iphonehub.cz
 218   │ }
 219   │
 220   │ vhtemplate centralConfigLog {
 221   │     templatefile conf/templates/ccl.conf
 222   │     listeners Default
 223   │ }
 224   │
 225   │ vhtemplate EasyRailsWithSuEXEC {
 226   │     templatefile conf/templates/rails.conf
 227   │     listeners Default
 228   │ }
 229   │
 230   │ module cache {
 231   │     param <<<MY_END
 232   │ checkprivatecache 1
 233   │ checkpubliccache 1
 234   │ maxcacheobjsize 10000000
 235   │ maxstaleage 0
 236   │ qscache 1
 237   │ reqcookiecache 1
 238   │ respcookiecache 1
 239   │ ignorereqcachectrl 1
 240   │ ignorerespcachectrl 0
 241   │ enablecache 0
 242   │ expireinseconds 3600
 243   │ enableprivatecache 0
 244   │ privateexpireinseconds 3600
 245   │     MY_END
 246   │     ls_enabled 1
 247   │     unknownkeywords checkprivatecache 1
 248   │     unknownkeywords checkpubliccache 1
 249   │     unknownkeywords maxcacheobjsize 10000000
 250   │     unknownkeywords maxstaleage 0
 251   │     unknownkeywords qscache 1
 252   │     unknownkeywords reqcookiecache 1
 253   │     unknownkeywords respcookiecache 1
 254   │     unknownkeywords ignorereqcachectrl 1
 255   │     unknownkeywords ignorerespcachectrl 0
 256   │     unknownkeywords enablecache 0
 257   │     unknownkeywords expireinseconds 3600
 258   │     unknownkeywords enableprivatecache 0
 259   │     unknownkeywords privateexpireinseconds 3600
 260   │ }
 261   │
 262   │ listener wordpress {
 263   │     address *:80
 264   │     secure 0
 265   │     map wordpress 46.101.222.231, iphonehub.cz, www.iphonehub.cz
 266   │ }
 267   │
 268   │ listener wordpressssl {
 269   │     address *:443
 270   │     secure 1
 271   │     map wordpress 46.101.222.231, iphonehub.cz, www.iphonehub.cz
 272   │     keyfile /usr/local/lsws/conf/example.key
 273   │     certfile /usr/local/lsws/conf/example.crt
 274   │ }
 275   │
 276   │ virtualhost wordpress {
 277   │     vhroot /var/www/html
 278   │     configfile /usr/local/lsws/conf/vhosts/wordpress/vhconf.conf
 279   │     allowsymbollink 1
 280   │     enablescript 1
 281   │     restrained 0
 282   │     setuidmode 2
 283   │ }
───────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: /usr/local/lsws/conf/httpd_config.conf0
───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ #
   2   │ # PLAIN TEXT CONFIGURATION FILE
   3   │ #
   4   │
   5   │ # If not set, will use host name as serverName
   6   │ serverName
   7   │ user                             www-data
   8   │ group                            www-data
   9   │ priority                         0
  10   │ autoRestart                      1
  11   │ chrootPath                       /
  12   │ enableChroot                     0
  13   │ inMemBufSize                     60M
  14   │ swappingDir                      /tmp/lshttpd/swap
  15   │ autoFix503                       1
  16   │ gracefulRestartTimeout           300
  17   │ mime                             conf/mime.properties
  18   │ showVersionNumber                0
  19   │ adminEmails root@localhost
  20   │ #adminEmails                      root@localhost
  21   │ indexFiles                       index.html, index.php
  22   │ disableWebAdmin                  0
  23   │
  24   │ errorlog logs/error.log {
  25   │         keepDays             1
  26   │         logLevel             DEBUG
  27   │         debugLevel           0
  28   │         rollingSize          10M
  29   │         enableStderrLog      1
  30   │ }
  31   │
  32   │ accessLog logs/access.log {
  33   │         rollingSize          10M
  34   │         keepDays             30
  35   │         compressArchive      0
  36   │         logReferer           1
  37   │         logUserAgent         1
  38   │ }
  39   │
  40   │ expires {
  41   │     enableExpires           1
  42   │     expiresByType           image/*=A604800,text/css=A604800,application/x-javascript=A604800,application/javascript=A604800,font/*=A604800,application/x-fo
       │ nt-ttf=A604800
  43   │ }
  44   │
  45   │ tuning{
  46   │     maxConnections               10000
  47   │     maxSSLConnections            10000
  48   │     connTimeout                  300
  49   │     maxKeepAliveReq              10000
  50   │     smartKeepAlive               0
  51   │     keepAliveTimeout             5
  52   │     sndBufSize                   0
  53   │     rcvBufSize                   0
  54   │     gzipStaticCompressLevel      6
  55   │     gzipMaxFileSize              10M
  56   │     eventDispatcher              best
  57   │     maxCachedFileSize            4096
  58   │     totalInMemCacheSize          20M
  59   │     maxMMapFileSize              256K
  60   │     totalMMapCacheSize           40M
  61   │     useSendfile                  1
  62   │     fileETag                     28
  63   │     SSLCryptoDevice              null
  64   │     maxReqURLLen                 32768
  65   │     maxReqHeaderSize             65536
  66   │     maxReqBodySize               2047M
  67   │     maxDynRespHeaderSize         32768
  68   │     maxDynRespSize               2047M
  69   │     enableGzipCompress           1
  70   │     enableBrCompress             4
  71   │     enableDynGzipCompress        1
  72   │     gzipCompressLevel            6
  73   │     brStaticCompressLevel        6
  74   │     compressibleTypes            default
  75   │     gzipAutoUpdateStatic         1
  76   │     gzipMinFileSize              300
  77   │
  78   │     quicEnable                   1
  79   │     quicShmDir                   /dev/shm
  80   │
  81   │ }
  82   │
  83   │ accessDenyDir{
  84   │     dir                  /
  85   │     dir                  /etc/*
  86   │     dir                  /dev/*
  87   │     dir                  conf/*
  88   │     dir                  admin/conf/*
  89   │ }
  90   │
  91   │ fileAccessControl{
  92   │     followSymbolLink                            1
  93   │     checkSymbolLink                             0
  94   │     requiredPermissionMask                      000
  95   │     restrictedPermissionMask                    000
  96   │ }
  97   │
  98   │ perClientConnLimit{
  99   │     staticReqPerSec                          0
 100   │     dynReqPerSec                             0
 101   │     outBandwidth                             0
 102   │     inBandwidth                              0
 103   │     softLimit                                10000
 104   │     hardLimit                                10000
 105   │     gracePeriod                              15
 106   │     banPeriod                                300
 107   │ }
 108   │
 109   │ CGIRLimit{
 110   │     maxCGIInstances                         20
 111   │     minUID                                  11
 112   │     minGID                                  10
 113   │     priority                                0
 114   │     CPUSoftLimit                            10
 115   │     CPUHardLimit                            50
 116   │     memSoftLimit                            2047M
 117   │     memHardLimit                            2047M
 118   │     procSoftLimit                           400
 119   │     procHardLimit                           450
 120   │ }
 121   │
 122   │ accessControl{
 123   │     allow                                   ALL
 124   │     deny
 125   │ }
 126   │
 127   │ extProcessor lsphp{
 128   │     type                            lsapi
 129   │     address                         uds://tmp/lshttpd/lsphp.sock
 130   │     maxConns                        10
 131   │     env                             PHP_LSAPI_CHILDREN=10
 132   │     env                             LSAPI_AVOID_FORK=200M
 133   │     initTimeout                     60
 134   │     retryTimeout                    0
 135   │     persistConn                     1
 136   │     pcKeepAliveTimeout
 137   │     respBuffer                      0
 138   │     autoStart                       1
 139   │     path                            lsphp81/bin/lsphp
 140   │     backlog                         100
 141   │     instances                       1
 142   │     priority                        0
 143   │     memSoftLimit                    0
 144   │     memHardLimit                    0
 145   │     procSoftLimit                   1400
 146   │     procHardLimit                   1500
 147   │ }
 148   │
 149   │ scriptHandler{
 150   │     add lsapi:lsphp  php
 151   │ }
 152   │
 153   │ railsDefaults{
 154   │     binPath
 155   │     railsEnv                 1
 156   │     maxConns                 1
 157   │     env                      LSAPI_MAX_IDLE=60
 158   │     initTimeout              60
 159   │     retryTimeout             0
 160   │     pcKeepAliveTimeout       60
 161   │     respBuffer               0
 162   │     backlog                  50
 163   │     runOnStartUp             3
 164   │     extMaxIdleTime           300
 165   │     priority                 3
 166   │     memSoftLimit             0
 167   │     memHardLimit             0
 168   │     procSoftLimit            500
 169   │     procHardLimit            600
 170   │ }
 171   │
 172   │ wsgiDefaults{
 173   │     binPath
 174   │     railsEnv                 1
 175   │     maxConns                 5
 176   │     env                      LSAPI_MAX_IDLE=60
 177   │     initTimeout              60
 178   │     retryTimeout             0
 179   │     pcKeepAliveTimeout       60
 180   │     respBuffer               0
 181   │     backlog                  50
 182   │     runOnStartUp             3
 183   │     extMaxIdleTime           300
 184   │     priority                 3
 185   │     memSoftLimit             0
 186   │     memHardLimit             0
 187   │     procSoftLimit            500
 188   │     procHardLimit            600
 189   │ }
 190   │
 191   │ nodeDefaults{
 192   │     binPath
 193   │     railsEnv                 1
 194   │     maxConns                 5
 195   │     env                      LSAPI_MAX_IDLE=60
 196   │     initTimeout              60
 197   │     retryTimeout             0
 198   │     pcKeepAliveTimeout       60
 199   │     respBuffer               0
 200   │     backlog                  50
 201   │     runOnStartUp             3
 202   │     extMaxIdleTime           300
 203   │     priority                 3
 204   │     memSoftLimit             0
 205   │     memHardLimit             0
 206   │     procSoftLimit            500
 207   │     procHardLimit            600
 208   │ }
 209   │
 210   │ virtualHost Example{
 211   │     vhRoot                   Example/
 212   │     allowSymbolLink          1
 213   │     enableScript             1
 214   │     restrained               1
 215   │     maxKeepAliveReq
 216   │     smartKeepAlive
 217   │     setUIDMode               0
 218   │     chrootMode               0
 219   │     configFile               conf/vhosts/Example/vhconf.conf
 220   │ }
 221   │
 222   │ listener Default{
 223   │     address                  *:8088
 224   │     secure                   0
 225   │   map                     wordpress 46.101.222.231, iphonehub.cz, www.iphonehub.cz
 226   │ }
 227   │
 228   │ vhTemplate centralConfigLog{
 229   │     templateFile             conf/templates/ccl.conf
 230   │     listeners                Default
 231   │ }
 232   │
 233   │ vhTemplate EasyRailsWithSuEXEC{
 234   │     templateFile             conf/templates/rails.conf
 235   │     listeners                Default
 236   │ }
 237   │
 238   │ module cache {
 239   │     ls_enabled   1
 240   │ #          1
 241   │
 242   │     checkPrivateCache   1
 243   │     checkPublicCache    1
 244   │     maxCacheObjSize     10000000
 245   │     maxStaleAge         0
 246   │     qsCache             1
 247   │     reqCookieCache      1
 248   │     respCookieCache     1
 249   │     ignoreReqCacheCtrl  1
 250   │     ignoreRespCacheCtrl 0
 251   │
 252   │     enableCache         0
 253   │     expireInSeconds     3600
 254   │     enablePrivateCache  0
 255   │     privateExpireInSeconds 3600
 256   │
 257   │ }
 258   │
 259   │
 260   │ listener wordpress {
 261   │ address                 *:80
 262   │ secure                  0
 263   │   map                     wordpress 46.101.222.231, iphonehub.cz, www.iphonehub.cz
 264   │ }
 265   │
 266   │
 267   │ listener wordpressssl {
 268   │ address                 *:443
 269   │ secure                  1
 270   │   map                     wordpress 46.101.222.231, iphonehub.cz, www.iphonehub.cz
 271   │ keyFile                 /usr/local/lsws/conf/example.key
 272   │ certFile                /usr/local/lsws/conf/example.crt
 273   │ }
 274   │
 275   │
 276   │ virtualhost wordpress {
 277   │ vhRoot                  /var/www/html
 278   │ configFile              /usr/local/lsws/conf/vhosts/wordpress/vhconf.conf
 279   │ allowSymbolLink         1
 280   │ enableScript            1
 281   │ restrained              0
 282   │ setUIDMode              2
 283   │ }
───────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: /usr/local/lsws/conf/httpd_config.conf0,v
───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ head    1.6;
   2   │ access;
   3   │ symbols;
   4   │ locks
   5   │     root:1.6; strict;
   6   │ comment @# @;
   7   │
   8   │
   9   │ 1.6
  10   │ date    2024.08.27.10.10.07;    author root;    state Exp;
  11   │ branches;
  12   │ next    1.5;
  13   │
  14   │ 1.5
  15   │ date    2024.08.27.10.09.54;    author root;    state Exp;
  16   │ branches;
  17   │ next    1.4;
  18   │
  19   │ 1.4
  20   │ date    2024.02.08.06.09.09;    author root;    state Exp;
  21   │ branches;
  22   │ next    1.3;
  23   │
  24   │ 1.3
  25   │ date    2024.02.08.06.08.47;    author root;    state Exp;
  26   │ branches;
  27   │ next    1.2;
  28   │
  29   │ 1.2
  30   │ date    2024.02.08.06.07.56;    author root;    state Exp;
  31   │ branches;
  32   │ next    1.1;
  33   │
  34   │ 1.1
  35   │ date    2024.02.08.06.06.15;    author root;    state Exp;
  36   │ branches;
  37   │ next    ;
  38   │
  39   │
  40   │ desc
  41   │ @/usr/local/lsws/conf/httpd_config.conf0
  42   │ @
  43   │
  44   │
  45   │ 1.6
  46   │ log
  47   │ @Update
  48   │ @
  49   │ text
  50   │ @#
  51   │ # PLAIN TEXT CONFIGURATION FILE
  52   │ #
  53   │
  54   │ # If not set, will use host name as serverName
  55   │ serverName
  56   │ user                             www-data
  57   │ group                            www-data
  58   │ priority                         0
  59   │ autoRestart                      1
  60   │ chrootPath                       /
  61   │ enableChroot                     0
  62   │ inMemBufSize                     60M
  63   │ swappingDir                      /tmp/lshttpd/swap
  64   │ autoFix503                       1
  65   │ gracefulRestartTimeout           300
  66   │ mime                             conf/mime.properties
  67   │ showVersionNumber                0
  68   │ adminEmails root@@localhost
  69   │ #adminEmails                      root@@localhost
  70   │ indexFiles                       index.html, index.php
  71   │ disableWebAdmin                  0
  72   │
  73   │ errorlog logs/error.log {
  74   │         keepDays             1
  75   │         logLevel             DEBUG
  76   │         debugLevel           0
  77   │         rollingSize          10M
  78   │         enableStderrLog      1
  79   │ }
  80   │
  81   │ accessLog logs/access.log {
  82   │         rollingSize          10M
  83   │         keepDays             30
  84   │         compressArchive      0
  85   │         logReferer           1
  86   │         logUserAgent         1
  87   │ }
  88   │
  89   │ expires {
  90   │     enableExpires           1
  91   │     expiresByType           image/*=A604800,text/css=A604800,application/x-javascript=A604800,application/javascript=A604800,font/*=A604800,application/x-fo
       │ nt-ttf=A604800
  92   │ }
  93   │
  94   │ tuning{
  95   │     maxConnections               10000
  96   │     maxSSLConnections            10000
  97   │     connTimeout                  300
  98   │     maxKeepAliveReq              10000
  99   │     smartKeepAlive               0
 100   │     keepAliveTimeout             5
 101   │     sndBufSize                   0
 102   │     rcvBufSize                   0
 103   │     gzipStaticCompressLevel      6
 104   │     gzipMaxFileSize              10M
 105   │     eventDispatcher              best
 106   │     maxCachedFileSize            4096
 107   │     totalInMemCacheSize          20M
 108   │     maxMMapFileSize              256K
 109   │     totalMMapCacheSize           40M
 110   │     useSendfile                  1
 111   │     fileETag                     28
 112   │     SSLCryptoDevice              null
 113   │     maxReqURLLen                 32768
 114   │     maxReqHeaderSize             65536
 115   │     maxReqBodySize               2047M
 116   │     maxDynRespHeaderSize         32768
 117   │     maxDynRespSize               2047M
 118   │     enableGzipCompress           1
 119   │     enableBrCompress             4
 120   │     enableDynGzipCompress        1
 121   │     gzipCompressLevel            6
 122   │     brStaticCompressLevel        6
 123   │     compressibleTypes            default
 124   │     gzipAutoUpdateStatic         1
 125   │     gzipMinFileSize              300
 126   │
 127   │     quicEnable                   1
 128   │     quicShmDir                   /dev/shm
 129   │
 130   │ }
 131   │
 132   │ accessDenyDir{
 133   │     dir                  /
 134   │     dir                  /etc/*
 135   │     dir                  /dev/*
 136   │     dir                  conf/*
 137   │     dir                  admin/conf/*
 138   │ }
 139   │
 140   │ fileAccessControl{
 141   │     followSymbolLink                            1
 142   │     checkSymbolLink                             0
 143   │     requiredPermissionMask                      000
 144   │     restrictedPermissionMask                    000
 145   │ }
 146   │
 147   │ perClientConnLimit{
 148   │     staticReqPerSec                          0
 149   │     dynReqPerSec                             0
 150   │     outBandwidth                             0
 151   │     inBandwidth                              0
 152   │     softLimit                                10000
 153   │     hardLimit                                10000
 154   │     gracePeriod                              15
 155   │     banPeriod                                300
 156   │ }
 157   │
 158   │ CGIRLimit{
 159   │     maxCGIInstances                         20
 160   │     minUID                                  11
 161   │     minGID                                  10
 162   │     priority                                0
 163   │     CPUSoftLimit                            10
 164   │     CPUHardLimit                            50
 165   │     memSoftLimit                            2047M
 166   │     memHardLimit                            2047M
 167   │     procSoftLimit                           400
 168   │     procHardLimit                           450
 169   │ }
 170   │
 171   │ accessControl{
 172   │     allow                                   ALL
 173   │     deny
 174   │ }
 175   │
 176   │ extProcessor lsphp{
 177   │     type                            lsapi
 178   │     address                         uds://tmp/lshttpd/lsphp.sock
 179   │     maxConns                        10
 180   │     env                             PHP_LSAPI_CHILDREN=10
 181   │     env                             LSAPI_AVOID_FORK=200M
 182   │     initTimeout                     60
 183   │     retryTimeout                    0
 184   │     persistConn                     1
 185   │     pcKeepAliveTimeout
 186   │     respBuffer                      0
 187   │     autoStart                       1
 188   │     path                            lsphp81/bin/lsphp
 189   │     backlog                         100
 190   │     instances                       1
 191   │     priority                        0
 192   │     memSoftLimit                    0
 193   │     memHardLimit                    0
 194   │     procSoftLimit                   1400
 195   │     procHardLimit                   1500
 196   │ }
 197   │
 198   │ scriptHandler{
 199   │     add lsapi:lsphp  php
 200   │ }
 201   │
 202   │ railsDefaults{
 203   │     binPath
 204   │     railsEnv                 1
 205   │     maxConns                 1
 206   │     env                      LSAPI_MAX_IDLE=60
 207   │     initTimeout              60
 208   │     retryTimeout             0
 209   │     pcKeepAliveTimeout       60
 210   │     respBuffer               0
 211   │     backlog                  50
 212   │     runOnStartUp             3
 213   │     extMaxIdleTime           300
 214   │     priority                 3
 215   │     memSoftLimit             0
 216   │     memHardLimit             0
 217   │     procSoftLimit            500
 218   │     procHardLimit            600
 219   │ }
 220   │
 221   │ wsgiDefaults{
 222   │     binPath
 223   │     railsEnv                 1
 224   │     maxConns                 5
 225   │     env                      LSAPI_MAX_IDLE=60
 226   │     initTimeout              60
 227   │     retryTimeout             0
 228   │     pcKeepAliveTimeout       60
 229   │     respBuffer               0
 230   │     backlog                  50
 231   │     runOnStartUp             3
 232   │     extMaxIdleTime           300
 233   │     priority                 3
 234   │     memSoftLimit             0
 235   │     memHardLimit             0
 236   │     procSoftLimit            500
 237   │     procHardLimit            600
 238   │ }
 239   │
 240   │ nodeDefaults{
 241   │     binPath
 242   │     railsEnv                 1
 243   │     maxConns                 5
 244   │     env                      LSAPI_MAX_IDLE=60
 245   │     initTimeout              60
 246   │     retryTimeout             0
 247   │     pcKeepAliveTimeout       60
 248   │     respBuffer               0
 249   │     backlog                  50
 250   │     runOnStartUp             3
 251   │     extMaxIdleTime           300
 252   │     priority                 3
 253   │     memSoftLimit             0
 254   │     memHardLimit             0
 255   │     procSoftLimit            500
 256   │     procHardLimit            600
 257   │ }
 258   │
 259   │ virtualHost Example{
 260   │     vhRoot                   Example/
 261   │     allowSymbolLink          1
 262   │     enableScript             1
 263   │     restrained               1
 264   │     maxKeepAliveReq
 265   │     smartKeepAlive
 266   │     setUIDMode               0
 267   │     chrootMode               0
 268   │     configFile               conf/vhosts/Example/vhconf.conf
 269   │ }
 270   │
 271   │ listener Default{
 272   │     address                  *:8088
 273   │     secure                   0
 274   │   map                     wordpress 46.101.222.231, iphonehub.cz, www.iphonehub.cz
 275   │ }
 276   │
 277   │ vhTemplate centralConfigLog{
 278   │     templateFile             conf/templates/ccl.conf
 279   │     listeners                Default
 280   │ }
 281   │
 282   │ vhTemplate EasyRailsWithSuEXEC{
 283   │     templateFile             conf/templates/rails.conf
 284   │     listeners                Default
 285   │ }
 286   │
 287   │ module cache {
 288   │     ls_enabled   1
 289   │ #          1
 290   │
 291   │     checkPrivateCache   1
 292   │     checkPublicCache    1
 293   │     maxCacheObjSize     10000000
 294   │     maxStaleAge         0
 295   │     qsCache             1
 296   │     reqCookieCache      1
 297   │     respCookieCache     1
 298   │     ignoreReqCacheCtrl  1
 299   │     ignoreRespCacheCtrl 0
 300   │
 301   │     enableCache         0
 302   │     expireInSeconds     3600
 303   │     enablePrivateCache  0
 304   │     privateExpireInSeconds 3600
 305   │
 306   │ }
 307   │
 308   │
 309   │ listener wordpress {
 310   │ address                 *:80
 311   │ secure                  0
 312   │   map                     wordpress 46.101.222.231, iphonehub.cz, www.iphonehub.cz
 313   │ }
 314   │
 315   │
 316   │ listener wordpressssl {
 317   │ address                 *:443
 318   │ secure                  1
 319   │   map                     wordpress 46.101.222.231, iphonehub.cz, www.iphonehub.cz
 320   │ keyFile                 /usr/local/lsws/conf/example.key
 321   │ certFile                /usr/local/lsws/conf/example.crt
 322   │ }
 323   │
 324   │
 325   │ virtualhost wordpress {
 326   │ vhRoot                  /var/www/html
 327   │ configFile              /usr/local/lsws/conf/vhosts/wordpress/vhconf.conf
 328   │ allowSymbolLink         1
 329   │ enableScript            1
 330   │ restrained              0
 331   │ setUIDMode              2
 332   │ }
 333   │ @
 334   │
 335   │
 336   │ 1.5
 337   │ log
 338   │ @Update
 339   │ @
 340   │ text
 341   │ @d225 1
 342   │ a225 1
 343   │   map                     wordpress 46.101.222.231
 344   │ d263 1
 345   │ a263 1
 346   │   map                     wordpress 46.101.222.231
 347   │ d270 1
 348   │ a270 1
 349   │   map                     wordpress 46.101.222.231
 350   │ @
 351   │
 352   │
 353   │ 1.4
 354   │ log
 355   │ @Update
 356   │ @
 357   │ text
 358   │ @d225 1
 359   │ a225 1
 360   │     map                      Example *
 361   │ d263 1
 362   │ a263 1
 363   │ map                     wordpress *
 364   │ d270 1
 365   │ a270 1
 366   │ map                     wordpress *
 367   │ @
 368   │
 369   │
 370   │ 1.3
 371   │ log
 372   │ @Update
 373   │ @
 374   │ text
 375   │ @d25 1
 376   │ d245 1
 377   │ a245 1
 378   │     maxStaleAge         200
 379   │ d277 1
 380   │ a277 1
 381   │ vhRoot                  /var/www/html.old
 382   │ @
 383   │
 384   │
 385   │ 1.2
 386   │ log
 387   │ @Update
 388   │ @
 389   │ text
 390   │ @d7 2
 391   │ a8 2
 392   │ user                             nobody
 393   │ group                            nogroup
 394   │ @
 395   │
 396   │
 397   │ 1.1
 398   │ log
 399   │ @Update
 400   │ @
 401   │ text
 402   │ @d19 2
 403   │ a20 1
 404   │ adminEmails                      root@@localhost
 405   │ d138 1
 406   │ a138 1
 407   │     path                            lsphp74/bin/lsphp
 408   │ d238 2
 409   │ a239 1
 410   │     ls_enabled          1
 411   │ d258 25
 412   │ @

Ubuntu 22 Lamp or OLS

https://www.digitalocean.com/community/tutorials/how-to-install-the-openlitespeed-web-server-on-ubuntu-20-04 https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-20-04 https://wpengine.com/resources/nginx-vs-apache-wordpress/ https://www.digitalocean.com/community/tutorials/how-to-configure-ssh-key-based-authentication-on-a-linux-server https://sftpcloud.io/learn/sftp/how-to-setup-sftp-server-on-ubuntu-22-04

sudo apt -y upgrade && sudo apt upgrade

SSH-KEY

cat ~/.ssh/id_rsa.pub | ssh [email protected] "mkdir -p ~/.ssh && touch ~/.ssh/authorized_keys && chmod -R go= ~/.ssh && cat >> ~/.ssh/authorized_keys"
sudo nano /etc/ssh/sshd_config
PasswordAuthentication no
Match User root
PasswordAuthentication yes

Add sudo not-root user, setup SFTP

adduser web
usermod -aG sudo web
sudo groupadd sftpusers
sudo usermod -G sftpusers -s /usr/sbin/nologin web
cat /home/web/.ssh/authorized_keys > ~/.ssh/authorized_keys

sudo chown web:sftpusers /home/web
sudo chmod 755 /home/web

UFW

ufw app list ufw allow OpenSSH ufw enable

WP Utils

Requires: wp-cli

ZIP

zip -r site.zip . -x $(cat .distignore | xargs)

.distignore:

*.git*
*.DS_Store
node_modules/*
README.md
*.idea*
info.php
phpinfo.php
*.sql
.backup/*

Migrate script

from_url="https://site.cz"
wp_siteurl="http://site.test"
wp_dbname="prod_db"
wp_dbuser="root"
wp_dbpassword=""

# Cook wp-config.php
wp config shuffle-salts
wp config set WP_SITEURL "$wp_siteurl"
wp config set WP_HOME "$wp_siteurl"
wp config set DB_NAME "$wp_dbname"
wp config set DB_USER "$wp_dbuser"
wp config set DB_PASSWORD "$wp_dbpassword"
wp config set LITESPEED_DISABLE_ALL true --raw

# Replace the URL's in DB
wp search-replace "$from_url" "$wp_siteurl" --dry-run
wp elementor replace-urls "$from_url" "$wp_siteurl"

DB search-replace (SQL)

UPDATE wp_options SET option_value = replace(option_value, 'http://site.test', 'https://site.cz') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, 'http://site.test','https://site.cz');
UPDATE wp_posts SET post_content = replace(post_content, 'http://site.test', 'https://site.cz');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://site.test','https://site.cz');

UPDATE wp_yoast_indexable SET permalink = replace(permalink,'http://site.test','https://site.cz');
UPDATE wp_yoast_seo_links SET url = replace(url,'http://site.test','https://site.cz');

Tools

WP-CLI

Brew MariaDB mysql fix:

ln -s /opt/homebrew/opt/[email protected]/bin/mysqldump /usr/local/bin/mysqldump
ln -s /opt/homebrew/opt/[email protected]/bin/mysql /usr/local/bin/mysql

Laravel Valet

Multi PHP versions support

alias php='valet php'
alias composer='valet composer'
alias wp='valet php /opt/homebrew/bin/wp'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment