- goto
C:/xampp/apache/conf/extra/than openhttpd-vhosts.confwith code editor exampleVS Codethan you will see
##<VirtualHost *:80>
##ServerAdmin [email protected]
##DocumentRoot "C:/xampp/htdocs/dummy-host.example.com"
##ServerName dummy-host.example.com
##ServerAlias www.dummy-host.example.com
##ErrorLog "logs/dummy-host.example.com-error.log"
##CustomLog "logs/dummy-host.example.com-access.log" common
##</VirtualHost>
##<VirtualHost *:80>
##ServerAdmin [email protected]
##DocumentRoot "C:/xampp/htdocs/dummy-host2.example.com"
##ServerName dummy-host2.example.com
##ErrorLog "logs/dummy-host2.example.com-error.log"
##CustomLog "logs/dummy-host2.example.com-access.log" common
##</VirtualHost>
- than Remove the command
##like also remove
##ServerAdmin [email protected]
##ErrorLog "logs/dummy-host2.example.com-error.log"
##CustomLog "logs/dummy-host2.example.com-access.log" common
- Replace your Project Directory of DocumentRoot and Name your Favorite Domain that you Love
<VirtualHost *:80>
DocumentRoot "D:/Project"
ServerName task.com
</VirtualHost>
- also you can create multiple Domain Name by Create multiple VirtualHost like:
<VirtualHost *:80>
DocumentRoot "D:/Project"
ServerName task.com
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "D:/Project/Website"
ServerName web.com
</VirtualHost>
How to Change Virtual Host go to https://sophatleat.blogspot.com/2021/12/how-to-change-virtual-host-and-how-to.html
if you like this turtorial just Leave a Comment :) Thanks
Post a Comment