8 How to run multiple websites on xampp localhost

Опубликовано: 26 Октябрь 2024
на канале: Dev Ansab
11,776
69

In this video you will see how you can run multiple websites on your windows localhost using xampp.
Watch previous video of this course here:    • Xampp server course -  windows  

CODE:
_________________________________________________________________
#save this file as filename.conf and include the location of this file in xampp/apache/conf/extra/httpd-vhosts/conf file using "Include" command
VirtualHost 127.0.0.2:80
ServerAdmin Admin@localhost
DocumentRoot "C:/xampp/htdocs/examplecom"
ServerName example.com
ErrorLog "logs/examplecom-error.log"
CustomLog "logs/examplecom-access.log" common
/VirtualHost

#This code is if domain have ssl configured with it
VirtualHost 127.0.0.2:443
ServerAdmin Admin@localhost
DocumentRoot "C:/xampp/htdocs/examplecom"
ServerName examplecom
ErrorLog "logs/examplecom-error.log"
CustomLog "logs/examplecom-access.log" common
SSLEngine on
SSLCACertificateFile "C:\xampp\apache\conf\ssl\ca_bundle.crt"
SSLCertificateFile "C:\xampp\apache\conf\ssl.crt\server.crt"
SSLCertificateKeyFile "C:\xampp\apache\conf\ssl.key\server.key"
/VirtualHost
_________________________________________________________________
NOTE: You must place angle brackets before and after "VirtualHost".

I am also available on :
Facebook:   / devansab9  
Quora: https://www.quora.com/profile/Dev-Ansab
Twitter:   / devansab9