{"id":1289,"date":"2023-11-02T19:32:24","date_gmt":"2023-11-02T19:32:24","guid":{"rendered":"https:\/\/www.devopssupport.in\/blog\/?p=1289"},"modified":"2023-11-27T19:53:15","modified_gmt":"2023-11-27T19:53:15","slug":"how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost","status":"publish","type":"post","link":"https:\/\/www.devopssupport.in\/blog\/how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost\/","title":{"rendered":"How to download and installer php and How to add path in apace and vhost"},"content":{"rendered":"\n<p>To download and install PHP and Laravel on your machine and configure Apache with a virtual host, follow these steps. This guide assumes you are using a Windows environment. If you&#8217;re using a different operating system, some steps might vary.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Download and Install PHP:<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Visit the <a href=\"https:\/\/windows.php.net\/download\/\">official PHP website<\/a> to download the PHP installer for Windows.<\/li>\n\n\n\n<li>Choose the PHP version that fits your requirements. As of my last knowledge update in January 2022, PHP 8.1 might be the latest stable version.<\/li>\n\n\n\n<li>Run the installer and follow the installation prompts. During installation, make sure to add PHP to your system PATH.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2. Download and Install Composer:<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Visit the <a href=\"https:\/\/getcomposer.org\/download\/\">Composer website<\/a> to download and install Composer.<\/li>\n\n\n\n<li>Run the installer and follow the installation prompts.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3. Install Laravel:<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open a command prompt and navigate to the directory where you want to install Laravel.<\/li>\n\n\n\n<li>Run the following command to create a new Laravel project:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>composer create-project --prefer-dist laravel\/laravel your-project-name\r\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Replace &#8220;your-project-name&#8221; with the desired name for your Laravel project.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">4. Configure Apache and Virtual Host:<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Locate your Apache configuration files. This is typically in the <code>conf<\/code> directory where Apache is installed.<\/li>\n\n\n\n<li>Open the <code>httpd.conf<\/code> file and make sure that the following lines are uncommented:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>LoadModule rewrite_module modules\/mod_rewrite.so\r\n<\/code><\/pre>\n\n\n\n<p>Create a virtual host for your Laravel project. Open the <code>httpd-vhosts.conf<\/code> file and add the following:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;VirtualHost *:80>\r\n    DocumentRoot \"C:\/path-to-your-laravel-project\/public\"\r\n    ServerName your-laravel-project.local\r\n\r\n    &lt;Directory \"C:\/path-to-your-laravel-project\/public\">\r\n        Options Indexes FollowSymLinks\r\n        AllowOverride All\r\n        Require all granted\r\n    &lt;\/Directory>\r\n&lt;\/VirtualHost>\r\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Replace &#8220;C:\/path-to-your-laravel-project&#8221; with the actual path to your Laravel project and &#8220;your-laravel-project.local&#8221; with your desired local domain.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">5. Edit Hosts File:<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open the <code>hosts<\/code> file located at <code>C:\\Windows\\System32\\drivers\\etc\\hosts<\/code> with a text editor with administrative privileges.<\/li>\n\n\n\n<li>Add the following line:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>127.0.0.1    your-laravel-project.local\n\nReplace \"your-laravel-project.local\" with the same ServerName used in your virtual host configuration.\n\n<strong>6. Edit Hosts File:<\/strong>\nRestart Apache to apply the changes.\n\n<strong>7. Access Your Laravel Application:<\/strong>\nOpen your web browser and navigate to http:\/\/your-laravel-project.local.<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>To download and install PHP and Laravel on your machine and configure Apache with a virtual host, follow these steps. This guide assumes you are using a&#8230; <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[529,528,526,527,525],"class_list":["post-1289","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-configure-apache-and-virtual-host","tag-download-and-install-composer","tag-how-to-add-path-in-apace-and-vhost","tag-how-to-download-and-installer-php","tag-how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to download and installer php and How to add path in apace and vhost - DevOps Support<\/title>\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.devopssupport.in\/blog\/how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to download and installer php and How to add path in apace and vhost - DevOps Support\" \/>\n<meta property=\"og:description\" content=\"To download and install PHP and Laravel on your machine and configure Apache with a virtual host, follow these steps. This guide assumes you are using a...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.devopssupport.in\/blog\/how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost\/\" \/>\n<meta property=\"og:site_name\" content=\"DevOps Support\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-02T19:32:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-27T19:53:15+00:00\" \/>\n<meta name=\"author\" content=\"Avinash kumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Avinash kumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.devopssupport.in\/blog\/how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.devopssupport.in\/blog\/how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost\/\"},\"author\":{\"name\":\"Avinash kumar\",\"@id\":\"https:\/\/www.devopssupport.in\/blog\/#\/schema\/person\/ee29c62455ded10b2424fb9ca585e347\"},\"headline\":\"How to download and installer php and How to add path in apace and vhost\",\"datePublished\":\"2023-11-02T19:32:24+00:00\",\"dateModified\":\"2023-11-27T19:53:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.devopssupport.in\/blog\/how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost\/\"},\"wordCount\":257,\"commentCount\":2,\"keywords\":[\"Configure Apache and Virtual Host\",\"Download and Install Composer\",\"How to add path in apace and vhost\",\"How to download and installer php\",\"How to download and installer php and How to add path in apace and vhost\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.devopssupport.in\/blog\/how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.devopssupport.in\/blog\/how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost\/\",\"url\":\"https:\/\/www.devopssupport.in\/blog\/how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost\/\",\"name\":\"How to download and installer php and How to add path in apace and vhost - DevOps Support\",\"isPartOf\":{\"@id\":\"https:\/\/www.devopssupport.in\/blog\/#website\"},\"datePublished\":\"2023-11-02T19:32:24+00:00\",\"dateModified\":\"2023-11-27T19:53:15+00:00\",\"author\":{\"@id\":\"https:\/\/www.devopssupport.in\/blog\/#\/schema\/person\/ee29c62455ded10b2424fb9ca585e347\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.devopssupport.in\/blog\/how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.devopssupport.in\/blog\/how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.devopssupport.in\/blog\/how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.devopssupport.in\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to download and installer php and How to add path in apace and vhost\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.devopssupport.in\/blog\/#website\",\"url\":\"https:\/\/www.devopssupport.in\/blog\/\",\"name\":\"DevOps Support\",\"description\":\"DevOps Support | DevSecOps Support | SRE Support | MLOps SRE Support\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.devopssupport.in\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.devopssupport.in\/blog\/#\/schema\/person\/ee29c62455ded10b2424fb9ca585e347\",\"name\":\"Avinash kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.devopssupport.in\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/db01f522798b98f8f474a1dfdd200df1c0e7ada232088d7a8192e14919e4de0a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/db01f522798b98f8f474a1dfdd200df1c0e7ada232088d7a8192e14919e4de0a?s=96&d=mm&r=g\",\"caption\":\"Avinash kumar\"},\"sameAs\":[\"www.linkedin.com\/in\/avinash-kumar-150791240\"],\"url\":\"https:\/\/www.devopssupport.in\/blog\/author\/avinash\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to download and installer php and How to add path in apace and vhost - DevOps Support","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.devopssupport.in\/blog\/how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost\/","og_locale":"en_US","og_type":"article","og_title":"How to download and installer php and How to add path in apace and vhost - DevOps Support","og_description":"To download and install PHP and Laravel on your machine and configure Apache with a virtual host, follow these steps. This guide assumes you are using a...","og_url":"https:\/\/www.devopssupport.in\/blog\/how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost\/","og_site_name":"DevOps Support","article_published_time":"2023-11-02T19:32:24+00:00","article_modified_time":"2023-11-27T19:53:15+00:00","author":"Avinash kumar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Avinash kumar","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.devopssupport.in\/blog\/how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost\/#article","isPartOf":{"@id":"https:\/\/www.devopssupport.in\/blog\/how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost\/"},"author":{"name":"Avinash kumar","@id":"https:\/\/www.devopssupport.in\/blog\/#\/schema\/person\/ee29c62455ded10b2424fb9ca585e347"},"headline":"How to download and installer php and How to add path in apace and vhost","datePublished":"2023-11-02T19:32:24+00:00","dateModified":"2023-11-27T19:53:15+00:00","mainEntityOfPage":{"@id":"https:\/\/www.devopssupport.in\/blog\/how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost\/"},"wordCount":257,"commentCount":2,"keywords":["Configure Apache and Virtual Host","Download and Install Composer","How to add path in apace and vhost","How to download and installer php","How to download and installer php and How to add path in apace and vhost"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.devopssupport.in\/blog\/how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.devopssupport.in\/blog\/how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost\/","url":"https:\/\/www.devopssupport.in\/blog\/how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost\/","name":"How to download and installer php and How to add path in apace and vhost - DevOps Support","isPartOf":{"@id":"https:\/\/www.devopssupport.in\/blog\/#website"},"datePublished":"2023-11-02T19:32:24+00:00","dateModified":"2023-11-27T19:53:15+00:00","author":{"@id":"https:\/\/www.devopssupport.in\/blog\/#\/schema\/person\/ee29c62455ded10b2424fb9ca585e347"},"breadcrumb":{"@id":"https:\/\/www.devopssupport.in\/blog\/how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.devopssupport.in\/blog\/how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.devopssupport.in\/blog\/how-to-download-and-installer-php-and-how-to-add-path-in-apace-and-vhost\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.devopssupport.in\/blog\/"},{"@type":"ListItem","position":2,"name":"How to download and installer php and How to add path in apace and vhost"}]},{"@type":"WebSite","@id":"https:\/\/www.devopssupport.in\/blog\/#website","url":"https:\/\/www.devopssupport.in\/blog\/","name":"DevOps Support","description":"DevOps Support | DevSecOps Support | SRE Support | MLOps SRE Support","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.devopssupport.in\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.devopssupport.in\/blog\/#\/schema\/person\/ee29c62455ded10b2424fb9ca585e347","name":"Avinash kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.devopssupport.in\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/db01f522798b98f8f474a1dfdd200df1c0e7ada232088d7a8192e14919e4de0a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/db01f522798b98f8f474a1dfdd200df1c0e7ada232088d7a8192e14919e4de0a?s=96&d=mm&r=g","caption":"Avinash kumar"},"sameAs":["www.linkedin.com\/in\/avinash-kumar-150791240"],"url":"https:\/\/www.devopssupport.in\/blog\/author\/avinash\/"}]}},"_links":{"self":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts\/1289","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/comments?post=1289"}],"version-history":[{"count":1,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts\/1289\/revisions"}],"predecessor-version":[{"id":1290,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts\/1289\/revisions\/1290"}],"wp:attachment":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/media?parent=1289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/categories?post=1289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/tags?post=1289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}