├── .github └── FUNDING.yml ├── .gitignore ├── README.md ├── bin ├── mysql-optimize ├── wp ├── wpcli-run-clear-scheduler-log ├── wpcli-run-clear-spams ├── wpcli-run-delete-transient ├── wpcli-run-media-regenerate └── wpcli-run-schedule ├── cron.d └── dockerpress.crontab ├── entrypoint.sh ├── php-7.4 ├── Dockerfile ├── config │ └── opcache.ini └── litespeed │ ├── admin_config.conf │ ├── httpd_config.conf │ └── vhconf.conf ├── php-8.0 ├── Dockerfile ├── config │ └── opcache.ini ├── litespeed │ ├── admin_config.conf │ ├── httpd_config.conf │ └── vhconf.conf └── memcached.conf └── wordpress ├── .htaccess └── wp-config-sample.php /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: luizeof 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build.sh -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DockerPress 2 | 3 | **DockerPress** is a set of services that allows you to configure an exclusive Docker environment for WordPress with the most powerful tools like **OpenliteSpeed**, **Redis**, **Traefik** and **MySQL 8**. 4 | 5 | DockerPress has some Out of the Box features: 6 | 7 | - [wp-cli (Wordpress Command Line Client)](https://wp-cli.org/) 8 | - [OpenLiteSpeed](https://openlitespeed.org/) 9 | - [OPcache](https://www.php.net/manual/pt_BR/book.opcache.php) 10 | - [Automatically generation thumb images on background](https://br.wordpress.org/plugins/regenerate-thumbnails/) 11 | - Automatically removes spam comments 12 | - Automatically remove transient posts 13 | - [Action Scheduler](https://actionscheduler.org/) 14 | 15 | The official DockerPress image can be accessed at [https://hub.docker.com/r/luizeof/dockerpress](https://hub.docker.com/r/luizeof/dockerpress). 16 | 17 | ## Environment Variables 18 | 19 | Use the values below to configure your WordPress installation. 20 | 21 | #### Database Settings 22 | 23 | | ENV | Default | Required | Description | 24 | | --------------------- | ------- | -------- | ------------------- | 25 | | WORDPRESS_DB_HOST | | Yes | MySQL Host | 26 | | WORDPRESS_DB_PORT | 3306 | Yes | MySQL Port | 27 | | WORDPRESS_DB_NAME | | Yes | MySQL Database Name | 28 | | WORDPRESS_DB_PASSWORD | | Yes | MySQL Password | 29 | | WORDPRESS_DB_USER | | Yes | MySQL Username | 30 | 31 | #### General Settings 32 | 33 | | ENV | Default | Required | Description | 34 | | ------------ | ------- | -------- | ------------------------------------------------------------------------------ | 35 | | VIRTUAL_HOST | | Yes | Website Domain | 36 | | ADMIN_EMAIL | | Yes | Wordpress Admin E-mail | 37 | | WP_LOCALE | en_US | No | Wordpress Locale ([Available Locales](https://translate.wordpress.org/stats/)) | 38 | | WP_DEBUG | false | No | Enable / Disable Wordpress Debug | 39 | 40 | ## Container Volume 41 | 42 | By default, DockerPress uses a single volume that must be mapped to `/var/www/html`. The entire WordPress installation is stored in this path. 43 | -------------------------------------------------------------------------------- /bin/mysql-optimize: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | mysqlcheck -h WORDPRESS_DB_HOST -u WORDPRESS_DB_USER -pWORDPRESS_DB_PASSWORD WORDPRESS_DB_NAME --optimize --auto-repair 4 | -------------------------------------------------------------------------------- /bin/wp: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -z "$1" ]; 4 | then 5 | echo "usage: wp command --args" 6 | else 7 | sudo -E -u www-data /var/www/wp-cli.phar "$@" 8 | fi 9 | -------------------------------------------------------------------------------- /bin/wpcli-run-clear-scheduler-log: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | wp comment list --field=comment_ID --'post_author'='ActionScheduler' --number=1000 --path=/var/www/html | xargs wp comment delete --force --path=/var/www/html 4 | -------------------------------------------------------------------------------- /bin/wpcli-run-clear-spams: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | wp comment delete $(wp comment list --status=spam --format=ids --path=/var/www/html) --path=/var/www/html 4 | -------------------------------------------------------------------------------- /bin/wpcli-run-delete-transient: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | wp transient delete --expired --path=/var/www/html 4 | -------------------------------------------------------------------------------- /bin/wpcli-run-media-regenerate: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | touch /var/www/media-regenerate.log 4 | 5 | chown www-data:www-data /var/www/media-regenerate.log 6 | 7 | wp media regenerate --only-missing --yes --path=/var/www/html > /var/www/media-regenerate.log 8 | -------------------------------------------------------------------------------- /bin/wpcli-run-schedule: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Run wp-cron events 4 | 5 | touch /var/www/event-scheduler.log 6 | 7 | chown www-data:www-data /var/www/event-scheduler.log 8 | 9 | wp cron event run --due-now --path=/var/www/html >/var/www/event-scheduler.log 10 | 11 | # Run Action Scheduler 12 | 13 | touch /var/www/wp-scheduler.log 14 | 15 | chown www-data:www-data /var/www/wp-scheduler.log 16 | 17 | wp action-scheduler run --path=/var/www/html >/var/www/wp-scheduler.log 18 | -------------------------------------------------------------------------------- /cron.d/dockerpress.crontab: -------------------------------------------------------------------------------- 1 | SHELL=/bin/bash 2 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 3 | 4 | * * * * * root /usr/local/bin/wpcli-run-schedule 5 | 5 2 * * * root /usr/local/bin/wpcli-run-delete-transient 6 | 5 3 * * * root /usr/local/bin/wpcli-run-clear-spams 7 | 5 4 * * * root /usr/local/bin/wpcli-run-clear-scheduler-log 8 | 5 5 * * * root /usr/local/bin/wpcli-run-media-regenerate 9 | -------------------------------------------------------------------------------- /entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # start memcache service 4 | service memcached start 5 | 6 | # remove default index.html if exists 7 | rm -f /var/www/html/index.html 8 | 9 | function finish() { 10 | /usr/local/lsws/bin/lswsctrl "stop" 11 | pkill "tail" 12 | } 13 | 14 | function update_wp_config() { 15 | echo "Updating wp-config.php ..." 16 | wp config set WP_SITEURL "https://$VIRTUAL_HOST" --add --type=constant 17 | wp config set WP_HOME "https://$VIRTUAL_HOST" --add --type=constant 18 | wp config set DB_NAME $WORDPRESS_DB_NAME --add --type=constant 19 | wp config set DB_USER $WORDPRESS_DB_USER --add --type=constant 20 | wp config set DB_PASSWORD $WORDPRESS_DB_PASSWORD --add --type=constant 21 | wp config set DB_HOST "$WORDPRESS_DB_HOST:$WORDPRESS_DB_PORT" --add --type=constant 22 | wp config set DB_PREFIX $WORDPRESS_DB_PREFIX --add --type=constant 23 | wp config set DB_PORT $WORDPRESS_DB_PORT --raw --add --type=constant 24 | wp config set WP_DEBUG $WP_DEBUG --raw --add --type=constant 25 | wp config set WP_MEMORY_LIMIT 512M --add --type=constant 26 | wp config set WP_MAX_MEMORY_LIMIT 512M --add --type=constant 27 | wp config set DISABLE_WP_CRON $DISABLE_WP_CRON --raw --add --type=constant 28 | } 29 | 30 | function generate_litespeed_password() { 31 | if [ -n "${ADMIN_PASSWORD}" ]; then 32 | ENCRYPT_PASSWORD="$(/usr/local/lsws/admin/fcgi-bin/admin_php -q '/usr/local/lsws/admin/misc/htpasswd.php' "${ADMIN_PASSWORD}")" 33 | echo "admin:${ENCRYPT_PASSWORD}" >'/usr/local/lsws/admin/conf/htpasswd' 34 | echo "WebAdmin user/password is admin/${ADMIN_PASSWORD}" >'/usr/local/lsws/adminpasswd' 35 | fi 36 | } 37 | 38 | function setup_mysql_client() { 39 | echo "Updating my.cnf ..." 40 | mv /root/.my.cnf.sample /root/.my.cnf 41 | sed -i -e "s/MYUSER/$WORDPRESS_DB_USER/g" /root/.my.cnf 42 | sed -i -e "s/MYPASSWORD/$WORDPRESS_DB_PASSWORD/g" /root/.my.cnf 43 | sed -i -e "s/MYHOST/$WORDPRESS_DB_HOST/g" /root/.my.cnf 44 | sed -i -e "s/MYDATABASE/$WORDPRESS_DB_NAME/g" /root/.my.cnf 45 | sed -i -e "s/MYPORT/$WORDPRESS_DB_PORT/g" /root/.my.cnf 46 | } 47 | 48 | function install_wp_cli() { 49 | echo "Setting up wp-cli..." 50 | rm -rf /var/www/.wp-cli/ 51 | mkdir -p $WP_CLI_CACHE_DIR 52 | chown -R www-data:www-data $WP_CLI_CACHE_DIR 53 | rm -rf $WP_CLI_PACKAGES_DIR 54 | mkdir -p $WP_CLI_PACKAGES_DIR 55 | chown -R www-data:www-data $WP_CLI_PACKAGES_DIR 56 | rm -f /var/www/wp-cli.phar 57 | curl -o /var/www/wp-cli.phar https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar 58 | chmod +x /var/www/wp-cli.phar 59 | rm -rf /var/www/wp-completion.bash 60 | curl -o /var/www/wp-completion.bash https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash 61 | source /var/www/wp-completion.bash 62 | } 63 | 64 | function setup_mysql_optimize() { 65 | echo "Setting up MySL Optimize..." 66 | sed -i -e "s/WORDPRESS_DB_HOST/$WORDPRESS_DB_HOST/g" /usr/local/bin/mysql-optimize 67 | sed -i -e "s/WORDPRESS_DB_USER/$WORDPRESS_DB_USER/g" /usr/local/bin/mysql-optimize 68 | sed -i -e "s/WORDPRESS_DB_PASSWORD/$WORDPRESS_DB_PASSWORD/g" /usr/local/bin/mysql-optimize 69 | sed -i -e "s/WORDPRESS_DB_NAME/$WORDPRESS_DB_NAME/g" /usr/local/bin/mysql-optimize 70 | sed -i -e "s/WORDPRESS_DB_PORT/$WORDPRESS_DB_PORT/g" /usr/local/bin/mysql-optimize 71 | } 72 | 73 | function create_wordpress_database() { 74 | if [ -n "$MYSQL_ROOT_PASSWORD" ]; then 75 | echo "Try create Database if not exists using root ..." 76 | mysql --no-defaults -h $WORDPRESS_DB_HOST --port $WORDPRESS_DB_PORT -u root -p$MYSQL_ROOT_PASSWORD -e "CREATE DATABASE IF NOT EXISTS $WORDPRESS_DB_NAME;" 77 | else 78 | echo "Try create Database if not exists using $WORDPRESS_DB_USER user ..." 79 | mysql --no-defaults -h $WORDPRESS_DB_HOST --port $WORDPRESS_DB_PORT -u $WORDPRESS_DB_USER -p$WORDPRESS_DB_PASSWORD -e "CREATE DATABASE IF NOT EXISTS $WORDPRESS_DB_NAME;" 80 | fi 81 | } 82 | 83 | function install_wordpress() { 84 | chown -R www-data:www-data /var/www/html 85 | 86 | if [ ! -e /var/www/html/wp-config.php ]; then 87 | 88 | echo "Wordpress not found, downloading latest version ..." 89 | wp core download --path=/var/www/html 90 | 91 | echo "Creating wp-config.file ..." 92 | cp /var/www/wp-config-sample.php /var/www/html/wp-config.php 93 | chown www-data:www-data /var/www/html/wp-config.php 94 | update_wp_config 95 | 96 | echo "Shuffling wp-config.php salts ..." 97 | wp config shuffle-salts 98 | 99 | # if Wordpress is installed 100 | if ! $(wp core is-installed); then 101 | echo "Installing Wordpress for $VIRTUAL_HOST ..." 102 | wp core install --url=$VIRTUAL_HOST \ 103 | --title=Wordpress \ 104 | --admin_user=$ADMIN_USER \ 105 | --admin_password=$ADMIN_PASS \ 106 | --admin_email=$ADMIN_EMAIL \ 107 | --skip-email \ 108 | --path=/var/www/html 109 | 110 | # Updating Plugins ... 111 | echo "Updating plugins ..." 112 | wp plugin update --all --path=/var/www/html 113 | 114 | # Remove unused Dolly 115 | echo "Remove Dolly..." 116 | wp plugin delete hello --path=/var/www/html 117 | 118 | # Updating Themes ... 119 | echo "Updating themes ..." 120 | wp theme update --all --path=/var/www/html 121 | 122 | echo "Done Installing." 123 | 124 | cp /var/www/.htaccess /var/www/html 125 | chown -R www-data:www-data /var/www/html/.htaccess 126 | wp rewrite structure '/%postname%/' 127 | 128 | else 129 | echo 'Wordpress is already installed.' 130 | fi 131 | else 132 | echo 'wp-config.php file already exists.' 133 | update_wp_config 134 | fi 135 | } 136 | 137 | function install_dockerpress_plugins() { 138 | echo "Installing action-scheduler ..." 139 | wp plugin install action-scheduler --force --activate --path=/var/www/html 140 | 141 | echo "Installing litespeed-cache ..." 142 | wp plugin install litespeed-cache --force --activate --path=/var/www/html 143 | 144 | echo "Installing regenerate-thumbnails ..." 145 | wp plugin install regenerate-thumbnails --force --activate --path=/var/www/html 146 | } 147 | 148 | cd /var/www/html 149 | 150 | # Generate litespeed Admin Password 151 | generate_litespeed_password 152 | 153 | trap cleanup SIGTERM 154 | 155 | #### Setting Up MySQL Client Defaults 156 | setup_mysql_client 157 | 158 | #### Setup wp-cli 159 | install_wp_cli 160 | 161 | ### setting up cron service 162 | service cron reload 163 | service cron start 164 | 165 | #### Setting up Mysql Optimize 166 | setup_mysql_optimize 167 | 168 | #### Creating Wordpress Database 169 | create_wordpress_database 170 | 171 | # run wordpress installer 172 | install_wordpress 173 | 174 | # install and activate default plugins 175 | install_dockerpress_plugins 176 | 177 | # update file permissions 178 | chown -R www-data:www-data /var/www/html 179 | 180 | wp core verify-checksums 181 | 182 | service memcached start 183 | 184 | # Start the LiteSpeed 185 | /usr/local/lsws/bin/litespeed 186 | 187 | # welcome to dockerpress 188 | sysvbanner dockerpress 189 | 190 | # Read the credentials 191 | cat '/usr/local/lsws/adminpasswd' 192 | 193 | # Tail the logs to stdout 194 | tail -f \ 195 | '/var/log/litespeed/access.log' 196 | 197 | exec "$@" 198 | -------------------------------------------------------------------------------- /php-7.4/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM bitnami/minideb:buster 2 | 3 | LABEL name="DockerPress" 4 | LABEL version="3.0.0" 5 | LABEL release="2022-03-07" 6 | 7 | WORKDIR /var/www/html 8 | 9 | # ENV Defaults 10 | ENV WP_CLI_CACHE_DIR "/var/www/.wp-cli/cache/" 11 | ENV WP_CLI_PACKAGES_DIR "/var/www/.wp-cli/packages/" 12 | ENV ADMIN_EMAIL "webmaster@host.com" 13 | ENV WP_LOCALE "en_US" 14 | ENV WP_DEBUG false 15 | ENV WORDPRESS_DB_PREFIX "wp_" 16 | ENV WORDPRESS_DB_PORT 3306 17 | ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE="1" 18 | ENV DEBIAN_FRONTEND="noninteractive" 19 | ENV DISABLE_WP_CRON=true 20 | 21 | # HTTP port 22 | EXPOSE "80/tcp" 23 | 24 | # Webadmin port (HTTPS) 25 | EXPOSE "7080/tcp" 26 | 27 | # Install System Libraries 28 | RUN apt-get update \ 29 | && \ 30 | apt-get install -y --no-install-recommends \ 31 | sudo \ 32 | curl \ 33 | cron \ 34 | less \ 35 | sysvbanner \ 36 | wget \ 37 | nano \ 38 | htop \ 39 | ghostscript \ 40 | zip \ 41 | unzip \ 42 | git \ 43 | webp \ 44 | libwebp6 \ 45 | memcached \ 46 | libmemcached-tools \ 47 | graphicsmagick \ 48 | imagemagick \ 49 | zlib1g \ 50 | inetutils-ping \ 51 | libxml2 \ 52 | default-mysql-client\ 53 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ 54 | && rm -rf /var/lib/apt/lists/* \ 55 | && sudo apt-get clean 56 | 57 | # Make sure we have required tools 58 | RUN install_packages \ 59 | "curl" \ 60 | "gnupg" 61 | 62 | 63 | RUN wget -O - http://rpms.litespeedtech.com/debian/enable_lst_debian_repo.sh | bash 64 | 65 | # Install the Litespeed keys 66 | RUN curl --silent --show-error \ 67 | "http://rpms.litespeedtech.com/debian/lst_debian_repo.gpg" |\ 68 | apt-key add - 69 | 70 | RUN curl --silent --show-error \ 71 | "http://rpms.litespeedtech.com/debian/lst_repo.gpg" |\ 72 | apt-key add - 73 | 74 | # Install the Litespeed repository 75 | RUN # echo "deb http://rpms.litespeedtech.com/debian/ buster main" > "/etc/apt/sources.list.d/openlitespeed.list" 76 | 77 | # Install the Litespeed 78 | RUN install_packages \ 79 | "openlitespeed" && \ 80 | echo "cloud-docker" > "/usr/local/lsws/PLAT" 81 | 82 | # Install PageSpeed module 83 | RUN install_packages \ 84 | "ols-pagespeed" 85 | 86 | # Install the PHP 87 | RUN install_packages \ 88 | "lsphp74" 89 | 90 | # Install PHP modules 91 | RUN install_packages \ 92 | "lsphp74-dev" \ 93 | "lsphp74-apcu" \ 94 | "lsphp74-common" \ 95 | "lsphp74-curl" \ 96 | "lsphp74-igbinary" \ 97 | "lsphp74-imagick" \ 98 | "lsphp74-imap" \ 99 | "lsphp74-intl" \ 100 | "lsphp74-ldap" \ 101 | "lsphp74-memcached" \ 102 | "lsphp74-msgpack" \ 103 | "lsphp74-mysql" \ 104 | "lsphp74-opcache" \ 105 | "lsphp74-pear" \ 106 | "lsphp74-pgsql" \ 107 | "lsphp74-pspell" \ 108 | "lsphp74-redis" \ 109 | "lsphp74-sqlite3" \ 110 | "lsphp74-json" \ 111 | "lsphp74-tidy" \ 112 | "lsphp74-*" 113 | 114 | # Set the default PHP CLI 115 | RUN ln --symbolic --force \ 116 | "/usr/local/lsws/lsphp74/bin/lsphp" \ 117 | "/usr/local/lsws/fcgi-bin/lsphp5" 118 | 119 | RUN ln --symbolic --force \ 120 | "/usr/local/lsws/lsphp74/bin/php7.4" \ 121 | "/usr/bin/php" 122 | 123 | # Install the certificates 124 | RUN install_packages \ 125 | "ca-certificates" 126 | 127 | # Install requirements 128 | RUN install_packages \ 129 | "procps" \ 130 | "tzdata" 131 | 132 | # PHP Settings 133 | RUN sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 128M/g' /usr/local/lsws/lsphp74/etc/php/7.4/litespeed/php.ini 134 | RUN sed -i 's/post_max_size = 8M/post_max_size = 256M/g' /usr/local/lsws/lsphp74/etc/php/7.4/litespeed/php.ini 135 | 136 | COPY php-7.4/config/opcache.ini /usr/local/lsws/lsphp74/etc/php/7.4/mods-available/opcache.ini 137 | 138 | RUN touch /var/www/.opcache 139 | 140 | # Create the directories 141 | RUN mkdir --parents \ 142 | "/tmp/lshttpd/gzcache" \ 143 | "/tmp/lshttpd/pagespeed" \ 144 | "/tmp/lshttpd/stats" \ 145 | "/tmp/lshttpd/swap" \ 146 | "/tmp/lshttpd/upload" \ 147 | "/var/log/litespeed" 148 | 149 | # Make sure logfiles exist 150 | RUN touch \ 151 | "/var/log/litespeed/server.log" \ 152 | "/var/log/litespeed/access.log" 153 | 154 | # Make sure we have access to files 155 | RUN chown --recursive "lsadm:lsadm" \ 156 | "/tmp/lshttpd" \ 157 | "/var/log/litespeed" 158 | 159 | # Configure the admin interface 160 | COPY --chown="lsadm:lsadm" \ 161 | "php-7.4/litespeed/admin_config.conf" \ 162 | "/usr/local/lsws/admin/conf/admin_config.conf" 163 | 164 | # Configure the server 165 | COPY --chown="lsadm:lsadm" \ 166 | "php-7.4/litespeed/httpd_config.conf" \ 167 | "/usr/local/lsws/conf/httpd_config.conf" 168 | 169 | # Create the virtual host folders 170 | RUN mkdir --parents \ 171 | "/usr/local/lsws/conf/vhosts/wordpress" \ 172 | "/var/www" \ 173 | "/var/www/html" \ 174 | "/var/www/tmp" 175 | 176 | # Configure the virtual host 177 | COPY --chown="lsadm:lsadm" \ 178 | "php-7.4/litespeed/vhconf.conf" \ 179 | "/usr/local/lsws/conf/vhosts/wordpress/vhconf.conf" 180 | 181 | # Set up the virtual host configuration permissions 182 | RUN chown --recursive "lsadm:lsadm" \ 183 | "/usr/local/lsws/conf/vhosts/wordpress" 184 | 185 | # Set up the virtual host document root permissions 186 | RUN chown --recursive "www-data:www-data" \ 187 | "/var/www/html" 188 | 189 | RUN chown "www-data:www-data" \ 190 | "/var/www" 191 | 192 | RUN apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ 193 | ; \ 194 | rm -rf /var/lib/apt/lists/* 195 | 196 | # Default Volume for Web 197 | VOLUME /var/www/html 198 | 199 | COPY wordpress/.htaccess /var/www 200 | 201 | COPY wordpress/wp-config-sample.php /var/www/wp-config-sample.php 202 | 203 | # Copy commands 204 | COPY bin/* /usr/local/bin/ 205 | 206 | # Add Permissions 207 | RUN chmod +x /usr/local/bin/wp 208 | RUN chmod +x /usr/local/bin/mysql-optimize 209 | RUN chmod +x /usr/local/bin/wpcli-run-clear-scheduler-log 210 | RUN chmod +x /usr/local/bin/wpcli-run-clear-spams 211 | RUN chmod +x /usr/local/bin/wpcli-run-delete-transient 212 | RUN chmod +x /usr/local/bin/wpcli-run-media-regenerate 213 | RUN chmod +x /usr/local/bin/wpcli-run-schedule 214 | 215 | # Copy Crontab 216 | COPY cron.d/dockerpress.crontab /etc/cron.d/dockerpress 217 | RUN chmod 644 /etc/cron.d/dockerpress 218 | 219 | RUN { \ 220 | echo '[client]'; \ 221 | echo 'user=MYUSER'; \ 222 | echo "password='MYPASSWORD'"; \ 223 | echo 'host=MYHOST'; \ 224 | echo 'port=MYPORT'; \ 225 | echo ''; \ 226 | echo '[mysql]'; \ 227 | echo 'database=MYDATABASE'; \ 228 | echo ''; \ 229 | } > /root/.my.cnf.sample 230 | 231 | # Running wordpress startup scripts 232 | COPY entrypoint.sh /usr/local/bin/entrypoint.sh 233 | RUN chmod +x /usr/local/bin/entrypoint.sh 234 | 235 | # Default Port for Apache 236 | EXPOSE 80 237 | 238 | # Set the workdir and command 239 | ENV PATH="/usr/local/lsws/bin:${PATH}" 240 | 241 | ENTRYPOINT ["entrypoint.sh"] 242 | -------------------------------------------------------------------------------- /php-7.4/config/opcache.ini: -------------------------------------------------------------------------------- 1 | zend_extension=opcache.so; 2 | 3 | [opcache] 4 | ; Determines if Zend OPCache is enabled 5 | opcache.enable=1 6 | 7 | ; Determines if Zend OPCache is enabled for the CLI version of PHP 8 | ;opcache.enable_cli=1 9 | 10 | ; The OPcache shared memory storage size. 11 | opcache.memory_consumption=512 12 | 13 | ; The amount of memory for interned strings in Mbytes. 14 | opcache.interned_strings_buffer=64 15 | 16 | ; The maximum number of keys (scripts) in the OPcache hash table. 17 | ; Only numbers between 200 and 1000000 are allowed. 18 | ;If you have multiple PHP sites on the server then consider the value 130986 19 | ; for magento 2, keep 65406 20 | opcache.max_accelerated_files=100000 21 | 22 | ; The maximum percentage of "wasted" memory until a restart is scheduled. 23 | opcache.max_wasted_percentage=15 24 | 25 | ; When this directive is enabled, the OPcache appends the current working 26 | ; directory to the script key, thus eliminating possible collisions between 27 | ; files with the same name (basename). Disabling the directive improves 28 | ; performance, but may break existing applications. 29 | ;opcache.use_cwd=1 30 | 31 | ; When disabled, you must reset the OPcache manually or restart the 32 | ; webserver for changes to the filesystem to take effect. 33 | ; For Development / testing, keep 1 34 | ; For performance / production, keep 0 35 | opcache.validate_timestamps=0 36 | 37 | ;opcache.revalidate_freq How often in seconds should the code 38 | ;cache expire and check if your code has changed. 0 means it 39 | ;checks your PHP code every single request IF YOU HAVE 40 | ;opcache.validate_timestamps ENABLED. opcache.validate_timestamps 41 | ;should not be enabled by default, as long as it's disabled then any value for opcache. 42 | ;revalidate_freq will basically be ignored. You should really only ever enable 43 | ;this during development, you don't really want to enable this setting for a production application. 44 | opcache.revalidate_freq=0 45 | 46 | ; Enables or disables file search in include_path optimization 47 | ;opcache.revalidate_path=0 48 | 49 | ; If disabled, all PHPDoc comments are dropped from the code to reduce the 50 | ; size of the optimized code. 51 | opcache.save_comments=1 52 | 53 | ; If enabled, a fast shutdown sequence is used for the accelerated code 54 | ; Depending on the used Memory Manager this may cause some incompatibilities. 55 | opcache.fast_shutdown=1 56 | 57 | ; Allow file existence override (file_exists, etc.) performance feature. 58 | opcache.enable_file_override=1 59 | 60 | ; A bitmask, where each bit enables or disables the appropriate OPcache 61 | ; passes 62 | ;opcache.optimization_level=0xffffffff 63 | 64 | ;opcache.inherited_hack=1 65 | ;opcache.dups_fix=0 66 | 67 | ; The location of the OPcache blacklist file (wildcards allowed). 68 | ; Each OPcache blacklist file is a text file that holds the names of files 69 | ; that should not be accelerated. The file format is to add each filename 70 | ; to a new line. The filename may be a full path or just a file prefix 71 | ; (i.e., /var/www/x blacklists all the files and directories in /var/www 72 | ; that start with 'x'). Line starting with a ; are ignored (comments). 73 | ;opcache.blacklist_filename= 74 | 75 | ; Allows exclusion of large files from being cached. By default all files 76 | ; are cached. 77 | ; opcache.max_file_size=0 78 | 79 | ; Check the cache checksum each N requests. 80 | ; The default value of "0" means that the checks are disabled. 81 | opcache.consistency_checks=0 82 | 83 | ; How long to wait (in seconds) for a scheduled restart to begin if the cache 84 | ; is not being accessed. 85 | ;opcache.force_restart_timeout=180 86 | 87 | ; OPcache error_log file name. Empty string assumes "stderr". 88 | ;opcache.error_log= 89 | 90 | ; All OPcache errors go to the Web server log. 91 | ; By default, only fatal errors (level 0) or errors (level 1) are logged. 92 | ; You can also enable warnings (level 2), info messages (level 3) or 93 | ; debug messages (level 4). 94 | ;opcache.log_verbosity_level=1 95 | 96 | ; Preferred Shared Memory back-end. Leave empty and let the system decide. 97 | ;opcache.preferred_memory_model= 98 | 99 | ; Protect the shared memory from unexpected writing during script execution. 100 | ; Useful for internal debugging only. 101 | ;opcache.protect_memory=0 102 | 103 | ; Allows calling OPcache API functions only from PHP scripts which path is 104 | ; started from specified string. The default "" means no restriction 105 | ;opcache.restrict_api= 106 | 107 | ; Mapping base of shared memory segments (for Windows only). All the PHP 108 | ; processes have to map shared memory into the same address space. This 109 | ; directive allows to manually fix the "Unable to reattach to base address" 110 | ; errors. 111 | opcache.mmap_base=0x20000000 112 | 113 | ; Enables and sets the second level cache directory. 114 | ; It should improve performance when SHM memory is full, at server restart or 115 | ; SHM reset. The default "" disables file based caching. 116 | ; opcache.file_cache="/var/www/.opcache" 117 | 118 | ; Enables or disables opcode caching in shared memory. 119 | opcache.file_cache_only=0 120 | 121 | ; Enables or disables checksum validation when script loaded from file cache. 122 | ; opcache.file_cache_consistency_checks=1 123 | 124 | ; Implies opcache.file_cache_only=1 for a certain process that failed to 125 | ; reattach to the shared memory (for Windows only). Explicitly enabled file 126 | ; cache is required. 127 | ; opcache.file_cache_fallback=1 128 | 129 | ; Enables or disables copying of PHP code (text segment) into HUGE PAGES. 130 | ; This should improve performance, but requires appropriate OS configuration. 131 | opcache.huge_code_pages=1 132 | 133 | ; Validate cached file permissions. 134 | opcache.validate_permission=0 135 | 136 | ; Prevent name collisions in chroot'ed environment. 137 | ; opcache.validate_root=0 -------------------------------------------------------------------------------- /php-7.4/litespeed/admin_config.conf: -------------------------------------------------------------------------------- 1 | enableCoreDump 0 2 | sessionTimeout 3600 3 | 4 | errorlog /var/log/litespeed/admin-error.log { 5 | useServer 1 6 | logLevel INFO 7 | rollingSize 10M 8 | } 9 | 10 | accesslog /var/log/litespeed/admin-access.log { 11 | useServer 1 12 | rollingSize 10M 13 | keepDays 1 14 | } 15 | 16 | accessControl { 17 | allow ALL 18 | } 19 | 20 | listener adminListener { 21 | address *:7080 22 | secure 0 23 | } -------------------------------------------------------------------------------- /php-7.4/litespeed/httpd_config.conf: -------------------------------------------------------------------------------- 1 | user nobody 2 | group nogroup 3 | priority 0 4 | cpuAffinity 0 5 | enableLVE 0 6 | inMemBufSize 96M 7 | swappingDir /tmp/lshttpd/swap 8 | autoFix503 1 9 | enableh2c 1 10 | gracefulRestartTimeout 300 11 | statDir /tmp/lshttpd/stats 12 | mime conf/mime.properties 13 | disableInitLogRotation 1 14 | showVersionNumber 0 15 | enableIpGeo 0 16 | useIpInProxyHeader 3 17 | adminEmails root@localhost 18 | 19 | errorlog /var/log/litespeed/server.log { 20 | logLevel NOTICE 21 | debugLevel 0 22 | rollingSize 10M 23 | enableStderrLog 1 24 | } 25 | 26 | accesslog /var/log/litespeed/access.log { 27 | rollingSize 10M 28 | keepDays 1 29 | compressArchive 0 30 | } 31 | indexFiles index.html, index.php 32 | autoIndex 0 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=A604800 37 | } 38 | autoLoadHtaccess 1 39 | uploadTmpDir /tmp/lshttpd/upload 40 | uploadTmpFilePermission 640 41 | 42 | tuning { 43 | shmDefaultDir /dev/shm 44 | maxConnections 10000 45 | maxSSLConnections 10000 46 | connTimeout 300 47 | maxKeepAliveReq 10000 48 | keepAliveTimeout 5 49 | sndBufSize 0 50 | rcvBufSize 0 51 | maxReqURLLen 32768 52 | maxReqHeaderSize 65536 53 | maxReqBodySize 2047M 54 | maxDynRespHeaderSize 32768 55 | maxDynRespSize 2047M 56 | maxCachedFileSize 4096 57 | totalInMemCacheSize 512M 58 | maxMMapFileSize 256K 59 | totalMMapCacheSize 512M 60 | useSendfile 1 61 | fileETag 28 62 | enableGzipCompress 1 63 | compressibleTypes text/*, application/x-javascript, application/xml, application/javascript, image/svg+xml, application/rss+xml 64 | enableDynGzipCompress 1 65 | gzipCompressLevel 6 66 | gzipAutoUpdateStatic 1 67 | gzipStaticCompressLevel 6 68 | brStaticCompressLevel 6 69 | gzipCacheDir /tmp/lshttpd/gzcache 70 | gzipMaxFileSize 60M 71 | gzipMinFileSize 100 72 | sslStrongDhKey 1 73 | sslEnableMultiCerts 1 74 | sslSessionCache 1 75 | sslSessionCacheSize 1000000 76 | sslSessionCacheTimeout 3600 77 | sslSessionTickets 1 78 | sslSessionTicketLifetime 216000 79 | quicEnable 1 80 | quicShmDir /dev/shm 81 | quicCfcw 2M 82 | quicSfcw 1M 83 | quicMaxStreams 100 84 | quicHandshakeTimeout 10 85 | quicIdleTimeout 30 86 | } 87 | 88 | fileAccessControl { 89 | followSymbolLink 1 90 | checkSymbolLink 0 91 | forceStrictOwnership 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 1460M 115 | memHardLimit 1470M 116 | procSoftLimit 400 117 | procHardLimit 450 118 | } 119 | 120 | accessDenyDir { 121 | dir / 122 | dir /etc/* 123 | dir /dev/* 124 | dir conf/* 125 | dir admin/conf/* 126 | } 127 | 128 | accessControl { 129 | allow ALL 130 | } 131 | 132 | extprocessor PHP-7.4 { 133 | type lsapi 134 | address uds:///tmp/lshttpd/lsphp74.sock 135 | maxConns 25 136 | env PHP_LSAPI_CHILDREN=25 137 | #env LSAPI_AVOID_FORK=200M 138 | env LSAPI_AVOID_FORK=1 139 | initTimeout 60 140 | retryTimeout 0 141 | persistConn 1 142 | respBuffer 0 143 | autoStart 2 144 | path lsphp74/bin/lsphp 145 | backlog 100 146 | instances 1 147 | priority 0 148 | memSoftLimit 2047M 149 | memHardLimit 2047M 150 | procSoftLimit 1400 151 | procHardLimit 1500 152 | } 153 | 154 | scripthandler { 155 | add lsapi:PHP-7.4 php 156 | } 157 | 158 | railsDefaults { 159 | maxConns 1 160 | env LSAPI_MAX_IDLE=60 161 | initTimeout 60 162 | retryTimeout 0 163 | pcKeepAliveTimeout 60 164 | respBuffer 0 165 | backlog 50 166 | runOnStartUp 3 167 | extMaxIdleTime 300 168 | priority 3 169 | memSoftLimit 2047M 170 | memHardLimit 2047M 171 | procSoftLimit 500 172 | procHardLimit 600 173 | } 174 | 175 | wsgiDefaults { 176 | maxConns 5 177 | env LSAPI_MAX_IDLE=60 178 | initTimeout 60 179 | retryTimeout 0 180 | pcKeepAliveTimeout 60 181 | respBuffer 0 182 | backlog 50 183 | runOnStartUp 3 184 | extMaxIdleTime 300 185 | priority 3 186 | memSoftLimit 2047M 187 | memHardLimit 2047M 188 | procSoftLimit 500 189 | procHardLimit 600 190 | } 191 | 192 | nodeDefaults { 193 | maxConns 5 194 | env LSAPI_MAX_IDLE=60 195 | initTimeout 60 196 | retryTimeout 0 197 | pcKeepAliveTimeout 60 198 | respBuffer 0 199 | backlog 50 200 | runOnStartUp 3 201 | extMaxIdleTime 300 202 | priority 3 203 | memSoftLimit 2047M 204 | memHardLimit 2047M 205 | procSoftLimit 500 206 | procHardLimit 600 207 | } 208 | 209 | module uploadprogress { 210 | ls_enabled 1 211 | } 212 | 213 | module cache { 214 | internal 1 215 | 216 | checkPrivateCache 1 217 | checkPublicCache 1 218 | maxCacheObjSize 10000000 219 | maxStaleAge 200 220 | qsCache 1 221 | reqCookieCache 1 222 | respCookieCache 1 223 | ignoreReqCacheCtrl 1 224 | ignoreRespCacheCtrl 0 225 | 226 | enableCache 1 227 | expireInSeconds 3600 228 | enablePrivateCache 1 229 | privateExpireInSeconds 3600 230 | ls_enabled 1 231 | } 232 | 233 | module modpagespeed { 234 | pagespeed off 235 | pagespeed FileCachePath /tmp/lshttpd/pagespeed 236 | pagespeed RewriteLevel CoreFilters 237 | ls_enabled 0 238 | } 239 | 240 | virtualhost wordpress { 241 | vhRoot /var/www/ 242 | configFile $SERVER_ROOT/conf/vhosts/$VH_NAME/vhconf.conf 243 | allowSymbolLink 1 244 | enableScript 1 245 | restrained 1 246 | setUIDMode 2 247 | user www-data 248 | group www-data 249 | } 250 | 251 | listener HTTP { 252 | address *:80 253 | secure 0 254 | map wordpress * 255 | } -------------------------------------------------------------------------------- /php-7.4/litespeed/vhconf.conf: -------------------------------------------------------------------------------- 1 | docRoot $VH_ROOT/html 2 | adminEmails root@localhost 3 | enableGzip 1 4 | enableIpGeo 1 5 | cgroups 0 6 | 7 | errorlog /var/log/litespeed/wordpress-error.log { 8 | useServer 1 9 | logLevel INFO 10 | rollingSize 1M 11 | } 12 | 13 | accesslog /var/log/litespeed/wordpress-access.log { 14 | useServer 1 15 | rollingSize 1M 16 | keepDays 1 17 | } 18 | 19 | index { 20 | useServer 1 21 | autoIndex 0 22 | } 23 | 24 | scripthandler { 25 | add lsapi:PHP-7.4 php 26 | } 27 | uploadTmpDir $VH_ROOT/tmp 28 | uploadTmpFilePermission 640 29 | 30 | rewrite { 31 | enable 1 32 | autoLoadHtaccess 1 33 | } 34 | 35 | context /progress/ { 36 | type module 37 | handler uploadprogress 38 | addDefaultCharset off 39 | } -------------------------------------------------------------------------------- /php-8.0/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM bitnami/minideb:buster 2 | 3 | LABEL name="DockerPress" 4 | LABEL version="3.0.0" 5 | LABEL release="2022-03-07" 6 | 7 | WORKDIR /var/www/html 8 | 9 | # ENV Defaults 10 | ENV WP_CLI_CACHE_DIR "/var/www/.wp-cli/cache/" 11 | ENV WP_CLI_PACKAGES_DIR "/var/www/.wp-cli/packages/" 12 | ENV ADMIN_EMAIL "webmaster@host.com" 13 | ENV ADMIN_PASS "dockerpress" 14 | ENV ADMIN_USER "dockerpress" 15 | ENV WP_LOCALE "en_US" 16 | ENV WP_DEBUG false 17 | ENV WORDPRESS_DB_PREFIX "wp_" 18 | ENV WORDPRESS_DB_PORT 3306 19 | ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE="1" 20 | ENV DEBIAN_FRONTEND="noninteractive" 21 | ENV DISABLE_WP_CRON=true 22 | 23 | # HTTP port 24 | EXPOSE "80/tcp" 25 | 26 | # Webadmin port (HTTPS) 27 | EXPOSE "7080/tcp" 28 | 29 | # Install System Libraries 30 | RUN apt-get update \ 31 | && \ 32 | apt-get install -y --no-install-recommends \ 33 | sudo \ 34 | curl \ 35 | cron \ 36 | less \ 37 | sysvbanner \ 38 | wget \ 39 | nano \ 40 | htop \ 41 | ghostscript \ 42 | memcached \ 43 | libmemcached-dev \ 44 | libmemcached-tools \ 45 | zip \ 46 | unzip \ 47 | git \ 48 | webp \ 49 | libwebp6 \ 50 | memcached \ 51 | libmemcached-tools \ 52 | graphicsmagick \ 53 | imagemagick \ 54 | zlib1g \ 55 | inetutils-ping \ 56 | libxml2 \ 57 | default-mysql-client\ 58 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ 59 | && rm -rf /var/lib/apt/lists/* \ 60 | && sudo apt-get clean 61 | 62 | # Make sure we have required tools 63 | RUN install_packages \ 64 | "curl" \ 65 | "gnupg" 66 | 67 | RUN wget -O - http://rpms.litespeedtech.com/debian/enable_lst_debian_repo.sh | bash 68 | 69 | # Install the Litespeed keys 70 | RUN curl --silent --show-error \ 71 | "http://rpms.litespeedtech.com/debian/lst_debian_repo.gpg" |\ 72 | apt-key add - 73 | 74 | RUN curl --silent --show-error \ 75 | "http://rpms.litespeedtech.com/debian/lst_repo.gpg" |\ 76 | apt-key add - 77 | 78 | # Install the Litespeed repository 79 | RUN # echo "deb http://rpms.litespeedtech.com/debian/ buster main" > "/etc/apt/sources.list.d/openlitespeed.list" 80 | 81 | RUN apt-get update 82 | 83 | # Install the Litespeed 84 | RUN install_packages \ 85 | "openlitespeed" && \ 86 | echo "cloud-docker" > "/usr/local/lsws/PLAT" 87 | 88 | # Install PageSpeed module 89 | RUN install_packages \ 90 | "ols-pagespeed" 91 | 92 | # Install the PHP 93 | RUN install_packages \ 94 | "lsphp80" 95 | 96 | # Install PHP modules 97 | RUN install_packages \ 98 | "lsphp80-apcu" \ 99 | "lsphp80-common" \ 100 | "lsphp80-curl" \ 101 | "lsphp80-igbinary" \ 102 | "lsphp80-imagick" \ 103 | "lsphp80-imap" \ 104 | "lsphp80-intl" \ 105 | "lsphp80-ldap" \ 106 | "lsphp80-memcached" \ 107 | "lsphp80-msgpack" \ 108 | "lsphp80-mysql" \ 109 | "lsphp80-opcache" \ 110 | "lsphp80-pear" \ 111 | "lsphp80-pgsql" \ 112 | "lsphp80-pspell" \ 113 | "lsphp80-redis" \ 114 | "lsphp80-sqlite3" \ 115 | "lsphp80-tidy" 116 | 117 | # Set the default PHP CLI 118 | RUN ln --symbolic --force \ 119 | "/usr/local/lsws/lsphp80/bin/lsphp" \ 120 | "/usr/local/lsws/fcgi-bin/lsphp5" 121 | 122 | RUN ln --symbolic --force \ 123 | "/usr/local/lsws/lsphp80/bin/php8.0" \ 124 | "/usr/bin/php" 125 | 126 | # Install the certificates 127 | RUN install_packages \ 128 | "ca-certificates" 129 | 130 | # Install requirements 131 | RUN install_packages \ 132 | "procps" \ 133 | "tzdata" 134 | 135 | # PHP Settings 136 | RUN sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 128M/g' /usr/local/lsws/lsphp80/etc/php/8.0/litespeed/php.ini 137 | RUN sed -i 's/post_max_size = 8M/post_max_size = 256M/g' /usr/local/lsws/lsphp80/etc/php/8.0/litespeed/php.ini 138 | RUN sed -i 's/memory_limit = 128M/memory_limit = 512M/g' /usr/local/lsws/lsphp80/etc/php/8.0/litespeed/php.ini 139 | 140 | COPY php-8.0/config/opcache.ini /usr/local/lsws/lsphp80/etc/php/8.0/mods-available/opcache.ini 141 | 142 | RUN touch /var/www/.opcache 143 | 144 | COPY php-8.0/memcached.conf /etc/memcached.conf 145 | 146 | # Create the directories 147 | RUN mkdir --parents \ 148 | "/tmp/lshttpd/gzcache" \ 149 | "/tmp/lshttpd/pagespeed" \ 150 | "/tmp/lshttpd/stats" \ 151 | "/tmp/lshttpd/swap" \ 152 | "/tmp/lshttpd/upload" \ 153 | "/var/log/litespeed" 154 | 155 | # Make sure logfiles exist 156 | RUN touch \ 157 | "/var/log/litespeed/server.log" \ 158 | "/var/log/litespeed/access.log" 159 | 160 | # Make sure we have access to files 161 | RUN chown --recursive "lsadm:lsadm" \ 162 | "/tmp/lshttpd" \ 163 | "/var/log/litespeed" 164 | 165 | # Configure the admin interface 166 | COPY --chown="lsadm:lsadm" \ 167 | "php-8.0/litespeed/admin_config.conf" \ 168 | "/usr/local/lsws/admin/conf/admin_config.conf" 169 | 170 | # Configure the server 171 | COPY --chown="lsadm:lsadm" \ 172 | "php-8.0/litespeed/httpd_config.conf" \ 173 | "/usr/local/lsws/conf/httpd_config.conf" 174 | 175 | # Create the virtual host folders 176 | RUN mkdir --parents \ 177 | "/usr/local/lsws/conf/vhosts/wordpress" \ 178 | "/var/www" \ 179 | "/var/www/html" \ 180 | "/var/www/tmp" 181 | 182 | # Configure the virtual host 183 | COPY --chown="lsadm:lsadm" \ 184 | "php-8.0/litespeed/vhconf.conf" \ 185 | "/usr/local/lsws/conf/vhosts/wordpress/vhconf.conf" 186 | 187 | # Set up the virtual host configuration permissions 188 | RUN chown --recursive "lsadm:lsadm" \ 189 | "/usr/local/lsws/conf/vhosts/wordpress" 190 | 191 | # Set up the virtual host document root permissions 192 | RUN chown --recursive "www-data:www-data" \ 193 | "/var/www/html" 194 | 195 | RUN chown "www-data:www-data" \ 196 | "/var/www" 197 | 198 | RUN apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ 199 | ; \ 200 | rm -rf /var/lib/apt/lists/* 201 | 202 | # Default Volume for Web 203 | VOLUME /var/www/html 204 | 205 | COPY wordpress/.htaccess /var/www 206 | 207 | COPY wordpress/wp-config-sample.php /var/www/wp-config-sample.php 208 | 209 | # Copy commands 210 | COPY bin/* /usr/local/bin/ 211 | 212 | # Add Permissions 213 | RUN chmod +x /usr/local/bin/wp 214 | RUN chmod +x /usr/local/bin/mysql-optimize 215 | RUN chmod +x /usr/local/bin/wpcli-run-clear-scheduler-log 216 | RUN chmod +x /usr/local/bin/wpcli-run-clear-spams 217 | RUN chmod +x /usr/local/bin/wpcli-run-delete-transient 218 | RUN chmod +x /usr/local/bin/wpcli-run-media-regenerate 219 | RUN chmod +x /usr/local/bin/wpcli-run-schedule 220 | 221 | # Copy Crontab 222 | COPY cron.d/dockerpress.crontab /etc/cron.d/dockerpress 223 | RUN chmod 644 /etc/cron.d/dockerpress 224 | 225 | RUN { \ 226 | echo '[client]'; \ 227 | echo 'user=MYUSER'; \ 228 | echo "password='MYPASSWORD'"; \ 229 | echo 'host=MYHOST'; \ 230 | echo 'port=MYPORT'; \ 231 | echo ''; \ 232 | echo '[mysql]'; \ 233 | echo 'database=MYDATABASE'; \ 234 | echo ''; \ 235 | } > /root/.my.cnf.sample 236 | 237 | # Running wordpress startup scripts 238 | COPY entrypoint.sh /usr/local/bin/entrypoint.sh 239 | RUN chmod +x /usr/local/bin/entrypoint.sh 240 | 241 | # Default Port for Apache 242 | EXPOSE 80 243 | 244 | # Set the workdir and command 245 | ENV PATH="/usr/local/lsws/bin:${PATH}" 246 | 247 | ENTRYPOINT ["entrypoint.sh"] 248 | -------------------------------------------------------------------------------- /php-8.0/config/opcache.ini: -------------------------------------------------------------------------------- 1 | zend_extension=opcache.so; 2 | 3 | [opcache] 4 | 5 | ; Determines if Zend OPCache is enabled 6 | opcache.enable=1 7 | 8 | ; Determines if Zend OPCache is enabled for the CLI version of PHP 9 | opcache.enable_cli=1 10 | 11 | opcache.jit_buffer_size=100M 12 | 13 | opcache.jit=1255 14 | 15 | ; The OPcache shared memory storage size. 16 | opcache.memory_consumption=256M 17 | 18 | ; The amount of memory for interned strings in Mbytes. 19 | opcache.interned_strings_buffer=16 20 | 21 | ; The maximum number of keys (scripts) in the OPcache hash table. 22 | ; Only numbers between 200 and 1000000 are allowed. 23 | ;If you have multiple PHP sites on the server then consider the value 130986 24 | ; for magento 2, keep 65406 25 | opcache.max_accelerated_files=100000 26 | 27 | ; The maximum percentage of "wasted" memory until a restart is scheduled. 28 | opcache.max_wasted_percentage=30 29 | 30 | ; When this directive is enabled, the OPcache appends the current working 31 | ; directory to the script key, thus eliminating possible collisions between 32 | ; files with the same name (basename). Disabling the directive improves 33 | ; performance, but may break existing applications. 34 | ;opcache.use_cwd=1 35 | 36 | ; When disabled, you must reset the OPcache manually or restart the 37 | ; webserver for changes to the filesystem to take effect. 38 | ; For Development / testing, keep 1 39 | ; For performance / production, keep 0 40 | opcache.validate_timestamps=0 41 | 42 | ;opcache.revalidate_freq How often in seconds should the code 43 | ;cache expire and check if your code has changed. 0 means it 44 | ;checks your PHP code every single request IF YOU HAVE 45 | ;opcache.validate_timestamps ENABLED. opcache.validate_timestamps 46 | ;should not be enabled by default, as long as it's disabled then any value for opcache. 47 | ;revalidate_freq will basically be ignored. You should really only ever enable 48 | ;this during development, you don't really want to enable this setting for a production application. 49 | opcache.revalidate_freq=0 50 | 51 | ; Enables or disables file search in include_path optimization 52 | ;opcache.revalidate_path=0 53 | 54 | ; If disabled, all PHPDoc comments are dropped from the code to reduce the 55 | ; size of the optimized code. 56 | opcache.save_comments=1 57 | 58 | ; If enabled, a fast shutdown sequence is used for the accelerated code 59 | ; Depending on the used Memory Manager this may cause some incompatibilities. 60 | opcache.fast_shutdown=1 61 | 62 | ; Allow file existence override (file_exists, etc.) performance feature. 63 | opcache.enable_file_override=1 64 | 65 | ; A bitmask, where each bit enables or disables the appropriate OPcache 66 | ; passes 67 | ;opcache.optimization_level=0xffffffff 68 | 69 | ;opcache.inherited_hack=1 70 | ;opcache.dups_fix=0 71 | 72 | ; The location of the OPcache blacklist file (wildcards allowed). 73 | ; Each OPcache blacklist file is a text file that holds the names of files 74 | ; that should not be accelerated. The file format is to add each filename 75 | ; to a new line. The filename may be a full path or just a file prefix 76 | ; (i.e., /var/www/x blacklists all the files and directories in /var/www 77 | ; that start with 'x'). Line starting with a ; are ignored (comments). 78 | ;opcache.blacklist_filename= 79 | 80 | ; Allows exclusion of large files from being cached. By default all files 81 | ; are cached. 82 | ; opcache.max_file_size=0 83 | 84 | ; Check the cache checksum each N requests. 85 | ; The default value of "0" means that the checks are disabled. 86 | opcache.consistency_checks=0 87 | 88 | ; How long to wait (in seconds) for a scheduled restart to begin if the cache 89 | ; is not being accessed. 90 | ;opcache.force_restart_timeout=180 91 | 92 | ; OPcache error_log file name. Empty string assumes "stderr". 93 | ;opcache.error_log= 94 | 95 | ; All OPcache errors go to the Web server log. 96 | ; By default, only fatal errors (level 0) or errors (level 1) are logged. 97 | ; You can also enable warnings (level 2), info messages (level 3) or 98 | ; debug messages (level 4). 99 | ;opcache.log_verbosity_level=1 100 | 101 | ; Preferred Shared Memory back-end. Leave empty and let the system decide. 102 | ;opcache.preferred_memory_model= 103 | 104 | ; Protect the shared memory from unexpected writing during script execution. 105 | ; Useful for internal debugging only. 106 | ;opcache.protect_memory=0 107 | 108 | ; Allows calling OPcache API functions only from PHP scripts which path is 109 | ; started from specified string. The default "" means no restriction 110 | ;opcache.restrict_api= 111 | 112 | ; Mapping base of shared memory segments (for Windows only). All the PHP 113 | ; processes have to map shared memory into the same address space. This 114 | ; directive allows to manually fix the "Unable to reattach to base address" 115 | ; errors. 116 | opcache.mmap_base=0x20000000 117 | 118 | ; Enables and sets the second level cache directory. 119 | ; It should improve performance when SHM memory is full, at server restart or 120 | ; SHM reset. The default "" disables file based caching. 121 | ; opcache.file_cache="/var/www/.opcache" 122 | 123 | ; Enables or disables opcode caching in shared memory. 124 | opcache.file_cache_only=0 125 | 126 | ; Enables or disables checksum validation when script loaded from file cache. 127 | ; opcache.file_cache_consistency_checks=1 128 | 129 | ; Implies opcache.file_cache_only=1 for a certain process that failed to 130 | ; reattach to the shared memory (for Windows only). Explicitly enabled file 131 | ; cache is required. 132 | ; opcache.file_cache_fallback=1 133 | 134 | ; Enables or disables copying of PHP code (text segment) into HUGE PAGES. 135 | ; This should improve performance, but requires appropriate OS configuration. 136 | opcache.huge_code_pages=1 137 | 138 | ; Validate cached file permissions. 139 | opcache.validate_permission=0 140 | 141 | ; Prevent name collisions in chroot'ed environment. 142 | ; opcache.validate_root=0 -------------------------------------------------------------------------------- /php-8.0/litespeed/admin_config.conf: -------------------------------------------------------------------------------- 1 | enableCoreDump 0 2 | sessionTimeout 3600 3 | 4 | errorlog /var/log/litespeed/admin-error.log { 5 | useServer 1 6 | logLevel INFO 7 | rollingSize 10M 8 | } 9 | 10 | accesslog /var/log/litespeed/admin-access.log { 11 | useServer 1 12 | rollingSize 10M 13 | keepDays 1 14 | } 15 | 16 | accessControl { 17 | allow ALL 18 | } 19 | 20 | listener adminListener { 21 | address *:7080 22 | secure 0 23 | } -------------------------------------------------------------------------------- /php-8.0/litespeed/httpd_config.conf: -------------------------------------------------------------------------------- 1 | user nobody 2 | group nogroup 3 | priority 0 4 | cpuAffinity 0 5 | enableLVE 0 6 | inMemBufSize 96M 7 | swappingDir /tmp/lshttpd/swap 8 | autoFix503 1 9 | enableh2c 1 10 | gracefulRestartTimeout 300 11 | statDir /tmp/lshttpd/stats 12 | mime conf/mime.properties 13 | disableInitLogRotation 1 14 | showVersionNumber 0 15 | enableIpGeo 0 16 | useIpInProxyHeader 3 17 | adminEmails root@localhost 18 | 19 | errorlog /var/log/litespeed/server.log { 20 | logLevel NOTICE 21 | debugLevel 0 22 | rollingSize 10M 23 | enableStderrLog 1 24 | } 25 | 26 | accesslog /var/log/litespeed/access.log { 27 | rollingSize 10M 28 | keepDays 1 29 | compressArchive 0 30 | } 31 | indexFiles index.html, index.php 32 | autoIndex 0 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=A604800 37 | } 38 | autoLoadHtaccess 1 39 | uploadTmpDir /tmp/lshttpd/upload 40 | uploadTmpFilePermission 640 41 | 42 | tuning { 43 | shmDefaultDir /dev/shm 44 | maxConnections 10000 45 | maxSSLConnections 10000 46 | connTimeout 300 47 | maxKeepAliveReq 10000 48 | keepAliveTimeout 5 49 | sndBufSize 0 50 | rcvBufSize 0 51 | maxReqURLLen 32768 52 | maxReqHeaderSize 65536 53 | maxReqBodySize 2047M 54 | maxDynRespHeaderSize 32768 55 | maxDynRespSize 2047M 56 | maxCachedFileSize 4096 57 | totalInMemCacheSize 512M 58 | maxMMapFileSize 256K 59 | totalMMapCacheSize 512M 60 | useSendfile 1 61 | fileETag 28 62 | enableGzipCompress 1 63 | compressibleTypes text/*, application/x-javascript, application/xml, application/javascript, image/svg+xml, application/rss+xml 64 | enableDynGzipCompress 1 65 | gzipCompressLevel 6 66 | gzipAutoUpdateStatic 1 67 | gzipStaticCompressLevel 6 68 | brStaticCompressLevel 6 69 | gzipCacheDir /tmp/lshttpd/gzcache 70 | gzipMaxFileSize 60M 71 | gzipMinFileSize 100 72 | sslStrongDhKey 1 73 | sslEnableMultiCerts 1 74 | sslSessionCache 1 75 | sslSessionCacheSize 1000000 76 | sslSessionCacheTimeout 3600 77 | sslSessionTickets 1 78 | sslSessionTicketLifetime 216000 79 | quicEnable 1 80 | quicShmDir /dev/shm 81 | quicCfcw 2M 82 | quicSfcw 1M 83 | quicMaxStreams 100 84 | quicHandshakeTimeout 10 85 | quicIdleTimeout 30 86 | } 87 | 88 | fileAccessControl { 89 | followSymbolLink 1 90 | checkSymbolLink 0 91 | forceStrictOwnership 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 1460M 115 | memHardLimit 1470M 116 | procSoftLimit 400 117 | procHardLimit 450 118 | } 119 | 120 | accessDenyDir { 121 | dir / 122 | dir /etc/* 123 | dir /dev/* 124 | dir conf/* 125 | dir admin/conf/* 126 | } 127 | 128 | accessControl { 129 | allow ALL 130 | } 131 | 132 | extprocessor PHP-8.0 { 133 | type lsapi 134 | address uds:///tmp/lshttpd/lsphp80.sock 135 | maxConns 25 136 | env PHP_LSAPI_CHILDREN=25 137 | #env LSAPI_AVOID_FORK=200M 138 | env LSAPI_AVOID_FORK=1 139 | initTimeout 60 140 | retryTimeout 0 141 | persistConn 1 142 | respBuffer 0 143 | autoStart 2 144 | path lsphp80/bin/lsphp 145 | backlog 100 146 | instances 1 147 | priority 0 148 | memSoftLimit 2047M 149 | memHardLimit 2047M 150 | procSoftLimit 1400 151 | procHardLimit 1500 152 | } 153 | 154 | scripthandler { 155 | add lsapi:PHP-8.0 php 156 | } 157 | 158 | railsDefaults { 159 | maxConns 1 160 | env LSAPI_MAX_IDLE=60 161 | initTimeout 60 162 | retryTimeout 0 163 | pcKeepAliveTimeout 60 164 | respBuffer 0 165 | backlog 50 166 | runOnStartUp 3 167 | extMaxIdleTime 300 168 | priority 3 169 | memSoftLimit 2047M 170 | memHardLimit 2047M 171 | procSoftLimit 500 172 | procHardLimit 600 173 | } 174 | 175 | wsgiDefaults { 176 | maxConns 5 177 | env LSAPI_MAX_IDLE=60 178 | initTimeout 60 179 | retryTimeout 0 180 | pcKeepAliveTimeout 60 181 | respBuffer 0 182 | backlog 50 183 | runOnStartUp 3 184 | extMaxIdleTime 300 185 | priority 3 186 | memSoftLimit 2047M 187 | memHardLimit 2047M 188 | procSoftLimit 500 189 | procHardLimit 600 190 | } 191 | 192 | nodeDefaults { 193 | maxConns 5 194 | env LSAPI_MAX_IDLE=60 195 | initTimeout 60 196 | retryTimeout 0 197 | pcKeepAliveTimeout 60 198 | respBuffer 0 199 | backlog 50 200 | runOnStartUp 3 201 | extMaxIdleTime 300 202 | priority 3 203 | memSoftLimit 2047M 204 | memHardLimit 2047M 205 | procSoftLimit 500 206 | procHardLimit 600 207 | } 208 | 209 | module uploadprogress { 210 | ls_enabled 1 211 | } 212 | 213 | module cache { 214 | internal 1 215 | 216 | checkPrivateCache 1 217 | checkPublicCache 1 218 | maxCacheObjSize 10000000 219 | maxStaleAge 200 220 | qsCache 1 221 | reqCookieCache 1 222 | respCookieCache 1 223 | ignoreReqCacheCtrl 1 224 | ignoreRespCacheCtrl 0 225 | 226 | enableCache 1 227 | expireInSeconds 3600 228 | enablePrivateCache 1 229 | privateExpireInSeconds 3600 230 | ls_enabled 1 231 | } 232 | 233 | module modpagespeed { 234 | pagespeed off 235 | pagespeed FileCachePath /tmp/lshttpd/pagespeed 236 | pagespeed RewriteLevel CoreFilters 237 | ls_enabled 0 238 | } 239 | 240 | virtualhost wordpress { 241 | vhRoot /var/www/ 242 | configFile $SERVER_ROOT/conf/vhosts/$VH_NAME/vhconf.conf 243 | allowSymbolLink 1 244 | enableScript 1 245 | restrained 1 246 | setUIDMode 2 247 | user www-data 248 | group www-data 249 | } 250 | 251 | listener HTTP { 252 | address *:80 253 | secure 0 254 | map wordpress * 255 | } -------------------------------------------------------------------------------- /php-8.0/litespeed/vhconf.conf: -------------------------------------------------------------------------------- 1 | docRoot $VH_ROOT/html 2 | adminEmails root@localhost 3 | enableGzip 1 4 | enableIpGeo 1 5 | cgroups 0 6 | 7 | errorlog /var/log/litespeed/wordpress-error.log { 8 | useServer 1 9 | logLevel INFO 10 | rollingSize 1M 11 | } 12 | 13 | accesslog /var/log/litespeed/wordpress-access.log { 14 | useServer 1 15 | rollingSize 1M 16 | keepDays 1 17 | } 18 | 19 | index { 20 | useServer 1 21 | autoIndex 0 22 | } 23 | 24 | scripthandler { 25 | add lsapi:PHP-8.0 php 26 | } 27 | uploadTmpDir $VH_ROOT/tmp 28 | uploadTmpFilePermission 640 29 | 30 | rewrite { 31 | enable 1 32 | autoLoadHtaccess 1 33 | } 34 | 35 | context /progress/ { 36 | type module 37 | handler uploadprogress 38 | addDefaultCharset off 39 | } -------------------------------------------------------------------------------- /php-8.0/memcached.conf: -------------------------------------------------------------------------------- 1 | # memcached default config file 2 | # 2003 - Jay Bonci 3 | # This configuration file is read by the start-memcached script provided as 4 | # part of the Debian GNU/Linux distribution. 5 | 6 | # Run memcached as a daemon. This command is implied, and is not needed for the 7 | # daemon to run. See the README.Debian that comes with this package for more 8 | # information. 9 | -d 10 | 11 | # Log memcached's output to /var/log/memcached 12 | logfile /var/log/memcached.log 13 | 14 | # Be verbose 15 | # -v 16 | 17 | # Be even more verbose (print client commands as well) 18 | # -vv 19 | 20 | # Start with a cap of 64 megs of memory. It's reasonable, and the daemon default 21 | # Note that the daemon will grow to this size, but does not start out holding this much 22 | # memory 23 | -m 256 24 | 25 | # Default connection port is 11211 26 | -p 11211 27 | 28 | # Run the daemon as root. The start-memcached will default to running as root if no 29 | # -u command is present in this config file 30 | -u memcache 31 | 32 | # Specify which IP address to listen on. The default is to listen on all IP addresses 33 | # This parameter is one of the only security measures that memcached has, so make sure 34 | # it's listening on a firewalled interface. 35 | -l 127.0.0.1 36 | 37 | # Limit the number of simultaneous incoming connections. The daemon default is 1024 38 | # -c 1024 39 | 40 | # Lock down all paged memory. Consult with the README and homepage before you do this 41 | # -k 42 | 43 | # Return error when memory is exhausted (rather than removing items) 44 | # -M 45 | 46 | # Maximize core file limit 47 | # -r 48 | 49 | # Use a pidfile 50 | 51 | -P /var/run/memcached/memcached.pid 52 | -------------------------------------------------------------------------------- /wordpress/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | # BEGIN LSCACHE 4 | ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## 5 | 6 | RewriteEngine on 7 | CacheLookup on 8 | RewriteRule .* - [E=Cache-Control:no-autoflush] 9 | RewriteRule \.litespeed_conf\.dat - [F,L] 10 | 11 | ### marker MOBILE start ### 12 | RewriteCond %{HTTP_USER_AGENT} Mobile|Android|Silk/|Kindle|BlackBerry|Opera\ Mini|Opera\ Mobi [NC] 13 | RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+ismobile] 14 | ### marker MOBILE end ### 15 | 16 | ### marker CACHE RESOURCE start ### 17 | RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php - [E=cache-control:max-age=3600] 18 | ### marker CACHE RESOURCE end ### 19 | 20 | ### marker LOGIN COOKIE start ### 21 | RewriteRule .? - [E="Cache-Vary:,wp-postpass_976bb653a28356e062169293950da4bf"] 22 | ### marker LOGIN COOKIE end ### 23 | 24 | ### marker FAVICON start ### 25 | RewriteRule favicon\.ico$ - [E=cache-control:max-age=86400] 26 | ### marker FAVICON end ### 27 | 28 | ### marker WEBP start ### 29 | RewriteCond %{HTTP_ACCEPT} "image/webp" [or] 30 | RewriteCond %{HTTP_USER_AGENT} "Page Speed" 31 | RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp] 32 | RewriteCond %{HTTP_USER_AGENT} iPhone.*Version/(\d{2}).*Safari 33 | RewriteCond %1 >13 34 | RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp] 35 | ### marker WEBP end ### 36 | 37 | ### marker DROPQS start ### 38 | CacheKeyModify -qs:fbclid 39 | CacheKeyModify -qs:gclid 40 | CacheKeyModify -qs:utm* 41 | CacheKeyModify -qs:_ga 42 | ### marker DROPQS end ### 43 | 44 | 45 | ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## 46 | # END LSCACHE 47 | # BEGIN NON_LSCACHE 48 | ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## 49 | ### marker BROWSER CACHE start ### 50 | 51 | ExpiresActive on 52 | ExpiresByType application/pdf A31557600 53 | ExpiresByType image/x-icon A31557600 54 | ExpiresByType image/vnd.microsoft.icon A31557600 55 | ExpiresByType image/svg+xml A31557600 56 | 57 | ExpiresByType image/jpg A31557600 58 | ExpiresByType image/jpeg A31557600 59 | ExpiresByType image/png A31557600 60 | ExpiresByType image/gif A31557600 61 | ExpiresByType image/webp A31557600 62 | 63 | ExpiresByType video/ogg A31557600 64 | ExpiresByType audio/ogg A31557600 65 | ExpiresByType video/mp4 A31557600 66 | ExpiresByType video/webm A31557600 67 | 68 | ExpiresByType text/css A31557600 69 | ExpiresByType text/javascript A31557600 70 | ExpiresByType application/javascript A31557600 71 | ExpiresByType application/x-javascript A31557600 72 | 73 | ExpiresByType application/x-font-ttf A31557600 74 | ExpiresByType application/x-font-woff A31557600 75 | ExpiresByType application/font-woff A31557600 76 | ExpiresByType application/font-woff2 A31557600 77 | ExpiresByType application/vnd.ms-fontobject A31557600 78 | ExpiresByType font/ttf A31557600 79 | ExpiresByType font/otf A31557600 80 | ExpiresByType font/woff A31557600 81 | ExpiresByType font/woff2 A31557600 82 | 83 | 84 | ### marker BROWSER CACHE end ### 85 | 86 | ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## 87 | # END NON_LSCACHE 88 | # BEGIN WordPress 89 | # As diretrizes (linhas) entre "BEGIN WordPress" e "END WordPress" são 90 | # geradas dinamicamente e só devem ser modificadas através de filtros do WordPress. 91 | # Quaisquer alterações nas diretivas entre esses marcadores serão sobrescritas. 92 | 93 | RewriteEngine On 94 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 95 | RewriteBase / 96 | RewriteRule ^index\.php$ - [L] 97 | RewriteCond %{REQUEST_FILENAME} !-f 98 | RewriteCond %{REQUEST_FILENAME} !-d 99 | RewriteRule . /index.php [L] 100 | 101 | 102 | # END WordPress 103 | -------------------------------------------------------------------------------- /wordpress/wp-config-sample.php: -------------------------------------------------------------------------------- 1 |