Quantcast
Channel: WampServer - WampServer English
Viewing all articles
Browse latest Browse all 3177

httpS with WAMP3 - install guide (need help with httpS) (1 reply)

$
0
0
My setup:
Windows 10 64bit
NUC Intel i5 - 16Mb RAM - 1TB SSD.... faaaasssstttttt!!!!!!


-installed all VC required files (when installing WAMP3, they provide the links for each one)
-installed WAMP3 64bits
-installed WAMP -UPDATES from this post: [forum.wampserver.com]
-installed openssl for windows 1.1.0b light from here: [slproweb.com]

once everything installed:
-change DataBase password using phpmyadmin > login: root/password: "empty!" > head over to "users" change the password for "root"
-head to "databases" > create your database: ie: "wordpress" if you will install WP.....duh!

*-copy: libeay32.dll and ssleay32.dll from "php5/bin" folder to "windows\system32" to be able to use SSL

-Created SSL Certificate and Key:
*-copy: openssl.cfg from OpenSSL folder from C.....to: C:\wamp64\bin\apache\apache2.4.23\conf\openssl.cnf
-open: CMD (thats the windows command prompt..... press windows key, type CMD.... there!)
cd C:\OpenSSL-Win32\bin
openssl req -nodes -x509 -newkey rsa:4096 -keyout ssl.key -out ssl.crt -days 1825

-createed folder sslkey and sslcrt and moved them to: C:\wamp64\bin\apache\apache2.4.23\conf

-go to wamp64/bin/apache/apache2.2.x/ and open httpd.conf ....uncomment the following (all the proxy ones is for a project of mine... home assistant...pretty cool, but not needed unless you know how to setup and use it - took me forever to set them up!):
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_html_module modules/mod_proxy_html.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
LoadModule ssl_module modules/mod_ssl.so
LoadModule xml2enc_module modules/mod_xml2enc.so
Include conf/extra/httpd-ssl.conf
-add: Include conf/extra/hass.conf -part of that special project I mentioned before!

-edited: C:\wamp64\bin\apache\apache2.4.23\conf\extra\httpd-ssl.conf:
VirtualHost _default_:443> (check parameters below line)-----------
DocumentRoot "C:/wamp64/www"
ServerName example.com443
ServerAdmin admin@example.com
ErrorLog "C:/wamp64/bin/apache/apache2.4.23/logs/ssl_error.log"
TransferLog "C:/wamp64/bin/apache/apache2.4.23/logs/ssl_access.log"

SSLCertificateFile "C:/wamp64/bin/apache/apache2.4.23/conf/sslcrt/ssl.crt"
SSLCertificateKeyFile "C:/wamp64/bin/apache/apache2.4.23/conf/sslkey/ssl.key"

-change: Directory "c:/Apache24/cgi-bin" to
Directory "c:/wamp64/bin/apache/apache2.4.23/cgi-bin"

-change: CustomLog "c:/Apache24/logs/ssl_request.log" \ to
"C:/wamp64/logs/ssl_request.log"

-change: SSLSessionCache "shmcb:c:/Apache24/logs/ssl_scache(512000)"
SSLSessionCache "shmcb:C:/wamp64/logs/ssl_scache(512000)"

-for better security.....comment:
SSLCipherSuite HIGH:MEDIUM:!MD5:!RC4
SSLProxyCipherSuite HIGH:MEDIUM:!MD5:!RC4
-uncomment:
SSLCipherSuite HIGH:MEDIUM:!SSLv3:!kRSA
SSLProxyCipherSuite HIGH:MEDIUM:!SSLv3:!kRSA

-add " -SSLv2" add the end of each line:
SSLProtocol all -SSLv3
SSLProxyProtocol all -SSLv3

-add before last line:
SSLCompression off

-open php.ini from wamp manager - this would depend on where you are located.... no? duh... :)
date.timezone = "America/New_York"
date.default_latitude = 28.4909449
date.default_longitude = -80.5888037

*thats right.... I live in space!

-Create a VirtualHost (guide from WAMP3 all you need to know...forum!):
- sitefolder : folder in which you want to host the local site
- sitename : name that will be called the local site (http://sitename/)
-create the folder "sitefolder" ie: C:\wamp64\www\reader
-Got to: localhost
-Click: Add Virtual Host ("VirtualHosts submenu" within tools need to be check/enabled)
-"Name of the Virtual Host ..... - No space - No underscore(_)": wordpress.example.com
-"Complete absolute path": c:\sitefolder\
- Start the creation of the VirtualHost
-Right-Click Wampmanager Icon -> Tools -> Restart DNS

-Add certificate to Windows computer:
-go to> Start > Search "mmc" > file > Add/Remove Snap-in > Certificates > Add > Computer account > Click Local computer, and Finish > Ok

-In the console tree > expand Certificates > Right-click "Trusted Root Certification Authorities store" > All Tasks > Import ..... import!

Force HTTPS:
edit: C:/wamp64/bin/apache/apache2.4.23/conf/extra/httpd-vhost.conf:
<VirtualHost *:80>
ServerName wordpress.example.com
........some other info..Doc root, etc.... then add....

RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule .* []%{SERVER_NAME}%{REQUEST_URI} [NE,R,L]
</VirtualHost>

Restart wamp and test.....


QUESTION:
whenever I try to go to [wordpress.example.com]..... i get to the localhost page....[wordpress.example.com] works fine
[localhost] works fine as well.

My windows HOST has ::1 and 127.0.0.1 with wordpress.example.com as well as localhost, etc.
Any help, hihgly appreciate.
Any questions about my setup, feel free to comment... I will try to respond ASAP.
Happy WAMPing! :)

Viewing all articles
Browse latest Browse all 3177

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>