1b. Install Apache, PHP, localhost SSL (https) On Windows 10, all newest 64 bit
===============================================================================

[HOME](http://phporacle.altervista.org/php-oracle-main-menu/)  
Download config and php test files: [0\_Apache24\_conf\_extra\_PHP\_ini](http://phporacle.altervista.org/1b-install-apache-php-localhost-ssl-windows-10-newest-64-bit/0_apache24_conf_extra_php_ini/).zip

Everything works. If I forgot something see URL-s in this article wich served me as tutorials.**ZWAMP or simmilar and virtual hosts are not used for this basic example **Apache and PHP are extracted in C: .

**Output of C:\\Apache24\\htdocs\\index.php**  
(see 0\_Apache24\_conf\_extra\_PHP\_ini.zip) :

Glavni izbornik (**Home**)

 HTML 5, CSS 3, JS, SSL.                                                            [Help](https://localhost/index.php#help)  
1111111111 2222222222 3333333333 4444444444   444444     [Home refresh](https://localhost/index.php)(http)  
4444444444 4444444444 4444444444                                       [Home https](https://localhost/index.php)  
  
C:\\Apache24\\htdocs\\index.php says:**JS says: location.protocol=https:**

[https://www.proy.info/how-to-enable-localhost-https-on-wamp-server/](https://www.proy.info/how-to-enable-localhost-https-on-wamp-server/)  
Posted On May 19th, 2017

I did mostly see below Masim Man Dec 1, 2016  
1\. HOW TO SET UP APACHE WITH SSL (HTTPS) ON LOCALHOST  
but URL above has some clearer configs

**Step 1: Download and unpack Apache lounge 64 bit (Windows 10 64 bit)**  
**and PHP Version 7.1.9 non thread safe**  
httpd-2.4.27-Win64-VC15.zip, mod\_fcgid-2.3.9-win64-VC15.zip  
php-7.1.9-nts-Win32-VC14-x64.zip  
SEE HOW TO UNPACK zip-s above :[https://www.dionysopoulos.me/233-apache-mysql-php-server-on-windows-with-multiple-simultaneous-php-versions.html](https://www.dionysopoulos.me/233-apache-mysql-php-server-on-windows-with-multiple-simultaneous-php-versions.html)  
or 0\_Apache24\_conf\_extra\_PHP\_ini.zip above.

we have C:\\Apache24 and C:\\PHP\\7.1.9

Step 2: Download OpenSSL (32 bits/64 bits Windows)  
**I did not so, see below Masim Man Dec 1, 2016**

Step 3: Configure WAMP to use HTTP+SSL=HTTPS  
I did not so, see below Masim Man Dec 1, 2016

Step 4: Create SSL Key and Certificate  
I did not so, see below Masim Man Dec 1, 2016

Step 5: Copy the Created SSL Key and Certificate file  
I did not so, see below Masim Man Dec 1, 2016

**Step 6: Open httpd.conf, php.ini & uncomment**  
Open C:\\Apache24\\conf\\httpd.conf and uncomment:  
LoadModule ssl\_module modules/mod\_ssl.so  
Include conf/extra/httpd-ssl.conf  
LoadModule socache\_shmcb\_module modules/mod\_socache\_shmcb.so  
See whole scripts in .zip above.

**Step 7: Open httpd-ssl.conf and make the final changes**  
Open c:\\Apache24\\conf\\extra\\httpd-ssl.conf (see .zip above)  
find <VirtualHost \_default\_:443> and below that line find and update below configuration according to your setup:  
**\# General setup for the virtual host**  
DocumentRoot c:/Apache24/htdocs  
#ServerName www.example.com:443  
ServerName localhost:443  
ServerAdmin youremail  
ErrorLog c:/Apache24/logs/sslerror.log  
TransferLog c:/Apache24/logs/sslaccess.log  
SSLEngine on  
SSLCertificateFile c:/Apache24/conf/server.crt  
SSLCertificateKeyFile c:/Apache24/conf/server.key  
 and so on, see config files in 0\_Apache24\_conf\_extra\_PHP\_ini.zip.

Open php.ini, uncomment :  
extension=php\_openssl.dll

**Step 8: Test to make sure it works**  
check if you are getting Syntax is OK  
C:\\Apache24\\bin>httpd -t  
https://localhost/index.php

[https://www.youtube.com/watchv=Zdl68h\_N2lc](https://www.youtube.com/watchv=Zdl68h_N2lc)Masim Man Published on Dec 1, 2016 :

HOW TO SET UP APACHE WITH SSL (HTTPS) ON LOCALHOST
--------------------------------------------------

HTTPS (Hyper Text Transfer Protocol Secure) is a protocol for secure communication over a computer network.

Make icon for C:\\Windows\\SysWOW64\\cmd.exe (run as admin). It shows Apaches openssl:  
openssl version -d  
OPENSSLDIR: C:\\Program Files\\Common Files\\SSL  
openssl version  
OpenSSL 1.1.0f 25 May 2017

We create files :  
1\. C:\\Apache24\\conf\\server.csr              <OpenSSL certificate request  
2\. C:\\Apache24\\conf\\server.pem            <private key  
  
3\. C:\\Apache24\\conf\\server.key             <from .pem  
4\. C:\\Apache24\\conf\\server.crt              <from .key, .csr  
see  below :  
openssl x509 -req -signkey C:\\Apache24\\conf\\**server.key**\-days 1024 ^  
\-in C:\\Apache24\\conf\\**server.csr**\-out C:\\Apache24\\conf\\**server.crt**

00000 INITIAL  
Change config path to where you have installed Apache :  
cd C:\\Apache24\\bin  
**set OPENSSL\_CONF=C:\\Apache24\\conf\\openssl.cnf**

11111 & 22222      ^ = ALTGRKEY+3 (3 two times)  
**openssl req -config C:\\Apache24\\conf\\openssl.cnf -new ^**  
**   -out C:\\Apache24\\conf\\server.csr -keyout C:\\Apache24\\conf\\server.pem**  
ANSWERS: only two :  
writing new private key to C:\\Apache24\\conf\\server.pem  
Enter PEM pass phrase:**test1**  
Common Name (e.g. server FQDN or YOUR name) \[\]:**localhost**

33333  
**openssl rsa -in C:\\Apache24\\conf\\server.pem -out C:\\Apache24\\conf\\server.key**  
ANSWER: Enter pass phrase for C:\\Apache24\\conf\\server.pem:**test1**  
writing RSA key

44444  
**openssl x509 -req -signkey C:\\Apache24\\conf\\server.key -days 1024 ^**  
**    -in C:\\Apache24\\conf\\server.csr -out C:\\Apache24\\conf\\server.crt**  
Outputs:  
Signature ok  
subject=C = AU, ST = Some-State, O = Internet Widgits Pty Ltd, CN = localhost  
Getting Private key

55555  
C:\\Apache24\\conf\\httpd.conf  
search ssl, listen, httpd-ssl and uncomment :  
LoadModule log\_config\_module modules/mod\_log\_config.so  
LoadModule setenvif\_module modules/mod\_setenvif.so  
LoadModule socache\_shmcb\_module modules/mod\_socache\_shmcb.so  
LoadModule ssl\_module modules/mod\_ssl.so

Listen 80  
#live commented <IfModule mod\_ssl.c>  
Listen 443  
#</IfModule>

**Include conf/extra/httpd-ssl.conf**

C:\\Apache24\\conf\\extra\\httpd-ssl.conf  
SSLSessionCache shmcb:c:/Apache24/logs/ssl\_scache(512000)

restart Apache  
if will not start:  as sdmin in CLI  
C:\\Apache24\\bin>httpd -t  
or :  
NOT httpd.exe -k restart but so:  
C:\\Apache24\\bin>httpd.exe   this shows error message

 NEEDED FOR MS INET BROWSERS :  
[https://www.youtube.com/watchv=Hhown6DgC00](https://www.youtube.com/watchv=Hhown6DgC00)Masim Man Published on Dec 2, 2016  
**HOW TO INSTALL AN APACHE SELF SIGNED CERTIFICATE ON WINDOWS 10**  
On Windows 10, a Self Signed Certificate that wasnt issued by a recognized certificate authority is not trusted by default. A Self Signed Certificates usually used on Local Web Servers (Localhost) that arent available publicly. In this case you are save to  
 bypass the warning on any browsers  
 or installing it to a trusted root certification authority in Windows 10.  
2click C:\\Apache24\\conf\\server.crt  
in Certificate dialog Issued to and Issued by is localhost  
click button Install certificate  
for current user  
place in store Trusted root Cert. Authorities  
remove certificate localhost so:  
WINKEY -> mmc -> File -> Add/remove snapp-in -> Certificates  
\-> Add -> My user account

 kod[ edit]($web_docroot_url/inc/utl/edservertxt.php)[ phpinfo]($web_docroot_url/phpinfo_inc.php) EOKOD; /\* call it so: kod\_edit\_run( $idx // script\_dir\_path , $idxscript // script\_name , MDURL); // web\_docroot\_url = (Apache) web server URL \*/ }