Windows पर XAMPP में वर्चुअल होस्ट बनाएं

1. Edit Hosts File

This maps your custom domains to your local machine.

📍 File location:

C:WindowsSystem32driversetchosts

👉 Open Notepad as Administrator, then add:

127.0.0.1 oft.local
127.0.0.1 dash.oft.local

Save the file.


2. Enable Virtual Hosts in Apache

Open:

C:xamppapacheconfhttpd.conf

Find this line and uncomment it (remove #):

#Include conf/extra/httpd-vhosts.conf

Change to:

Include conf/extra/httpd-vhosts.conf

3. Configure Virtual Hosts

Open:

C:xamppapacheconfextrahttpd-vhosts.conf

Add the following configuration:

<VirtualHost *:80>
ServerName oft.local
DocumentRoot "C:/xampp/htdocs/oft"
<Directory "C:/xampp/htdocs/oft">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost><VirtualHost *:80>
ServerName dash.oft.local
DocumentRoot "C:/xampp/htdocs/dash"
<Directory "C:/xampp/htdocs/dash">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

4. Create Project Folders

Make sure these folders exist:

C:xampphtdocsoft
C:xampphtdocsdash

Add an index.php or index.html file in each for testing.


5. Restart Apache

Open XAMPP Control Panel → Stop Apache → Start Apache again.

प्रोमो बॉट

जवाब देना

आपका ईमेल पता प्रकाशित नहीं किया जाएगा। आवश्यक फ़ील्ड चिह्नित हैं *

हिंदीhiहिंदीहिंदी