Self-signed SSL certificate in Laragon

帅比萌擦擦* 提交于 2020-03-05 02:48:47

问题


I developed a web app in Laravel on the Laragon Apache. But this app is only available within the oraganization, and need to be exposed to the rest. Our Miscrosft team (as the system is running on a Microsoft VM) send me a 3 .crt files (Intermediate, Root and ServerCertificate). I am not using the IIS on the Microsoft VM.

How do I install the certificates that the web app can be exposed (https) to the world. SSL is enabled on Laragon.


回答1:


Make my Laragon Localhost web SSL Secure SOLVED by AFFA Social https://www.affasocial.com 100% FREE SSL

Keep in mind your router must be set to allow port 80 and port 443 and any other ports you are using Basically Port Forwarding.

First, we use this tutorial link Laragon Localhost Tutorial to get SSL working for Localhost https://www.webtechriser.com/how-to-add-ssl-in- localhost-using-laragon

Once you have installed Laragon and followed the tutorial you can access https://localhost :)

Now let's make that localhost a https://webaddress.com

First, you need a DNS or Hostname that resolves to your computer's IP address

If you do not have a siteaddress.??? in this link you can create one very quickly https://www.dynu.com/ FREE HOSTNAME FOR MY LOCALHOST you simply create an account and go to the control panel it is the little gear icon upper right toolbar.

Then select DNS Services Icon in this window add a desired hostname from the options once this is done you can type http://hostname.??? and the default Laragon page should load.

Once this is done STOP Laragon close/exit the app altogether so Laragon is not running al all.

Now we get the SSL files to make Laragon SSL for the hostname.???.

Go to https://www.sslforfree.com/ SSL FOR FREE LINK create an account then log in and then ENTER YOU WEBSITE in the address window and click Create Free SSL Certificate.

Now in this tutorial we will use the middle option Manual Verification then scroll down and click manual verification then follow the instructions:

Upload Verification Files

Follow the steps as indicated on the site

Download File #1

Create a folder in your domain named ".well-known" if it does not already exist. If you use Windows you may have to add a dot at the end of the folder name in order to create a folder with a dot at the beginning.

Create another folder in your domain under ".well-known" named "acme- challenge" if it does not already exist

Upload the downloaded files to the "acme-challenge" folder Verify successful upload by visiting the following links in your browser

Example your address will be different http://affamusicfiles.noip.cc/.well- known/acme-challenge/N9m8nTNlDC25ZvYv7VWzUyeSZ84-XVABx3GvTid1sxA If the files do not show random alphanumeric characters or shows an error then recheck that you are uploading in the correct place. Also, try viewing the page source (Right-click then click "view page source") of the above links to make sure nothing else shows up but the verification file contents. If you use IIS then you may have to change your server config so that files without an extension (or the wildcard MIME type) serves as text/plain. Contact your host if you are unsure.

Now Click Download SSL Certificate below.

The download will consist of 3 files ca_bundle.crt certificate.crt privacy.key

Now copy certificate.crt and privacy.key to the c:\laragon\etc\ssl folder then in that folder delete laragon.crt and laragon.key then rename certificate.crt to laragon.crt then privacy.key to laragon.key then make each file read-only.

Next copy the ca_bundle.crt to C:\laragon\bin\laragon\utils then delete the curl-ca-bundle.crt and rename ca_bundle.crt to curl-ca-bundle.crt and make the file readonly.

Now start Laragon and in your browser type your hostname https://whatever.com and BAM u see the local Laragon page as SSL https://hostname.??? is Secure.

Keep in mind the option we used requires you to renew these 3 files every 90 days. Feel free to try the FTP option I believe you will still need to rename the files as noted in the steps above.

you can also purchase a single site SSL for as little as $8.00 a year but will still need to rename the files as stated in this tutorial.

keep in mind after we do this https://localhost will not work but tthe https://hostname.??? will work as it should Enjoy FREE SSL Laragon.

LIKELY WILL NOT NEED TO DO THIS --------- If for some reason this fails in Laragon preferences change the auto virtual host {name}.local to {name}.test uncheck the Auto Virtua Host then put the check back this will reload the server and everything should work fine.



来源:https://stackoverflow.com/questions/55352221/self-signed-ssl-certificate-in-laragon

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!