Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jack2jm/0aebaea31f467581e0bc7b599a485a0a to your computer and use it in GitHub Desktop.
Save jack2jm/0aebaea31f467581e0bc7b599a485a0a to your computer and use it in GitHub Desktop.
Hello Everyone!
I will teach you that "How to Install XAMPP on windows (7/8/8.1/10) and
make it completely secured". Also "How to install SSL Certificates on multiple virtual hosts (vhosts) Free".
And also in this video you will find a lots of XAMPP Errors solutions. Follow the steps given below:
1). Download and Install XAMPP. (Latest Version)
Search Xampp and Run as administrator.
Click on Service tab -> Apache and Mysql -> it will install both service.
Then you can start APache and Mysql
2). Install services of apache and mysql if you want it to autorun.
3). Secure default mysql user accounts, root and pma through phpmyadmin.
-> go to localhost/phpmyadmin
-> go user accounts on top menu
-> update all users passwords which has no password
-> Now you are unable to open localhost/phpmyadmin
-> D:\Xampp_latest\phpmyadmin\config.inc.php
-> update here root + pma user new password.
-> $cfg['blowfish_secret'] = 'xampp'; // change it to randomstring /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */
-> change to this to "cookie". //$cfg['Servers'][$i]['auth_type'] = 'config';
-> now you can open localhost/phpmyadmin
4). Secure phpmyadmin from bruteforce attacks by changing phpmyadmin slug and allow phpmyadmin to be accessed from anywhere.
goto (C:\xampp\apache\conf\extra\httpd-xampp.conf) and find (Directory "C:/xampp/phpMyAdmin") replace (Require Local) with
these lines
-> D:\Xampp_latest\apache\conf\extra\httpd-xampp.conf
-> Find alias /phpadmin
-> change it to name -> Alias /jackdbadmin "D:/Xampp_latest/phpMyAdmin/"
-> now for accessing local to anywhere
Remove "Require local"
and add 3 below lines
-----------
Order allow,deny
Allow from all
Require all granted
4). Set up Virtual host if you want to host more than 1 websites. (Optional)
-> create one file under apache/conf/extra/sites/domain.com.conf
<VirtualHost *:80>
ServerAdmin jatin@gmail.com
DocumentRoot "C:/xampp/htdocs/project_name"
ServerName domain_name.com
ErrorLog "logs/domain_name.com-error.log"
CustomLog "logs/domain_name.com-access.log" common
</VirtualHost>
<VirtualHost *:443>
ServerAdmin jatin@gmail.com
DocumentRoot "C:/xampp/htdocs/project_name"
ServerName domain_name.com
ErrorLog "logs/domain_name.com-error.log"
CustomLog "logs/domain_name.com-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>
-> now go to D:\Xampp_latest\apache\conf\extra\httpd-vhosts.conf
-> write line at end of the file
Include conf/extra/sites/jatin.com.conf
5). Get Free SSL Certificate and install it on the server.
https://www.sslforfree.com/ (For SSL Certificates)
-> go to this link and enter your domain
-> follow instructions and you can do manual verification or DNS verification
-> then you can get Zip of SSL certificates
-> Zip contains -> ca_bundle.crt, private.key, certificate.crt files
-> Now go to D:\Xampp_latest\apache\conf and paste here 3 files
-> create SSL named folder and move ca_bundle.crt to ssl folder
-> Delete file from ssl.crt folder
-> Rename certificate.crt to server.crt and move to ssl.crt
-> Rename private.key to server.key and move to ssl.key
-> Now apache restart it. you can see your domain will be redirect to SSL.
-> if SSL is not working then
-> go to D:\Xampp_latest\apache\conf\extra\httpd-ssl.conf
-> search for Servername example.com:443
-> replace that line with ServerName localhost
-> restart apache
-> boom SSL is working now.
6). Download and Install any Wordpress to test it out.
------------------------------------------------
Useful Links: https://www.apachefriends.org/downloa... (For XAMPP)
http://www.freenom.com/en/index.html?... (For Free Domain)
https://www.sslforfree.com/ (For SSL Certificates)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment