Building a Windows Server apache2.4 under SSL site

To open the windows server apache SSL need to download and install apache version with openssl, now can be downloaded to most is apache_2.2.8-win32-x86-openssl-0.9.8g.msi , then apache2.4 how to use SSL it?

SSL site installation can be achieved with the windows server via apache2.4 pagoda panel

A. After installing the pagoda panel windows version on opening the windows server environment.

] [apache2.4 web server installation;

php installation symbiotic mode [] (Note: This does not install symbiotic mode, then build web site through the pagoda panel will pop apache2.4 does not support single version of PHP error);

mysql recommend installing version 5.5 (Note: you can choose to create a database by creating a website pagoda panel after installation);

FTP server after installation to create FTP upload and download files in FTP (FTP server is actually fileZilla)

0.png

II. Creating apache site

1.png

Click [website], then click [Add site], enter the domain name, the root directory will automatically generate the corresponding website root directory. Installed in front of the FTP server you can choose to create FTP, you can choose to install the mysql database is created due to the symbiotic mode php installed, you can select more than 5.2 to 7.1

three. Configuring the completion point [Add] station is completed, successfully created a browser to access the site.

2.png

Four configuration check before SSL:

If pagoda installed in the D drive, open the apache bin directory to see if there openssl application, it shows there is a version with apache openssl's

3.png

Conf folder and then check the file determined to contain openssl.conf

4.png

V. site corresponding to the domain name download apache SSL Certificates

5.png

VI. Apache folder open folder vhost pagoda panel, which is generated corresponding to the conf file for each site, the need to select the site corresponding to the SSL certificate file CONF

6.png

Seven modify the configuration file, the code is:


#startSite

<VirtualHost *: 443> // here the original configuration file is 80 (http port value), modified to 443 (https port value)


# Enable SSL

SSLEngine on

SSLProtocol all -SSLv2

SSLCipherSuite HIGH: Medium:! Anull:! MD5


#https certificate location

SSLCertificateFile "Your SSL certificate path /certificate.crt"

SSLCertificateKeyFile "Your SSL certificate path /private.key"

SSLCertificateChainFile "Your SSL certificate path /ca_bundle.crt"

DocumentRoot "your site root directory path."

ServerName your domain name

In addition ServerAlias ​​your domain name

#START-ERROR-PAGE

ErrorDocument 403 /403.html

ErrorDocument 404 /404.html

ErrorDocument 502 /502.html

#END-ERROR-PAGE


#startPHP

<Files ~ "\.php$">

Options FollowSymLinks ExecCGI

AddHandler fcgid-script .php

FcgidWrapper "Your PHP version (pagoda panel has filled in)" .php

</Files>

#endPHP

#start301

#end301

#REFERER-START

#REFERER-END

#PROXY-START

#PROXY-END

<Directory "your site's root">

Options FollowSymLinks ExecCGI

AllowOverride All

Require all granted

DirectoryIndex index.php default.php index.html index.htm default.html default.htm

</Directory>

ErrorLog "logs / your domain name -error.log"

    CustomLog "logs / your domain name -access.log" common

</VirtualHost>

#endSite

7.png

VIII. Restart apache, a successful visit by https

6.png


Guess you like

Origin blog.51cto.com/14662442/2485427