{"id":1209,"date":"2026-11-30T09:00:00","date_gmt":"2026-11-30T09:00:00","guid":{"rendered":"https:\/\/vpslake.com\/blog\/?p=1209"},"modified":"2026-11-30T09:00:00","modified_gmt":"2026-11-30T09:00:00","slug":"install-laravel-php-framework-rocky-linux-8","status":"publish","type":"post","link":"https:\/\/vpslake.com\/blog\/2026\/11\/30\/install-laravel-php-framework-rocky-linux-8\/","title":{"rendered":"How to Install Laravel PHP Framework on Rocky Linux 8"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">To install Laravel PHP framework on Rocky Linux 8, you will set up Laravel 13 with PHP 8.3, Apache, PHP-FPM, and MariaDB in about 20 minutes. The finished application serves only Laravel&#8217;s <code>public<\/code> directory, keeps SELinux enforcing, and is ready for HTTPS.<\/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 64-bit Rocky Linux 8 VPS with at least 2 GB of RAM and 15 GB of free disk space.<\/li>\n\n\n<li>SSH access as <code>root<\/code>, or a normal account with working <code>sudo<\/code> privileges and outbound HTTPS access.<\/li>\n\n\n<li>A public IP address. A DNS name such as <code>YOUR_DOMAIN<\/code> is required for a trusted Let&#8217;s Encrypt certificate.<\/li>\n\n\n<li>A <a href=\"https:\/\/vpslake.com\/buy-vps\">VPSLake Linux VPS<\/a> with root access if you need a Rocky Linux server for this setup.<\/li>\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">These commands assume a non-root account. If you are logged in as <code>root<\/code>, remove <code>sudo<\/code>. Replace uppercase placeholders with real values before running the related command.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Confirm Rocky Linux 8 and install PHP 8.3<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Rocky Linux 8&#8217;s built-in PHP stream is older than Laravel 13 requires, so this release uses the Remi PHP 8.3 module while keeping the rest of the operating system packages native.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -E '^(PRETTY_NAME|VERSION_ID|PLATFORM_ID)=' \/etc\/os-release\nuname -m\nsudo dnf upgrade -y\nsudo dnf install -y epel-release firewalld httpd mariadb-server mariadb curl git unzip policycoreutils-python-utils\nsudo dnf install -y https:\/\/rpms.remirepo.net\/enterprise\/remi-release-8.rpm\nsudo dnf module reset php -y\nsudo dnf module install php:remi-8.3 -y\nsudo dnf install -y php php-cli php-fpm php-mysqlnd php-mbstring php-xml php-bcmath php-curl php-gd php-opcache php-pecl-zip\nsudo systemctl enable --now firewalld httpd php-fpm mariadb\nphp -v\nsudo systemctl is-active firewalld httpd php-fpm mariadb<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The release check should identify Rocky Linux 8 and the architecture should normally be <code>x86_64<\/code>. PHP should start with 8.3, followed by four <code>active<\/code> lines.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>PRETTY_NAME=\"Rocky Linux 8.x (Green Obsidian)\"\nVERSION_ID=\"8.x\"\nx86_64\nPHP 8.3.x (cli) ...\nactive\nactive\nactive\nactive<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">PHP 8.3 is supplied by Remi&#8217;s Enterprise Linux 8 module. The <a href=\"https:\/\/docs.rockylinux.org\/8\/guides\/web\/php\/\" target=\"_blank\" rel=\"noopener\">Rocky Linux PHP documentation<\/a> explains the distribution&#8217;s module-based PHP layout; do not enable the Rocky 9 or 10 instructions on this server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Prepare a MariaDB database<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Laravel should have its own database credentials, so a compromised application cannot reuse the database administrator account.<\/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\">When the hardening wizard asks, remove anonymous users and the test database, disallow remote root login, and reload the privilege tables. Keeping local administrative socket authentication is fine for this setup.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create a database and two local account entries. The <code>127.0.0.1<\/code> entry matches the TCP connection Laravel will use in <code>.env<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mariadb &lt;&lt;'SQL'\nCREATE DATABASE laravel_app CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\nCREATE USER 'laravel_app'@'localhost' IDENTIFIED BY 'YOUR_DB_PASSWORD';\nCREATE USER 'laravel_app'@'127.0.0.1' IDENTIFIED BY 'YOUR_DB_PASSWORD';\nGRANT ALL PRIVILEGES ON laravel_app.* TO 'laravel_app'@'localhost';\nGRANT ALL PRIVILEGES ON laravel_app.* TO 'laravel_app'@'127.0.0.1';\nFLUSH PRIVILEGES;\nSQL\nsudo mariadb -e \"SHOW DATABASES LIKE 'laravel_app';\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Use a long, unique password instead of <code>YOUR_DB_PASSWORD<\/code>. The check should print the database name. MariaDB remains local, so do not open port 3306 in firewalld.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Database (laravel_app)\nlaravel_app<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Install Composer safely<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Composer downloads Laravel and resolves its dependencies; checking the installer checksum before execution protects this administrative step from a damaged download.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/tmp\nEXPECTED_CHECKSUM=\"$(curl -fsSL https:\/\/composer.github.io\/installer.sig)\"\nphp -r \"copy('https:\/\/getcomposer.org\/installer', 'composer-setup.php');\"\nACTUAL_CHECKSUM=\"$(php -r \"echo hash_file('sha384', 'composer-setup.php');\")\"\nif [ \"$EXPECTED_CHECKSUM\" != \"$ACTUAL_CHECKSUM\" ]; then echo 'ERROR: Invalid Composer installer checksum'; rm -f composer-setup.php; exit 1; fi\nsudo php composer-setup.php --install-dir=\/usr\/local\/bin --filename=composer\nrm -f composer-setup.php\ncomposer --version<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The final line should report Composer 2.x. This follows Composer&#8217;s <a href=\"https:\/\/getcomposer.org\/doc\/faqs\/how-to-install-composer-programmatically.md\" target=\"_blank\" rel=\"noopener\">official programmatic installation procedure<\/a>, which publishes the current SHA-384 value separately from the installer.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Composer version 2.x.x 20xx-xx-xx<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Create the Laravel project and set its environment<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Creating the project as Apache&#8217;s service account avoids a root-owned Composer cache and lets PHP-FPM access the generated files.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo install -d -o apache -g apache \/var\/www\/laravelapp \/usr\/share\/httpd\/.cache \/usr\/share\/httpd\/.config\nsudo -u apache -H composer create-project --no-interaction --prefer-dist laravel\/laravel:^13.0 \/var\/www\/laravelapp<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Open the generated environment file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudoedit \/var\/www\/laravelapp\/.env<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Keep the generated <code>APP_KEY<\/code> line for the moment, then set these values. Replace <code>YOUR_DOMAIN<\/code> and <code>YOUR_DB_PASSWORD<\/code> with the same values used in the previous steps.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>APP_ENV=production\nAPP_DEBUG=false\nAPP_URL=http:\/\/YOUR_DOMAIN\nDB_CONNECTION=mysql\nDB_HOST=127.0.0.1\nDB_PORT=3306\nDB_DATABASE=laravel_app\nDB_USERNAME=laravel_app\nDB_PASSWORD=YOUR_DB_PASSWORD<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Generate the application key and run the initial migrations as Apache:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo -u apache -H php \/var\/www\/laravelapp\/artisan key:generate --force\nsudo -u apache -H php \/var\/www\/laravelapp\/artisan config:clear\nsudo -u apache -H php \/var\/www\/laravelapp\/artisan migrate --force<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You should see an application-key success message and completed migration lines. Do not run <code>db:seed<\/code> here: a new Laravel project does not need sample records, and production data should come from your own application.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Configure Apache and PHP-FPM<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Apache must point at <code>public<\/code>, not the project root, because <code>.env<\/code> and Composer metadata must stay outside the web-exposed directory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create the virtual host and replace both occurrences of <code>YOUR_DOMAIN<\/code> before saving:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo tee \/etc\/httpd\/conf.d\/zz-laravel.conf &gt; \/dev\/null &lt;&lt;'APACHE'\n&lt;VirtualHost *:80&gt;\n    ServerName YOUR_DOMAIN\n    ServerAlias www.YOUR_DOMAIN\n    DocumentRoot \/var\/www\/laravelapp\/public\n    DirectoryIndex index.php\n\n    &lt;Directory \/var\/www\/laravelapp\/public&gt;\n        AllowOverride All\n        Options -Indexes +FollowSymLinks\n        Require all granted\n    &lt;\/Directory&gt;\n\n    &lt;FilesMatch \\.php$&gt;\n        SetHandler \"proxy:unix:\/run\/php-fpm\/www.sock|fcgi:\/\/localhost\"\n    &lt;\/FilesMatch&gt;\n\n    ErrorLog \/var\/log\/httpd\/laravel-error.log\n    CustomLog \/var\/log\/httpd\/laravel-access.log combined\n&lt;\/VirtualHost&gt;\nAPACHE\nsudo apachectl configtest\nsudo systemctl reload httpd<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>Syntax OK<\/code> confirms that Apache accepted the file. The PHP-FPM socket keeps PHP execution on the local server instead of exposing a separate application port.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6: Set permissions without weakening SELinux<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Laravel writes logs, sessions, compiled views, and cache data only in <code>storage<\/code> and <code>bootstrap\/cache<\/code>; the application source can remain owned by <code>root<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo semanage fcontext -a -t httpd_sys_rw_content_t '\/var\/www\/laravelapp\/(storage|bootstrap\/cache)(\/.*)?'\nsudo restorecon -Rv \/var\/www\/laravelapp\nsudo chown -R root:apache \/var\/www\/laravelapp\nsudo find \/var\/www\/laravelapp -type d -exec chmod 0750 {} +\nsudo find \/var\/www\/laravelapp -type f -exec chmod 0640 {} +\nsudo chown -R apache:apache \/var\/www\/laravelapp\/storage \/var\/www\/laravelapp\/bootstrap\/cache\nsudo find \/var\/www\/laravelapp\/storage \/var\/www\/laravelapp\/bootstrap\/cache -type d -exec chmod 0770 {} +\nsudo find \/var\/www\/laravelapp\/storage \/var\/www\/laravelapp\/bootstrap\/cache -type f -exec chmod 0660 {} +\nsudo setsebool -P httpd_can_network_connect_db on<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The persistent file-context rule survives a later relabel. The boolean allows the PHP process to reach MariaDB, while the narrow ownership rules keep the rest of the project read-only to Apache. Leave SELinux in enforcing mode.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 7: Open web ports and add HTTPS<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Allow SSH, HTTP, and HTTPS in the active firewalld zone while leaving the database private.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>FIREWALL_ZONE=\"$(sudo firewall-cmd --get-default-zone)\"\nsudo firewall-cmd --permanent --zone=\"$FIREWALL_ZONE\" --add-service=ssh\nsudo firewall-cmd --permanent --zone=\"$FIREWALL_ZONE\" --add-service=http\nsudo firewall-cmd --permanent --zone=\"$FIREWALL_ZONE\" --add-service=https\nsudo firewall-cmd --reload\nsudo firewall-cmd --zone=\"$FIREWALL_ZONE\" --list-services<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After <code>YOUR_DOMAIN<\/code> resolves to the VPS, request a certificate. Replace <code>YOUR_EMAIL<\/code> with an address that can receive renewal notices.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install -y mod_ssl certbot python3-certbot-apache\nsudo certbot --apache --redirect -d YOUR_DOMAIN -m YOUR_EMAIL --agree-tos --no-eff-email\nsudo sed -i 's#^APP_URL=.*#APP_URL=https:\/\/YOUR_DOMAIN#' \/var\/www\/laravelapp\/.env\nsudo -u apache -H php \/var\/www\/laravelapp\/artisan config:clear\nsudo -u apache -H php \/var\/www\/laravelapp\/artisan config:cache<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Certbot adds the HTTPS virtual host and redirect. If DNS is not ready, postpone the certificate command, test over HTTP, and do not use the temporary endpoint for real credentials.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Verify the Laravel installation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run these checks before opening the site in a browser:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl is-active firewalld httpd php-fpm mariadb\nsudo apachectl configtest\nsudo -u apache -H php \/var\/www\/laravelapp\/artisan --version\nsudo -u apache -H php \/var\/www\/laravelapp\/artisan migrate:status\ncurl -fsSI -H 'Host: YOUR_DOMAIN' http:\/\/127.0.0.1\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expect four <code>active<\/code> results, <code>Syntax OK<\/code>, a Laravel 13 version, migration statuses, and an HTTP response. A <code>301<\/code> is normal after Certbot enables the HTTPS redirect.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>active\nactive\nactive\nactive\nSyntax OK\nLaravel Framework 13.x\nHTTP\/1.1 200 OK<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once DNS and TLS are working, open <code>https:\/\/YOUR_DOMAIN<\/code>. The default Laravel page proves that Apache is using the intended document root and PHP-FPM is executing the framework.<\/p>\n\n\n\n<aside class=\"vl-element vl-cta-banner\" aria-label=\"Deploy Laravel with root access\">\n\t<div class=\"vl-cta-banner__content\">\n\t\t<p class=\"vl-cta-banner__eyebrow\">Rocky Linux VPS<\/p>\n\t\t<h3 class=\"vl-cta-banner__title\">Deploy Laravel with root access<\/h3>\n\t\t<p class=\"vl-cta-banner__text\">Get a Rocky Linux VPS for PHP applications, MariaDB, and secure web traffic.<\/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>No available modular metadata<\/code> or PHP remains at 8.0<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The Remi repository may not have been installed, or an older PHP stream is still selected. Check the module inventory and switch to the EL8 PHP 8.3 stream rather than mixing packages from another Rocky release.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf repolist\nsudo dnf module list php\nsudo dnf module reset php -y\nsudo dnf module switch-to php:remi-8.3\/common -y\nphp -v<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The module list should show <code>remi-8.3<\/code> enabled and <code>php -v<\/code> should report 8.3 or later. If the switch reports conflicting extensions, remove only the conflicting old PHP extension and repeat the module operation.<\/p>\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 in <code>.env<\/code> may differ from MariaDB, or Laravel may have cached the previous value. Test the application account outside Laravel, then clear the cached configuration.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mariadb -h 127.0.0.1 -u laravel_app -p laravel_app -e 'SELECT 1;'\nsudo -u apache -H php \/var\/www\/laravelapp\/artisan config:clear\nsudo -u apache -H php \/var\/www\/laravelapp\/artisan migrate --force<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The query should return <code>1<\/code>. If it fails, reset the password for both <code>laravel_app<\/code> host entries instead of granting the application administrative access.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>AH01071: Got error 'Primary script unknown'<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Apache is reaching PHP-FPM, but the script path does not match the <code>public<\/code> document root or the PHP-FPM socket handler was not loaded. Check the socket and the virtual host, then reload both services.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo test -S \/run\/php-fpm\/www.sock &amp;&amp; echo 'PHP-FPM socket exists'\nsudo apachectl configtest\nsudo systemctl restart php-fpm httpd\nsudo tail -20 \/var\/log\/httpd\/laravel-error.log<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The socket test should print <code>PHP-FPM socket exists<\/code>, and Apache should return <code>Syntax OK<\/code>. Confirm that <code>DocumentRoot<\/code> ends in <code>\/public<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>403 Forbidden<\/code> or <code>Permission denied<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The Apache group may not be able to traverse the project, or SELinux labels may be stale after files were copied. Restore labels and reapply the two writable-directory owners.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo restorecon -Rv \/var\/www\/laravelapp\nsudo chown -R apache:apache \/var\/www\/laravelapp\/storage \/var\/www\/laravelapp\/bootstrap\/cache\nsudo ausearch -m AVC -ts recent | tail -20\nsudo systemctl reload httpd<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If <code>ausearch<\/code> reports a denial, fix the path or boolean named by the event. Do not disable SELinux or apply a broad <code>chmod<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Hardening<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Keep <code>APP_DEBUG=false<\/code> and run <code>sudo -u apache -H php \/var\/www\/laravelapp\/artisan optimize<\/code> after a production deployment.<\/li>\n\n\n<li>Keep port 3306 closed and restrict SSH to trusted source addresses in the provider firewall where possible.<\/li>\n\n\n<li>Back up <code>\/var\/www\/laravelapp<\/code> and the MariaDB database before upgrades.<\/li>\n\n\n<li>Apply Rocky updates regularly and test certificate renewal with <code>sudo certbot renew --dry-run<\/code>.<\/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 does Rocky Linux 8 need Remi for this Laravel version?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Rocky Linux 8&#8217;s standard PHP stream is 8.0, while Laravel 13 requires PHP 8.3 or newer. Remi provides PHP 8.3 as an EL8 module so the package names and service layout remain familiar.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Can I use an IP address instead of a domain?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You can use the IP address for a local HTTP check with the <code>Host<\/code> header shown above. A publicly resolving domain is still needed for a normal virtual host and a trusted Let&#8217;s Encrypt certificate.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Where should Laravel write files?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Only <code>storage<\/code> and <code>bootstrap\/cache<\/code> should be writable by Apache. Logs, sessions, compiled views, and framework caches use those locations; application source and <code>.env<\/code> should not be writable by the web process.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Is <code>php artisan serve<\/code> suitable for production?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. It is a development server and does not replace Apache, PHP-FPM, firewalld, or HTTPS. Use it only for temporary local testing, not for a public Rocky Linux VPS.<\/p>\n\n\n\n<script type=\"application\/ld+json\">{\"@context\": \"https:\/\/schema.org\", \"@type\": \"FAQPage\", \"mainEntity\": [{\"@type\": \"Question\", \"name\": \"Why does Rocky Linux 8 need Remi for this Laravel version?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Rocky Linux 8's standard PHP stream is 8.0, while Laravel 13 requires PHP 8.3 or newer. Remi provides PHP 8.3 as an EL8 module so the package names and service layout remain familiar.\"}}, {\"@type\": \"Question\", \"name\": \"Can I use an IP address instead of a domain?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"You can use the IP address for a local HTTP check with the `Host` header shown above. A publicly resolving domain is still needed for a normal virtual host and a trusted Let's Encrypt certificate.\"}}, {\"@type\": \"Question\", \"name\": \"Where should Laravel write files?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Only `storage` and `bootstrap\/cache` should be writable by Apache. Logs, sessions, compiled views, and framework caches use those locations; application source and `.env` should not be writable by the web process.\"}}, {\"@type\": \"Question\", \"name\": \"Is `php artisan serve` suitable for production?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"No. It is a development server and does not replace Apache, PHP-FPM, firewalld, or HTTPS. Use it only for temporary local testing, not for a public Rocky Linux VPS.\"}}]}<\/script>\n\n","protected":false},"excerpt":{"rendered":"Install Laravel PHP framework on Rocky Linux 8 with PHP 8.3, Apache, MariaDB, Composer, HTTPS, firewalld, and SELinux-safe permissions for production.","protected":false},"author":1,"featured_media":1210,"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":[71,154,73,72,105],"class_list":["post-1209","post","type-post","status-publish","format-standard","has-post-thumbnail","category-guides","category-vps-hosting","tag-apache","tag-laravel","tag-mariadb","tag-php","tag-rocky-linux-8","cs-entry"],"_links":{"self":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/1209","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=1209"}],"version-history":[{"count":1,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/1209\/revisions"}],"predecessor-version":[{"id":4283,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/1209\/revisions\/4283"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/media\/1210"}],"wp:attachment":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/media?parent=1209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/categories?post=1209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/tags?post=1209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}