SSLCertificateFile : Just copy, don’t modified it because in step create certificate, XAMPP will auto put your certificate in appropriate folder. VirtualHost *:443 : This is port to run SSLĭocumentRoot : Point to your project folder So, let’s go to file at address : E\xampp\apache\conf\extra\nfĬreate new virtual config as following sample : It’s time to config a virtual host to make a better URL to access our project. Step 4 : Config Virtual host to test site Now paste all this text to the config file at address E:\xampp\apache\conf\extra\nf(That is rewrite URL, if not, you can't access your site via SSL): LoadModule rewrite_module modules/mod_rewrite.so #LoadModule rewrite_module modules/mod_rewrite.so To do this, edit E:\xampp\apache\conf\nf and get rid of the comment (# character) in this line : This helps keep small the number of places in the config files where the server name is written (making your config files more maintainable).įirst, we need to make sure that mod_rewrite is enabled. To accomplish the redirection, we will use mod_rewrite so that we don’t have to use the server name in this part of the config file. If you don’t do this, and you used SSLRequireSSL, you will only be able to access these pages by typing This is fine and probably a little bit more secure, but is not so user friendly. This is more user friendly and allows you to still use http when you type in the address (and automatically switch to and encryption). This next optional step is to redirect “http” requests to “https” requests for the pages we want to secure. Step 3: Config mod_rewrite to generate SSL url Open this and add line that I talked above in all list folders below :Īnother config file that also need directive SSLRequireSSL located in e:\xampp\webdav. First, we will force ssl when access folders by add this directive “SSLRequireSSL” in this config file ( e:\xampp\apache\conf\extra\nf) Now this is time for you to config Apache to access folders with “https” instead of “http”. Step 2 : Config Apache to access https instead of http For example in localhost, I will use a Virtual host URL (I will configure it later) All you need is only typing all information that ‘s very easy, except one information “Common Name”, at this you must be typed exactly your URL website. In this, find
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |