How To Create Virtual Host In Xampp Windows?
Development teams using “How To Create Virtual Host In Xampp Windows?” in client or internal work can use this delivery reference to document project effort and hand-offs, then assess the record against delivered functionality, tests and agreed outcomes.
Validate current syntax, security guidance and supported versions through GitHub before using the example in production.
In this article, I am going to learn you how to create virtual host in xampp windows. We will will get how to create or the setup virtual host in windows. i will show how you can setup and configure virtual hosts for drupal website with XAMPP running on windows. This tutorial will give easy and simple way to create or setup virtual host in xampp windows.
Here i will give you full example for how to create & setup virtual host in windows with XAMPP Server step by step easy way configuration vhost in your windows So let's follow bellow step by step.
Step 1 : Create Virtual Host
In this step, You can open C:/xampp/apache/conf/extra/httpd-vhosts.conf file Then, edit httpd-vhosts.conf with any text editor. In my case, I am using Notepad++.
Now put the bellow code at last in this file.
C:/xampp/apache/conf/extra/httpd-vhosts.conf
<VirtualHost *:80>
DocumentRoot "c:/xampp/htdocs/my_pro" // Your Project Folder Path
ServerName my_pro.localhost
<Directory "c:/xampp/htdocs/my_pro"> // Your Project Folder Path
</Directory>
</VirtualHost> - VirtualHost: Most web servers use port 80 as their default port. However, you can change the port to 8080, 8081, etc.
- DocumentRoot: add your project folder path, my folder path is c:/xampp/htdocs/my_pro.
- ServerName: It is the URL for our virtual host.
- Directory: It is the directory of our virtual host.
Step 2 : Add Host
In the last step, we will open C:\Windows\System32\drivers\etc\hosts
File and add your servername at the end of file.
127.0.0.1 my_pro.localhost
Now run your xampp server and start your apache and mysql service. Then open your browser run your project.
my_pro.localhost
It will help you...
# Windows
- How to Use the groupmod Command in Linux?
- How to Restrict Access to a Folder with htaccess?
- How to Zip UnZip Files And Directories In Linux using Command Line?
- Laravel 8 Refresh DataTable Without Reloading Page
- How to Model Disable Primary Key & Auto Increment Tutorial?
- How to Remove WordPress Version Number?
- How to Count Total Number of Bits in Number?
- Flutter Route and Navigation Example