Home >Backend Development >PHP Tutorial >How to install SSL certificate in phpStudy environment

How to install SSL certificate in phpStudy environment

韦小宝
韦小宝Original
2017-11-23 09:22:265462browse

phpStudyEnvironment integration package is easy and fast to use. It is a good thing for PHP beginners who are just getting started. phpStudy, our PHP Chinese website also has one and ## If you are interested in #phpStudy type of tools, you can take a look!

Step one: Modify the httpd.conf configuration file in the apache directory

1. #LoadModule ssl_module modules/mod_ssl.so Delete the configuration statement comment symbol "#" at the beginning of the line

2. Include extra/httpd-ssl.conf Remove the "#" from the comment in this line

The second step is to edit the extra/httpd-ssl.conf file and modify the following content:

1. Change the ServerName to your website domain name, you can do without the port number

Change the DocumentRoot to the website path
The SSLCertificateFile to the server.crt file path
The SSLCertificateKeyFile to the server.key file path
SSLCERTIFICATECHAINFILE is later changed to CA.CRT file path

# ErrorLog. # CustomLog The beginning of this line can be commented out (add # in front)


2.phpstudy configures the specified path to access https (for reference only, you can not use it)

RewriteEngine on

RewriteBase /

RewriteCond %{SERVER_PORT} !^443$

RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]

The third step is to save and exit, and restart Apache. If there is an error or it cannot start normally, please see the error log.

The above is the entire process of how to install an SSL certificate in the phpStudy environment. For more information, please go to

PHP中文网

to search!

Related recommendations:

##phpStudy Quick Start Video Tutorial

Solutions to 403 errors encountered when phpStudy configures multiple sites and multiple domain names

##Solutions to problems encountered during the configuration of multiple domain names in phpStudy2016

phpstudyHow to extend MongoDB

The above is the detailed content of How to install SSL certificate in phpStudy environment. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn