{"id":4892,"date":"2026-08-29T21:30:35","date_gmt":"2026-08-29T12:30:35","guid":{"rendered":"https:\/\/donguri3.net\/server-tech\/openlitespeed-wordpress-docker-setup-2\/"},"modified":"2026-08-29T21:30:36","modified_gmt":"2026-08-29T12:30:36","slug":"openlitespeed-wordpress-docker-setup","status":"publish","type":"post","link":"https:\/\/donguri3.net\/en\/server-tech\/wordpress-blog-seo\/openlitespeed-wordpress-docker-setup\/","title":{"rendered":"Running OpenLiteSpeed + WordPress with the Official OpenLiteSpeed Docker Image"},"content":{"rendered":"<p>This article explains how to run OpenLiteSpeed using its official Docker image and set up WordPress on top of it. It also covers the steps to configure a reverse proxy for an existing web server running in another container, allowing it to be accessed from within the OpenLiteSpeed container.<\/p>\n<h2>How to Use the OpenLiteSpeed Container (ols-docker-env)<\/h2>\n<p>We will use the official <a href=\"https:\/\/github.com\/litespeedtech\/ols-docker-env.git\">ols-docker-env<\/a>.<\/p>\n<h3>Basic Startup<\/h3>\n<pre><code>docker compose up -d<\/code><\/pre>\n<h3>Customizing Configurations<\/h3>\n<ul>\n<li><strong>It is recommended to change the database password and DB name as appropriate.<\/strong><\/li>\n<li>If you change the <code>container_name<\/code> in <code>docker-compose.yml<\/code>, you will also need to update the scripts in the <code>bin<\/code> directory (such as <code>domain.sh<\/code> and <code>database.sh<\/code>).<\/li>\n<li>To access an existing Docker Network, add the following configuration to <code>docker-compose.yml<\/code>.<\/li>\n<\/ul>\n<pre><code>networks:\n  &lt;\u65e2\u5b58network\u540d&gt;:\n    external: true<\/code><\/pre>\n<h3>Setting Up WordPress<\/h3>\n<ol start=\"1\">\n<li>Add a domain using <code>bash bin\/domain.sh [-A, --add] example.com <\/code>.<\/li>\n<li>Create a database for WordPress by running <code>bash bin\/database.sh [-D, --domain] example.com [-U, --user] USER_NAME [-P, --password] MY_PASS [-DB, --database] DATABASE_NAME<\/code>.<\/li>\n<li>Install WordPress using <code>bash bin\/appinstall.sh [-A, --app] wordpress [-D, --domain] example.com<\/code>.<\/li>\n<\/ol>\n<h2>Configuring the OpenLiteSpeed Reverse Proxy<\/h2>\n<h3>Virtual Host Configuration<\/h3>\n<ol start=\"1\">\n<li>Access the OpenLiteSpeed admin panel and select <code>Virtual Host<\/code> from the side menu.<br \/>\nSet the password for the administrative user (admin) with the following:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-bash\" data-lang=\"Bash\"><code>bash bin\/webadmin.sh my_password<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/li>\n<li>Add a <code>Virtual Host<\/code>.\n<ul>\n<li><strong>Virtual Host Name:<\/strong> Any desired name<\/li>\n<li><strong>Virtual Host Root:<\/strong> <code>\/var\/www\/vhosts\/$VH_NAME\/<\/code><\/li>\n<li><strong>Config File (Example):<\/strong> conf\/vhosts\/&lt;Virtual Host Name&gt;\/vhconf.conf<br \/>\nIf the file does not exist, there is a CLICK TO CREATE button to create it.<\/li>\n<li><strong>Enable Script\/ExtApps:<\/strong> <code>Yes<\/code><\/li>\n<li><strong>Restrained:<\/strong> <code>Yes<br \/>\n<a href=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8_12-2-2025_151155_192.168.232.33.jpeg\"><img decoding=\"async\" class=\"aligncenter wp-image-365 size-large\" src=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8_12-2-2025_151155_192.168.232.33-1024x326.jpeg\" alt=\"OpenLiteSpeed\u8a2d\u5b9a\" width=\"1024\" height=\"326\" srcset=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8_12-2-2025_151155_192.168.232.33-1024x326.jpeg 1024w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8_12-2-2025_151155_192.168.232.33-300x96.jpeg 300w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8_12-2-2025_151155_192.168.232.33-768x245.jpeg 768w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8_12-2-2025_151155_192.168.232.33.jpeg 1394w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a> <a href=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8_12-2-2025_152313_192.168.232.33.jpeg\"><img decoding=\"async\" class=\"aligncenter wp-image-366 size-large\" src=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8_12-2-2025_152313_192.168.232.33-1024x555.jpeg\" alt=\"OpenLiteSpeed\u8a2d\u5b9a\" width=\"1024\" height=\"555\" srcset=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8_12-2-2025_152313_192.168.232.33-1024x555.jpeg 1024w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8_12-2-2025_152313_192.168.232.33-300x163.jpeg 300w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8_12-2-2025_152313_192.168.232.33-768x416.jpeg 768w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8_12-2-2025_152313_192.168.232.33.jpeg 1384w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/code><\/li>\n<\/ul>\n<\/li>\n<li>Set <code>Document Root<\/code> in the <code>General<\/code> tab to <code>\/var\/www\/vhosts\/$VH_NAME\/<\/code>.<\/li>\n<li>Create a directory named <code>$VH_NAME<\/code> inside the <code>sites<\/code> directory.<\/li>\n<\/ol>\n<h3>Proxy Configuration<\/h3>\n<ol start=\"1\">\n<li>Add the following to <code>External App<\/code>.\n<ul>\n<li><strong>Name:<\/strong> <code>$VH_NAME<\/code> (a unique name; using $VH_NAME works fine)<\/li>\n<li><strong>Address:<\/strong> The address of the forwarding target web server (e.g., <code>http:\/\/backend:8080<\/code>)<\/li>\n<\/ul>\n<\/li>\n<li>Add a <code>Proxy<\/code> to <code>Context<\/code>.\n<ul>\n<li><strong>URI:<\/strong> <code>\/<\/code> (Root)<\/li>\n<li><strong>Web Server:<\/strong> Select the one configured in <code>External App<\/code>.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3>Listeners Configuration<\/h3>\n<ol start=\"1\">\n<li>Select <code>Listeners<\/code>.<\/li>\n<li>Select the protocol you want to forward (HTTP\/HTTPS) and add a <code>Virtual Host Mapping<\/code>.\n<ul>\n<li><strong>Virtual Host:<\/strong> The one added earlier<\/li>\n<li><strong>Domain:<\/strong> The domain name you want to forward (can be the same as the Virtual Host)<\/li>\n<\/ul>\n<\/li>\n<li>Click the <strong>Restart button<\/strong> in the upper right corner to apply the changes.<\/li>\n<\/ol>\n<h2>Verification<\/h2>\n<p>Once the configurations are applied correctly, accessing the target URL will display the web server&#8217;s content through the existing Docker Network.<\/p>\n<h2>References<\/h2>\n<ul>\n<li><a href=\"https:\/\/docs.litespeedtech.com\/cloud\/docker\/ols-wordpress\/\">OpenLiteSpeed Official Docker Documentation<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/litespeedtech\/ols-docker-env.git\">GitHub &#8211; ols-docker-env<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This article explains how to run OpenLiteSpeed using its official Docker image and set up WordPress on top of  [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":1090,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"en_US","_original_post":"https:\/\/donguri3.net\/?p=363","footnotes":""},"categories":[1166],"tags":[18,19,15,13,14,61,10],"class_list":["post-4892","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress-blog-seo","tag-docker","tag-docker-compose","tag-litespeed","tag-ols","tag-openlitespeed","tag-wordpress","tag-server","en-US"],"_links":{"self":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/4892","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/comments?post=4892"}],"version-history":[{"count":1,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/4892\/revisions"}],"predecessor-version":[{"id":4895,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/4892\/revisions\/4895"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/media\/1090"}],"wp:attachment":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/media?parent=4892"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/categories?post=4892"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/tags?post=4892"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}