{"id":1131,"date":"2026-11-20T13:00:00","date_gmt":"2026-11-20T13:00:00","guid":{"rendered":"https:\/\/vpslake.com\/blog\/?p=1131"},"modified":"2026-11-20T13:00:00","modified_gmt":"2026-11-20T13:00:00","slug":"install-drupal-lemp-centos-stream-9","status":"publish","type":"post","link":"https:\/\/vpslake.com\/blog\/2026\/11\/20\/install-drupal-lemp-centos-stream-9\/","title":{"rendered":"How to Install Drupal with LEMP on CentOS Stream 9"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">To install drupal with lemp on centos stream 9, build a Nginx, PHP-FPM, and MariaDB stack, then finish Drupal&#8217;s browser installer over HTTPS. Budget about 25 minutes for a fresh VPS, including Composer, firewalld, and SELinux-safe permissions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>A fresh CentOS Stream 9 VPS with at least 2 GB RAM and 15 GB of free disk space. Drupal itself is small, but Composer dependencies, uploads, logs, and backups need room.<\/li>\n\n\n<li>SSH access as <code>root<\/code>, or a normal account with working <code>sudo<\/code> privileges.<\/li>\n\n\n<li>A public IPv4 address and a domain such as <code>YOUR_DOMAIN<\/code> with an A record pointing to <code>SERVER_IP<\/code>. The domain is needed for a trusted Let&#8217;s Encrypt certificate.<\/li>\n\n\n<li>A unique database password and a separate long Drupal administrator password. Replace every uppercase placeholder before running commands or submitting a form.<\/li>\n\n\n<li>If you need the server first, choose a <a href=\"https:\/\/vpslake.com\/buy-vps\">VPSLake Linux VPS<\/a> with root access and CentOS Stream 9 support.<\/li>\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This guide installs Drupal 11.4.7 through the Composer-recommended project. Drupal 11 requires PHP 8.3 or newer, MariaDB 10.6 or newer, and extensions including PDO, XML, GD, OpenSSL, cURL, Mbstring, and zlib; see Drupal&#8217;s <a href=\"https:\/\/www.drupal.org\/docs\/getting-started\/system-requirements\" target=\"_blank\" rel=\"noopener\">system requirements<\/a> before adding modules.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Install the LEMP packages<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use CentOS Stream 9&#8217;s PHP 8.3 stream so Composer and Drupal use the same supported PHP branch.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf update -y\nsudo dnf module reset php -y\nsudo dnf module enable php:8.3 -y\nsudo dnf install -y nginx firewalld mariadb-server curl tar gzip unzip policycoreutils-python-utils php php-cli php-fpm php-mysqlnd php-gd php-mbstring php-xml php-opcache php-curl php-zip php-intl\nsudo systemctl enable --now firewalld nginx mariadb php-fpm\nphp -v\nnginx -v<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The first version line should begin with PHP 8.3 and the second should show an Nginx version. Nginx serves static files, while PHP-FPM runs Drupal&#8217;s PHP requests through FastCGI.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>PHP 8.3.x (cli) (built: ...)\nnginx version: nginx\/...<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Open only the required firewall services<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Allow SSH and web traffic, but keep MariaDB&#8217;s port closed because Drupal will connect through the local server.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo firewall-cmd --permanent --zone=public --add-service=ssh\nsudo firewall-cmd --permanent --zone=public --add-service=http\nsudo firewall-cmd --permanent --zone=public --add-service=https\nsudo firewall-cmd --reload\nsudo firewall-cmd --zone=public --list-services<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The final output should include <code>ssh<\/code>, <code>http<\/code>, and <code>https<\/code>. If your SSH daemon uses a custom port, add that port before reloading firewalld so you do not lock yourself out.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Create a local MariaDB database<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Give Drupal its own database account instead of putting MariaDB&#8217;s administrative credentials in the website.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Run the hardening assistant and accept the options that remove anonymous accounts, remove the test database, disable remote root access, and reload privilege tables:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mariadb-secure-installation<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Create the database and account below. Use a strong password in place of <code>YOUR_DB_PASSWORD<\/code>; do not include a single quote in that value because it is inside the SQL string.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mariadb &lt;&lt;'SQL'\nCREATE DATABASE drupal CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;\nCREATE USER 'drupaluser'@'localhost' IDENTIFIED BY 'YOUR_DB_PASSWORD';\nGRANT ALL PRIVILEGES ON drupal.* TO 'drupaluser'@'localhost';\nFLUSH PRIVILEGES;\nSQL\nsudo mariadb -e \"SELECT VERSION() AS mariadb_version; SHOW DATABASES LIKE 'drupal';\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The check should show a MariaDB version and one row named <code>drupal<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mariadb_version\n10.x.x-MariaDB\nDatabase (drupal)\ndrupal<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Install Composer and create the Drupal project<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The recommended Drupal project keeps the public document root in <code>web<\/code>, which prevents Nginx from exposing Composer files and application code above it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Verify Composer&#8217;s installer before running it, then install Composer system-wide:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/tmp\ncurl -fsSL https:\/\/composer.github.io\/installer.sig -o composer.sig\ncurl -fsSL https:\/\/getcomposer.org\/installer -o composer-setup.php\nphp -r '$expected = trim(file_get_contents(\"composer.sig\")); $actual = hash_file(\"sha384\", \"composer-setup.php\"); if (!hash_equals($expected, $actual)) { unlink(\"composer-setup.php\"); fwrite(STDERR, \"Invalid installer signature\\n\"); exit(1); } echo \"Installer verified\\n\";'\nsudo php composer-setup.php --install-dir=\/usr\/local\/bin --filename=composer\nrm -f composer-setup.php composer.sig\ncomposer --version<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The output should contain <code>Installer verified<\/code> and Composer 2.7 or newer. Now fetch the pinned Drupal release and list the public entry point:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/var\/www\nsudo composer create-project drupal\/recommended-project:11.4.7 drupal --no-interaction\nsudo test -f \/var\/www\/drupal\/web\/index.php &amp;&amp; echo \"Drupal web root is ready\"<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Drupal web root is ready<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The <a href=\"https:\/\/www.drupal.org\/project\/drupal\/releases\/11.4.7\" target=\"_blank\" rel=\"noopener\">Drupal 11.4.7 release page<\/a> records the release used here. Pinning it makes a repeat deployment predictable; update the project deliberately after installation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Set ownership and persistent SELinux labels<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Keep Drupal&#8217;s code owned by <code>root<\/code>, let the Nginx group read it, and make only the public files directory writable by PHP-FPM.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo chown -R root:nginx \/var\/www\/drupal\nsudo find \/var\/www\/drupal -type d -exec chmod 750 {} +\nsudo find \/var\/www\/drupal -type f -exec chmod 640 {} +\nsudo install -d -o nginx -g nginx -m 0770 \/var\/www\/drupal\/web\/sites\/default\/files\nsudo cp \/var\/www\/drupal\/web\/sites\/default\/default.settings.php \/var\/www\/drupal\/web\/sites\/default\/settings.php\nsudo chown root:nginx \/var\/www\/drupal\/web\/sites\/default\/settings.php\nsudo chmod 660 \/var\/www\/drupal\/web\/sites\/default\/settings.php\nsudo semanage fcontext -a -t httpd_sys_content_t '\/var\/www\/drupal(\/.*)?'\nsudo semanage fcontext -a -t httpd_sys_rw_content_t '\/var\/www\/drupal\/web\/sites\/default\/files(\/.*)?'\nsudo semanage fcontext -a -t httpd_sys_rw_content_t '\/var\/www\/drupal\/web\/sites\/default\/settings.php'\nsudo restorecon -RFv \/var\/www\/drupal\nsudo setsebool -P httpd_can_network_connect_db 1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The persistent file-context rules let SELinux permit normal reads while allowing writes only to Drupal&#8217;s upload directory and temporary installer settings file. This avoids the insecure shortcut of making the whole tree world-writable.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6: Create a dedicated PHP-FPM pool<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A separate pool gives this site a predictable Unix socket and worker limits, so Nginx cannot accidentally send requests to an unrelated PHP configuration.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo tee \/etc\/php-fpm.d\/drupal.conf &gt;\/dev\/null &lt;&lt;'FPM'\n[drupal]\nuser = nginx\ngroup = nginx\nlisten = \/run\/php-fpm\/drupal.sock\nlisten.owner = nginx\nlisten.group = nginx\nlisten.mode = 0660\npm = dynamic\npm.max_children = 20\npm.start_servers = 2\npm.min_spare_servers = 1\npm.max_spare_servers = 3\npm.max_requests = 500\nFPM\n\nsudo tee \/etc\/php.d\/90-drupal.ini &gt;\/dev\/null &lt;&lt;'INI'\nmemory_limit = 256M\nupload_max_filesize = 64M\npost_max_size = 64M\nmax_execution_time = 120\nINI\n\nsudo php-fpm -t\nsudo systemctl restart php-fpm\nsudo systemctl is-active php-fpm<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The configuration test must succeed and the service check should print <code>active<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[NOTICE] configuration file \/etc\/php-fpm.conf test is successful\nactive<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 7: Configure the Nginx server block<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The front-controller rule sends Drupal paths to <code>index.php<\/code>, while the other locations prevent PHP files in uploaded content and hidden files from being served.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Replace <code>YOUR_DOMAIN<\/code> and <code>ADMIN_EMAIL<\/code> before saving this configuration. <code>ADMIN_EMAIL<\/code> is used later by Certbot, not by Nginx.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo rm -f \/etc\/nginx\/conf.d\/default.conf\nsudo tee \/etc\/nginx\/conf.d\/drupal.conf &gt;\/dev\/null &lt;&lt;'NGINX'\nserver {\n    listen 80;\n    server_name YOUR_DOMAIN;\n    root \/var\/www\/drupal\/web;\n    index index.php;\n    client_max_body_size 64m;\n\n    location \/ {\n        try_files $uri \/index.php?$query_string;\n    }\n\n    location = \/favicon.ico {\n        log_not_found off;\n        access_log off;\n    }\n\n    location = \/robots.txt {\n        log_not_found off;\n        access_log off;\n    }\n\n    location ~* ^\/sites\/.*\/files\/.*\\.php$ {\n        deny all;\n    }\n\n    location ~ \\..*\/.*\\.php$ {\n        return 403;\n    }\n\n    location ~ (^|\/)\\.(?!well-known) {\n        deny all;\n    }\n\n    location ~ \\.php$ {\n        try_files $uri =404;\n        include fastcgi_params;\n        fastcgi_param HTTP_PROXY \"\";\n        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n        fastcgi_param QUERY_STRING $query_string;\n        fastcgi_pass unix:\/run\/php-fpm\/drupal.sock;\n    }\n\n    location ~* \\.(css|js|jpg|jpeg|gif|png|ico|svg|webp|avif|woff2?)$ {\n        try_files $uri \/index.php?$query_string;\n        expires 7d;\n        log_not_found off;\n    }\n}\nNGINX\n\nsudo nginx -t\nsudo systemctl reload nginx<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Nginx should report <code>syntax is ok<\/code> and <code>test is successful<\/code>. The document root is <code>\/var\/www\/drupal\/web<\/code>, not <code>\/var\/www\/drupal<\/code>, because the Composer project deliberately keeps non-public files one level above it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 8: Enable HTTPS and run the Drupal installer<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s Encrypt must reach the domain on port 80, so confirm the DNS A record already points to <code>SERVER_IP<\/code> before requesting the certificate.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install -y epel-release\nsudo dnf install -y certbot python3-certbot-nginx\nsudo certbot --nginx --redirect --domain YOUR_DOMAIN --email ADMIN_EMAIL --agree-tos --no-eff-email\nsudo certbot renew --dry-run<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The renewal test should finish successfully. Open <code>https:\/\/YOUR_DOMAIN\/core\/install.php<\/code>, choose <code>English<\/code>, select the <code>Standard<\/code> profile, and choose <code>MySQL, MariaDB, or equivalent<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use these database values in the form:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Database name: <code>drupal<\/code><\/li>\n\n\n<li>Database username: <code>drupaluser<\/code><\/li>\n\n\n<li>Database password: <code>YOUR_DB_PASSWORD<\/code><\/li>\n\n\n<li>Database host: <code>localhost<\/code><\/li>\n\n\n<li>Database port: <code>3306<\/code><\/li>\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Create a distinct administrator username, a long password, and an email address you monitor. Drupal will create its tables and redirect you to the new site&#8217;s front page when the wizard finishes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Verify the Drupal LEMP installation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run these checks from SSH, then load the site in a private browser window. Together they validate the daemons, Nginx syntax, HTTPS response, PHP extensions, and database.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl is-active nginx php-fpm mariadb firewalld\nsudo nginx -t\ncurl -fsSI https:\/\/YOUR_DOMAIN\/\nphp -m | grep -E 'curl|dom|gd|mbstring|PDO|pdo_mysql|xml|zip'\nsudo mariadb -e \"SHOW DATABASES LIKE 'drupal';\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expected results are four <code>active<\/code> lines, a successful Nginx test, an HTTP <code>200<\/code> or Drupal redirect, the listed PHP modules, and a <code>drupal<\/code> database row.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>active\nactive\nactive\nactive\nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful\nHTTP\/2 200\ncurl\ndom\ngd\nmbstring\nPDO\npdo_mysql\nxml\nzip\ndrupal<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In Drupal, open <strong>Manage \u2192 Reports \u2192 Status report<\/strong> and resolve any warning about trusted hosts, file permissions, or missing PHP extensions.<\/p>\n\n\n\n<aside class=\"vl-element vl-cta-banner\" aria-label=\"Launch your Drupal server\">\n\t<div class=\"vl-cta-banner__content\">\n\t\t<p class=\"vl-cta-banner__eyebrow\">CentOS Stream VPS<\/p>\n\t\t<h3 class=\"vl-cta-banner__title\">Launch your Drupal server<\/h3>\n\t\t<p class=\"vl-cta-banner__text\">Get root access for a secure Drupal LEMP deployment on CentOS Stream 9.<\/p>\n\t<\/div>\n\t<a class=\"vl-cta-banner__button\" href=\"\/buy-vps\" aria-label=\"View Linux VPS plans\">View Linux VPS plans<\/a>\n<\/aside>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><code>502 Bad Gateway<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Nginx cannot reach the PHP-FPM socket, usually because the pool did not start or the socket path differs between the two configuration files. Check the socket and the service log, then restart both services.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ls -l \/run\/php-fpm\/drupal.sock\nsudo grep -E '^(listen|user|group)' \/etc\/php-fpm.d\/drupal.conf\nsudo journalctl -u php-fpm -n 40 --no-pager\nsudo systemctl restart php-fpm nginx<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><code>403 Forbidden<\/code> or Drupal says files are not writable<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The Unix group, mode, or SELinux label is wrong. Restore the labels and recreate write access only for Drupal&#8217;s public files directory.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo chown -R root:nginx \/var\/www\/drupal\nsudo install -d -o nginx -g nginx -m 0770 \/var\/www\/drupal\/web\/sites\/default\/files\nsudo restorecon -RFv \/var\/www\/drupal\nsudo systemctl restart php-fpm nginx<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><code>SQLSTATE[HY000] [1045] Access denied<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The password entered in the installer does not match the local account, or the account was created with a different host value. Reset the local account and enter the same password again.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mariadb -e \"ALTER USER 'drupaluser'@'localhost' IDENTIFIED BY 'YOUR_DB_PASSWORD'; FLUSH PRIVILEGES;\"<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Certbot reports a failed challenge<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The DNS record may still point elsewhere, or port 80 may be blocked by firewalld or an upstream VPS firewall. Check the local response and the allowed services before retrying.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo firewall-cmd --zone=public --list-services\ncurl -I http:\/\/YOUR_DOMAIN\/\nsudo certbot --nginx --redirect --domain YOUR_DOMAIN<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Hardening<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>After the browser installer finishes, remove PHP-FPM&#8217;s write access to <code>settings.php<\/code> and restore its normal SELinux label:<\/li>\n\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>  sudo chmod 640 \/var\/www\/drupal\/web\/sites\/default\/settings.php\n  sudo chown root:nginx \/var\/www\/drupal\/web\/sites\/default\/settings.php\n  sudo restorecon -v \/var\/www\/drupal\/web\/sites\/default\/settings.php<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Add <code>YOUR_DOMAIN<\/code> and any intentional <code>www<\/code> alias to Drupal&#8217;s trusted-host settings in <code>web\/sites\/default\/settings.php<\/code>.<\/li>\n\n\n<li>Keep MariaDB local-only, back up the database and <code>\/var\/www\/drupal<\/code>, and apply Drupal security updates before adding new modules.<\/li>\n\n\n<li>For a repeatable SSH baseline, use VPSLake&#8217;s <a href=\"https:\/\/vpslake.com\/sshd-hardening-generator\">SSH hardening generator<\/a>.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">FAQ<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Why use Composer instead of a Drupal tarball?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Composer resolves Drupal core and its PHP dependencies as one project and keeps the public web root separate from private files. It also makes later updates and module additions easier to audit.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Can I install Drupal with only the server IP?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You can use the IP for a temporary HTTP test, but a domain is the practical production choice. Certbot needs a publicly resolving domain, and Drupal&#8217;s trusted-host protection is easier to configure with a stable hostname.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Which Drupal directory must remain writable?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">After installation, <code>web\/sites\/default\/files<\/code> is the normal writable location for uploads and generated assets. The application code and <code>settings.php<\/code> should be readable by Nginx and PHP-FPM but not writable by the web process.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why does this guide use a separate PHP-FPM pool?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The pool gives Drupal its own socket, user, and worker limits. That makes the Nginx-to-PHP connection explicit and prevents a change made for another PHP site from silently breaking Drupal.<\/p>\n\n\n\n<script type=\"application\/ld+json\">{\"@context\": \"https:\/\/schema.org\", \"@type\": \"FAQPage\", \"mainEntity\": [{\"@type\": \"Question\", \"name\": \"Why use Composer instead of a Drupal tarball?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Composer resolves Drupal core and its PHP dependencies as one project and keeps the public web root separate from private files. It also makes later updates and module additions easier to audit.\"}}, {\"@type\": \"Question\", \"name\": \"Can I install Drupal with only the server IP?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"You can use the IP for a temporary HTTP test, but a domain is the practical production choice. Certbot needs a publicly resolving domain, and Drupal's trusted-host protection is easier to configure with a stable hostname.\"}}, {\"@type\": \"Question\", \"name\": \"Which Drupal directory must remain writable?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"After installation, `web\/sites\/default\/files` is the normal writable location for uploads and generated assets. The application code and `settings.php` should be readable by Nginx and PHP-FPM but not writable by the web process.\"}}, {\"@type\": \"Question\", \"name\": \"Why does this guide use a separate PHP-FPM pool?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"The pool gives Drupal its own socket, user, and worker limits. That makes the Nginx-to-PHP connection explicit and prevents a change made for another PHP site from silently breaking Drupal.\"}}]}<\/script>\n\n","protected":false},"excerpt":{"rendered":"Install Drupal with LEMP on CentOS Stream 9 using Nginx, PHP-FPM, MariaDB, Composer, HTTPS, firewalld, and SELinux-safe permissions.","protected":false},"author":1,"featured_media":1132,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_singular_sidebar":"","csco_page_header_type":"","csco_page_load_nextpost":"","footnotes":""},"categories":[5,9],"tags":[111,140,73,125,72],"class_list":["post-1131","post","type-post","status-publish","format-standard","has-post-thumbnail","category-guides","category-vps-hosting","tag-centos-stream-9","tag-drupal","tag-mariadb","tag-nginx","tag-php","cs-entry"],"_links":{"self":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/1131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/comments?post=1131"}],"version-history":[{"count":1,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/1131\/revisions"}],"predecessor-version":[{"id":4127,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/1131\/revisions\/4127"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/media\/1132"}],"wp:attachment":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/media?parent=1131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/categories?post=1131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/tags?post=1131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}