{"id":5751,"date":"2023-06-16T17:20:23","date_gmt":"2023-06-16T17:20:23","guid":{"rendered":"https:\/\/www.webhi.com\/how-to\/?p=5751"},"modified":"2023-12-07T16:35:25","modified_gmt":"2023-12-07T16:35:25","slug":"how-to-install-laravel-on-ubuntu-debian-apache-nginx","status":"publish","type":"post","link":"https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/","title":{"rendered":"Install Laravel on Ubuntu with Apache or Nginx"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1200\" height=\"675\" src=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/06\/laravel_nginx_apache_en-2.jpg\" alt=\"setup Laravel on Ubuntu with Apache and Nginx Debian 20.04 22.04 18.04\" class=\"wp-image-5808\" srcset=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/06\/laravel_nginx_apache_en-2.jpg 1200w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/06\/laravel_nginx_apache_en-2-300x169.jpg 300w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/06\/laravel_nginx_apache_en-2-1024x576.jpg 1024w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/06\/laravel_nginx_apache_en-2-768x432.jpg 768w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/06\/laravel_nginx_apache_en-2-150x84.jpg 150w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<p><strong>Laravel <\/strong>is a popular PHP framework known for its elegant syntax and powerful features. In this tutorial, we will guide you through the process of installing Laravel on Ubuntu 18.04\/20.04\/22.04 and Debian, using both Apache and Nginx as web servers. We will provide step-by-step instructions to ensure a smooth installation. Let&#8217;s get started!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"prerequisites\">Prerequisites<\/h2>\n\n\n\n<p>Before we begin, make sure you have the following prerequisites in place:<\/p>\n\n\n\n<ol>\n<li>Ubuntu 20.04\/22.04 server with a non-root user account with sudo privileges.<\/li>\n\n\n\n<li>Apache or Nginx web server installed and properly configured on your Ubuntu server.<\/li>\n\n\n\n<li>PHP installed on your Ubuntu server.<\/li>\n\n\n\n<li>Composer installed on your Ubuntu server.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-1-update-system-packages\">Step 1: Update System Packages<\/h2>\n\n\n\n<p>First, let&#8217;s update the system packages to ensure we have the latest versions. Open a terminal and run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo apt update\n$ sudo apt upgrade<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-2-install-php-and-required-extensions\">Step 2: Install PHP and Required Extensions<\/h2>\n\n\n\n<p>Laravel requires PHP along with some specific extensions. We will install PHP and the required extensions using the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo apt install php php-cli php-common php-mbstring php-xml php-zip php-mysql php-pgsql php-sqlite3 php-json php-bcmath php-gd php-tokenizer php-xmlwriter<\/code><\/pre>\n\n\n\n<p>Once the installation is complete, verify the PHP version by running the command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ php -v<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-3-install-composer\">Step 3: Install Composer<\/h2>\n\n\n\n<p>Composer is a dependency management tool for PHP. We will use Composer to install Laravel and its dependencies. Run the following commands to install Composer globally:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo apt install curl php-cli php-mbstring git unzip\n$ curl -sS https:\/\/getcomposer.org\/installer | sudo php -- --install-dir=\/usr\/local\/bin --filename=composer<\/code><\/pre>\n\n\n\n<p>To verify the installation, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ composer --version<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-4-install-laravel\">Step 4: Install Laravel<\/h2>\n\n\n\n<p>Now that we have Composer installed, we can use it to install Laravel. Open a terminal and navigate to the document root of your web server. For Apache, the document root is typically located at&nbsp;<code>\/var\/www\/html<\/code>, and for Nginx, it is usually at&nbsp;<code>\/var\/www<\/code>.<\/p>\n\n\n\n<p>To install Laravel, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ composer create-project --prefer-dist laravel\/laravel your-project-name<\/code><\/pre>\n\n\n\n<p>Replace&nbsp;<code>your-project-name<\/code>&nbsp;with the desired name for your Laravel project. Composer will fetch the Laravel framework and its dependencies, which may take a few minutes.<\/p>\n\n\n\n<p>Once the installation is complete, navigate to the project directory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ cd your-project-name<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-5-configure-apache\">Step 5: Configure Apache<\/h2>\n\n\n\n<p>If you are using Apache as your web server, follow these steps to configure it for Laravel.<\/p>\n\n\n\n<p>Create a new Apache configuration file for your Laravel project:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo nano \/etc\/apache2\/sites-available\/your-project-name.conf<\/code><\/pre>\n\n\n\n<p>Replace&nbsp;<code>your-project-name<\/code>&nbsp;with the actual name of your project.<\/p>\n\n\n\n<p>Add the following content to the configuration file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"apacheconf\" class=\"language-apacheconf\">&lt;VirtualHost *:80&gt;\n    ServerName your-domain-or-ip\n    DocumentRoot \/var\/www\/html\/your-project-name\/public\n\n    &lt;Directory \/var\/www\/html\/your-project-name&gt;\n        AllowOverride All\n    &lt;\/Directory&gt;\n&lt;\/VirtualHost&gt;<\/code><\/pre>\n\n\n\n<p>Replace&nbsp;<code>your-domain-or-ip<\/code>&nbsp;with your actual domain name or server IP address.<\/p>\n\n\n\n<p>Enable the Apache rewrite module:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo a2enmod rewrite<\/code><\/pre>\n\n\n\n<p>Enable the virtual host:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo a2ensite your-project-name.conf<\/code><\/pre>\n\n\n\n<p>Restart Apache for the changes to take effect:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo systemctl restart apache2<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-6-configure-nginx\">Step 6: Configure Nginx<\/h2>\n\n\n\n<p>If you are using Nginx as your web server, follow these steps to configure it for Laravel.<\/p>\n\n\n\n<p>Create a new Nginx server block for your Laravel project:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo nano \/etc\/nginx\/sites-available\/your-project-name<\/code><\/pre>\n\n\n\n<p>Replace&nbsp;<code>your-project-name<\/code>&nbsp;with the actual name of your project.<\/p>\n\n\n\n<p>Add the following content to the server block:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"nginx\" class=\"language-nginx\">server {\n    listen 80;\n    server_name your-domain-or-ip;\n    root \/var\/www\/html\/your-project-name\/public;\n    index index.php;\n\n    location \/ {\n        try_files $uri $uri\/ \/index.php?$query_string;\n    }\n\n    location ~ \\.php$ {\n        include snippets\/fastcgi-php.conf;\n        fastcgi_pass unix:\/var\/run\/php\/php7.4-fpm.sock;\n    }\n\n    location ~ \/\\.ht {\n        deny all;\n    }\n}<\/code><\/pre>\n\n\n\n<p>Replace&nbsp;<code>your-domain-or-ip<\/code>&nbsp;with your actual domain name or server IP address.<\/p>\n\n\n\n<p>Enable the Nginx server block:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo ln -s \/etc\/nginx\/sites-available\/your-project-name \/etc\/nginx\/sites-enabled\/<\/code><\/pre>\n\n\n\n<p>Test the Nginx configuration for any syntax errors:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo nginx -t<\/code><\/pre>\n\n\n\n<p>Restart Nginx for the changes to take effect:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo systemctl restart nginx<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-7-configure-laravel\">Step 7: Configure Laravel<\/h2>\n\n\n\n<p>Now that your web server is configured, let&#8217;s set up Laravel.<\/p>\n\n\n\n<p>Copy the example&nbsp;<code>.env<\/code>&nbsp;file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ cp .env.example .env<\/code><\/pre>\n\n\n\n<p>Generate a new application key:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ php artisan key:generate<\/code><\/pre>\n\n\n\n<p>Set the appropriate permissions on Laravel directories:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo chown -R www-data:www-data \/var\/www\/html\/your-project-name\/storage\n$ sudo chmod -R 775 \/var\/www\/html\/your-project-name\/storage<\/code><\/pre>\n\n\n\n<p>You&#8217;re ready to use Laravel! Access your Laravel application in a web browser by visiting your domain name or server IP address.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-text-color has-background has-small-font-size\" style=\"color:#570000;background-color:#cf2d2da3;font-style:italic;font-weight:600\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#b30101\" class=\"has-inline-color\">Important:<\/mark><\/strong>\nThe <code>.env<\/code> file in Laravel contains sensitive configuration information, including database credentials and API keys. Securing this file is crucial to protect your application from unauthorized access and security breaches. To enhance security, you can move the <code>.env<\/code> file outside the document root, restrict file permissions, disable directory browsing, encrypt sensitive information, and avoid storing production credentials in version control. Implementing these measures helps protect your application's sensitive data and maintain its security. Regularly reviewing and updating security practices is important to stay proactive against potential threats.<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>Congratulations! You have successfully installed Laravel on Ubuntu 20.04\/22.04 using both Apache and Nginx as web servers. Now you can start building powerful web applications using the Laravel framework. Enjoy coding with Laravel!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Laravel is a popular PHP framework known for its elegant syntax and powerful features. In this tutorial, we will guide you through the process of installing Laravel on Ubuntu 18.04\/20.04\/22.04 and Debian, using both Apache and Nginx as web servers. We will provide step-by-step instructions to ensure a smooth installation. Let&#8217;s get started! Prerequisites Before ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[188,4],"tags":[],"yoast_head":"\n<title>Install Laravel on Ubuntu with Apache or Nginx - WebHi Tutorials &amp; Documentations<\/title>\n<meta name=\"description\" content=\"Learn how to install Laravel on Ubuntu 20.04 22.04 18.04 using Apache and Nginx as web servers. Follow our step-by-step guide for a smooth installation process.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Install Laravel on Ubuntu with Apache or Nginx - WebHi Tutorials &amp; Documentations\" \/>\n<meta property=\"og:description\" content=\"Learn how to install Laravel on Ubuntu 20.04 22.04 18.04 using Apache and Nginx as web servers. Follow our step-by-step guide for a smooth installation process.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/\" \/>\n<meta property=\"og:site_name\" content=\"WebHi Tutorials &amp; Documentations\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webhi.technology\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-16T17:20:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-07T16:35:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/06\/laravel_nginx_apache_en-2.jpg\" \/>\n<meta name=\"author\" content=\"webhi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@WebHiTechnology\" \/>\n<meta name=\"twitter:site\" content=\"@WebHiTechnology\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"webhi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/\"},\"author\":{\"name\":\"webhi\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54\"},\"headline\":\"Install Laravel on Ubuntu with Apache or Nginx\",\"datePublished\":\"2023-06-16T17:20:23+00:00\",\"dateModified\":\"2023-12-07T16:35:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/\"},\"wordCount\":544,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\"},\"articleSection\":[\"CMS &amp; Web development\",\"Web servers\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/\",\"name\":\"Install Laravel on Ubuntu with Apache or Nginx - WebHi Tutorials &amp; Documentations\",\"isPartOf\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#website\"},\"datePublished\":\"2023-06-16T17:20:23+00:00\",\"dateModified\":\"2023-12-07T16:35:25+00:00\",\"description\":\"Learn how to install Laravel on Ubuntu 20.04 22.04 18.04 using Apache and Nginx as web servers. Follow our step-by-step guide for a smooth installation process.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webhi.com\/how-to\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Install Laravel on Ubuntu with Apache or Nginx\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#website\",\"url\":\"https:\/\/www.webhi.com\/how-to\/\",\"name\":\"WebHi Tutorials &amp; Documentations\",\"description\":\"System administration and knowledge base\",\"publisher\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webhi.com\/how-to\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\",\"name\":\"WebHi Technology\",\"url\":\"https:\/\/www.webhi.com\/how-to\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png\",\"contentUrl\":\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png\",\"width\":288,\"height\":95,\"caption\":\"WebHi Technology\"},\"image\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webhi.technology\",\"https:\/\/twitter.com\/WebHiTechnology\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54\",\"name\":\"webhi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1782424353\",\"contentUrl\":\"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1782424353\",\"caption\":\"webhi\"},\"sameAs\":[\"https:\/\/www.webhi.com\/how-to\"],\"url\":\"https:\/\/www.webhi.com\/how-to\/author\/webhi\/\"}]}<\/script>\n","yoast_head_json":{"title":"Install Laravel on Ubuntu with Apache or Nginx - WebHi Tutorials &amp; Documentations","description":"Learn how to install Laravel on Ubuntu 20.04 22.04 18.04 using Apache and Nginx as web servers. Follow our step-by-step guide for a smooth installation process.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/","og_locale":"en_US","og_type":"article","og_title":"Install Laravel on Ubuntu with Apache or Nginx - WebHi Tutorials &amp; Documentations","og_description":"Learn how to install Laravel on Ubuntu 20.04 22.04 18.04 using Apache and Nginx as web servers. Follow our step-by-step guide for a smooth installation process.","og_url":"https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/","og_site_name":"WebHi Tutorials &amp; Documentations","article_publisher":"https:\/\/www.facebook.com\/webhi.technology","article_published_time":"2023-06-16T17:20:23+00:00","article_modified_time":"2023-12-07T16:35:25+00:00","og_image":[{"url":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/06\/laravel_nginx_apache_en-2.jpg"}],"author":"webhi","twitter_card":"summary_large_image","twitter_creator":"@WebHiTechnology","twitter_site":"@WebHiTechnology","twitter_misc":{"Written by":"webhi","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/#article","isPartOf":{"@id":"https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/"},"author":{"name":"webhi","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54"},"headline":"Install Laravel on Ubuntu with Apache or Nginx","datePublished":"2023-06-16T17:20:23+00:00","dateModified":"2023-12-07T16:35:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/"},"wordCount":544,"commentCount":2,"publisher":{"@id":"https:\/\/www.webhi.com\/how-to\/#organization"},"articleSection":["CMS &amp; Web development","Web servers"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/","url":"https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/","name":"Install Laravel on Ubuntu with Apache or Nginx - WebHi Tutorials &amp; Documentations","isPartOf":{"@id":"https:\/\/www.webhi.com\/how-to\/#website"},"datePublished":"2023-06-16T17:20:23+00:00","dateModified":"2023-12-07T16:35:25+00:00","description":"Learn how to install Laravel on Ubuntu 20.04 22.04 18.04 using Apache and Nginx as web servers. Follow our step-by-step guide for a smooth installation process.","breadcrumb":{"@id":"https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.webhi.com\/how-to\/how-to-install-laravel-on-ubuntu-debian-apache-nginx\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webhi.com\/how-to\/"},{"@type":"ListItem","position":2,"name":"Install Laravel on Ubuntu with Apache or Nginx"}]},{"@type":"WebSite","@id":"https:\/\/www.webhi.com\/how-to\/#website","url":"https:\/\/www.webhi.com\/how-to\/","name":"WebHi Tutorials &amp; Documentations","description":"System administration and knowledge base","publisher":{"@id":"https:\/\/www.webhi.com\/how-to\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webhi.com\/how-to\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webhi.com\/how-to\/#organization","name":"WebHi Technology","url":"https:\/\/www.webhi.com\/how-to\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/","url":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png","contentUrl":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png","width":288,"height":95,"caption":"WebHi Technology"},"image":{"@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webhi.technology","https:\/\/twitter.com\/WebHiTechnology"]},{"@type":"Person","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54","name":"webhi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/image\/","url":"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1782424353","contentUrl":"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1782424353","caption":"webhi"},"sameAs":["https:\/\/www.webhi.com\/how-to"],"url":"https:\/\/www.webhi.com\/how-to\/author\/webhi\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/5751"}],"collection":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/comments?post=5751"}],"version-history":[{"count":24,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/5751\/revisions"}],"predecessor-version":[{"id":7381,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/5751\/revisions\/7381"}],"wp:attachment":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/media?parent=5751"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/categories?post=5751"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/tags?post=5751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}