host file location: C:WindowsSystem32Driversetc
At first you have to reset the permission to edit and save host file. Here is the process
- Right click on the ‘host’ file then select ‘Properties’
- You will get a new window, click on the ‘Security’ tab
- Select the User that you are logged in from ‘Group or User names’ box
- Now hit the ‘Edit’ button and you will get another window
- Select the ‘Users’ that you are already logged in
- Allow ‘Full control’ to select all permissions
- Now Apply and click ok
- And now nobody stop you to save the host file 🙂
httpd.conf file loc: D:xamppapacheconf
uncomment “Include conf/extra/httpd-vhosts.conf” if it is commented.
httpd-vhosts.conf file location: D:xamppapacheconfextra
Lastly need to restart apache server
? How to Enable SSL in Xampp (Localhost)
Configure your SSL in xampp/apache/conf/extra/httpd-vhost.conf like this:
If you need SSL in more than one project, it’s better to change it in the httpd-ssl.conf
- Search ‘DocumentRoot’ text.
- Change DocumentRoot
DocumentRoot “D:/xampp/htdocs” to
DocumentRoot “D:/xampp/htdocs/project name”.
And lastly restart the apache server.