virtual hosts by port 443
Posted by: LivingThis (---.cm-6-4a.dynamic.ziggo.nl)
Date: December 15, 2018 12:13PM

1 windows 10 64 bit
2 wamp3.1.6 64 bit
3 apache 2.4.27
4 php 7.1.9
5 mysql 5.7.19
5a mariadb 10.2.8
Icon is ORANGE



127.0.0.1 *.wamphelpers.dev
::1 *.wamphelpers.dev

127.0.0.1 *.wamphelpers.localhost
::1 *.wamphelpers.localhost

locahost is NOT achievable
I have NO access to PHPMyAdmin
I use KASPERSKY TOTAL SECURITY as antivir
A:\wamp64\ is my wamp location

....................................................

State of services:

The service 'wampapache64' is NOT started
EXIT error code:1066
Help message for error code 1066 is:

httpd conf syntax is ok

The port number you give: 443

is not valid or is not allowed.

……………….

Microsoft Windows [Version 10.0.17134.471]
(c) 2018 Microsoft Corporation. Alle rechten voorbehouden.

C:\WINDOWS\system32>netstat -anob | findstr : 443
FINDSTR: Cannot open 443

C:\WINDOWS\system32>netstat -anob | findstr :443
TCP 192.168.178.24:49701 40.67.254.97:443 ESTABLISHED 3952
TCP 192.168.178.24:49761 172.227.166.118:443 ESTABLISHED 2584
TCP 192.168.178.24:49771 23.208.77.128:443 CLOSE_WAIT 2584
TCP 192.168.178.24:50809 52.212.25.186:443 TIME_WAIT 0
TCP 192.168.178.24:50810 195.122.177.144:443 TIME_WAIT 0
TCP 192.168.178.24:50811 77.74.177.176:443 TIME_WAIT 0
TCP 192.168.178.24:50812 35.186.224.53:443 TIME_WAIT 0
TCP 192.168.178.24:50813 216.58.211.98:443 TIME_WAIT 0
TCP 192.168.178.24:50814 172.217.17.33:443 TIME_WAIT 0
TCP 192.168.178.24:50815 81.19.104.45:443 TIME_WAIT 0
TCP 192.168.178.24:50816 172.217.17.35:443 TIME_WAIT 0
TCP 192.168.178.24:50817 195.122.177.144:443 TIME_WAIT 0
TCP 192.168.178.24:50818 195.122.177.144:443 TIME_WAIT 0
TCP 192.168.178.24:50819 81.19.104.111:443 ESTABLISHED 3804
TCP 192.168.178.24:50820 13.107.21.200:443 ESTABLISHED 3628
TCP 192.168.178.24:50821 204.79.197.222:443 ESTABLISHED 3628
TCP 192.168.178.24:50823 152.199.19.161:443 ESTABLISHED 3628
TCP 192.168.178.24:50825 13.107.6.254:443 ESTABLISHED 3628
TCP 192.168.178.24:50827 13.107.136.254:443 ESTABLISHED 3628
TCP 192.168.178.24:50828 81.19.104.111:443 ESTABLISHED 3804
TCP 192.168.178.24:50829 77.74.177.176:443 ESTABLISHED 3804

C:\WINDOWS\system32>tasklist /fi "pid eq 3952"

Image Name PID Session Name Session# Mem Usage
========================= ======== ================ =========== ============
svchost.exe 3952 Services 0 18.324 K

C:\WINDOWS\system32>tasklist /fi "pid eq 2584"

Image Name PID Session Name Session# Mem Usage
========================= ======== ================ =========== ============
WinStore.App.exe 2584 Console 1 8.692 K

C:\WINDOWS\system32>tasklist /fi "pid eq 3804"

Image Name PID Session Name Session# Mem Usage
========================= ======== ================ =========== ============
avp.exe 3804 Services 0 135.356 K

C:\WINDOWS\system32>tasklist /fi "pid eq 3628"

Image Name PID Session Name Session# Mem Usage
========================= ======== ================ =========== ============
SearchUI.exe 3628 Console 1 63.568 K

C:\WINDOWS\system32>

………………….

I have NOT found a port directive with 443 in httpd.conf
Neither I have vhosts configured with 443, so all ports there are 80.
First question should this be changed if I want to use SSL for my virtual hosts?

……………………………………

Options: ReplyQuote
Re: virtual hosts by port 443
Posted by: Otomatic (Moderator)
Date: December 15, 2018 02:34PM

Hi,

> First question should this be changed if I want to use SSL for my virtual hosts?
Before you want to use SSL and port 443 you need ALL to work correctly without SSL and on port 80, which is not the case.
Start by fixing everything that is wrong so that it works with port 80, i. e. in classic http.
Already there is no localhost in the hosts file, then, are you sure that wildcards (*) are not only allowed, but also taken into account in the hosts file?

In addition, a priori, you have already defined a port 443 somewhere. Delete this definition.
Make EVERYTHING work correctly in http port 80 and then we'll see.
It is necessary that ALL VirtualHost, even those you would like in SSL https, even localhost, work correctly in httpd port 80 before you want to consider switching to https.

And I'm not sure Apache 2.4.27 supports all of that. We should see to it that it is updated.

You want to go far too fast.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons



Edited 1 time(s). Last edit at 12/15/2018 03:41PM by Otomatic.

Options: ReplyQuote
Re: virtual hosts by port 443
Posted by: LivingThis (---.cm-6-4a.dynamic.ziggo.nl)
Date: December 15, 2018 04:13PM

Would you recommend to recover all settings back to port 80 and actually restore the configuration files to the settings before the ones I followed in this tutorial:
[forum.wampserver.com]

Options: ReplyQuote
Re: virtual hosts by port 443
Posted by: Otomatic (Moderator)
Date: December 15, 2018 04:45PM

Hi,

I thought I had been clear; a priori not. Did I misspoke? Did I explain it wrong?

All (*) must be functional in http port 80 before adding SSL.
(*) Everything means - I repeat - all VirtualHost.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: virtual hosts by port 443
Posted by: Otomatic (Moderator)
Date: December 15, 2018 05:09PM

Hi,

As I already explained in your previous thread, all my VirtualHost are declared and functional in http port 80 and I added almost the same VirtualHost definitions but with port 443 in wamp\bin\apache2.4.37\conf\extra\httpd-ssl.conf
VirtualHost in wamp\bin\apache\apache2.4.37\conf\extra\httpd-vhosts.conf
<VirtualHost *:80>
   ServerName aviatechno
   DocumentRoot "G:/www/aviatechno"
   ServerAdmin webmaster@ottello.net
  <Directory "G:/www/aviatechno/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride all
    <RequireAny>
      Require local
      Require ip 192.168.0
    </RequireAny>
  </Directory>
</VirtualHost>
Same VirtualHost in wamp\bin\apache2.4.37\conf\extra\httpd-ssl.conf (Deleted comment lines)
# This is the Apache server configuration file providing SSL support.
Listen 0.0.0.0:443
Listen [::0]:443

SSLCipherSuite HIGH:!RSA:!RC4:!3DES:!DES:!IDEA:!MD5:!aNULL:!eNULL:!EXP
SSLHonorCipherOrder on
SSLCompression      off
SSLSessionTickets   on
SSLProtocol all -SSLv2 -TLSv1 -TLSv1.1 -SSLv3
SSLPassPhraseDialog  builtin
SSLSessionCache        "shmcb:${INSTALL_DIR}/logs/ssl_scache(512000)"
SSLSessionCacheTimeout  300

##
## SSL Virtual Host Context
##

<VirtualHost *:443>
	ServerName aviatechno
  DocumentRoot "G:/www/aviatechno"
  ServerAdmin webmaster@aviatechno.net
	ErrorLog "${INSTALL_DIR}/logs/error.log"
	TransferLog "${INSTALL_DIR}/logs/access.log"
	SSLEngine on
	SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
	SSLCertificateFile      "${SRVROOT}/conf/Certs/Site/aviatechno.crt"
	SSLCertificateKeyFile   "${SRVROOT}/conf/Certs/Site/aviatechno.key"
#
	SSLVerifyClient none
	SSLVerifyDepth  10

	<Directory "G:/www/aviatechno/">
		Options +Indexes +Includes +FollowSymLinks +MultiViews
		AllowOverride all
		Require local
	</Directory>
	<FilesMatch "\.(cgi|shtml|phtml|php)$">
		SSLOptions +StdEnvVars
	</FilesMatch>

	BrowserMatch "MSIE [2-5]" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
	CustomLog "${INSTALL_DIR}/logs/custom.log" "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: virtual hosts by port 443
Posted by: LivingThis (---.cm-6-4a.dynamic.ziggo.nl)
Date: December 16, 2018 11:19AM

This is my httpd-ssl.conf


location: A:\wamp64\bin\apache\apache2.4.27\conf\extra\httpd-ssl.conf

 
Listen 0.0.0.0:443
Listen [::0]:443
 
SSLCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES
SSLProxyCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES

 
SSLHonorCipherOrder on 

 
SSLProtocol all -SSLv3
SSLProxyProtocol all -SSLv3

 
SSLPassPhraseDialog  builtin

 

SSLSessionCache		   "shmcb:a:/wamp64/logs/ssl_scache(512000)" 	
SSLSessionCacheTimeout  300

 

<VirtualHost *:443>

 
DocumentRoot "a:/wamp64/www/wamphelpers"
ServerName wamphelpers.localhost:443
ServerAdmin admin@example.com
ErrorLog "a:/wamp64/logs/ssl_error.log"
TransferLog "a:/wamp64/logs/ssl_access.log"
TransferLog "a:/wamp64/logs/ssl_access.log"

 
SSLEngine on

 
SSLCertificateFile "a:/wamp64/bin/apache/apache2.4.27/conf/ssl.crt/server.crt"
 
 
SSLCertificateKeyFile "a:/wamp64/bin/apache/apache2.4.27/conf/ssl.key/server.key"
 
   
<FilesMatch "\.(cgi|shtml|phtml|php)$">
    SSLOptions +StdEnvVars
</FilesMatch>

<Directory "a:/wamp64/www/wamphelpers">
    SSLOptions +StdEnvVars
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1 localhost ::1
  
</Directory>

 

 
BrowserMatch "MSIE [2-5]" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0

 

   CustomLog "a:/wamp64/logs/ssl_request.log" \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
   
</VirtualHost>



Edited 2 time(s). Last edit at 12/16/2018 02:28PM by LivingThis.

Options: ReplyQuote
Re: virtual hosts by port 443
Posted by: LivingThis (---.cm-6-4a.dynamic.ziggo.nl)
Date: December 16, 2018 11:28AM

This is my httpd-vhosts file


A:\wamp64\bin\apache\apache2.4.27\conf\extra\httpd-vhosts.conf




# Virtual Hosts
#
<VirtualHost *:80>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    Require local
  </Directory>
</VirtualHost>


 
 

 <VirtualHost *:80>
	ServerName wamphelpers.localhost
	ServerAlias *.wamphelpers.localhost
	#DocumentRoot "a:/wamp64/www/wamphelpers"
	#<Directory  "a:/wamp64/www/wamphelpers/">
	
	  DocumentRoot "${INSTALL_DIR}/www/wamphelpers"
  <Directory "${INSTALL_DIR}/www/wamphelpers/">
	
		Options +Indexes +Includes +FollowSymLinks +MultiViews
		AllowOverride All
		Require local
	</Directory>
</VirtualHost>
 
<VirtualHost *:80>
	ServerName wamphelpers.dev
	ServerAlias *.wamphelpers.dev
	#DocumentRoot "a:/wamp64/www/wamphelpers"
	#<Directory   "a:/wamp64/www/wamphelpers/">
	
	  DocumentRoot "${INSTALL_DIR}/www/wamphelpers"
  <Directory "${INSTALL_DIR}/www/wamphelpers/">
	
		Options +Indexes +Includes +FollowSymLinks +MultiViews
		AllowOverride All
		Require local
	</Directory>
</VirtualHost>

Options: ReplyQuote
Re: virtual hosts by port 443
Posted by: Otomatic (Moderator)
Date: December 16, 2018 01:47PM

Hi,

You should think about facilitating the work of those who would like to check your files by avoiding putting dozens and dozens of lines of comments that only confuse the reading.

What the hell is this? We work with Apache 2.4! not 2.2
> Order Deny,Allow
> Deny from all
> Allow from 127.0.0.1 localhost ::1

Should be Require local

I have not yet translated and verified my procedure to generate self-signed certificate and keys for local sites

Do all your VirtualHost:
localhost
wamphelpers.localhost
wamphelpers.dev

are well accessed without problem using http port 80 protocol, for example :

'http://wamphelpers.localhost/' or 'http://wamphelpers.dev/'

I think you will have problems with the tld .dev that has been taken over by Chrome. You should choose another tld as .local

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons



Edited 1 time(s). Last edit at 12/16/2018 02:02PM by Otomatic.

Options: ReplyQuote
Re: virtual hosts by port 443
Posted by: LivingThis (---.cm-6-4a.dynamic.ziggo.nl)
Date: December 16, 2018 03:13PM

Otomatic Wrote:
-------------------------------------------------------

>
> Do all your VirtualHost:
> localhost
> wamphelpers.localhost
> wamphelpers.dev
>
> are well accessed without problem using http port
> 80 protocol, for example :
>
> 'http://wamphelpers.localhost/' or
> 'http://wamphelpers.dev/'
>
> I think you will have problems with the tld .dev
> that has been taken over by Chrome. You should
> choose another tld as .local

Yes I want to change that. Because in Chrome I can not use *.dev anymore. Firefox does not give me any access at all to the virt hosts since they have a https prefix. (but this was before I had these errors, because now I do not have access to apache) .

my virt host config (from the tools option menu)

 VirtualHost configuration:

	Default server: localhost
	Default server: wamphelpers.localhost
Virtual Host: localhost
 
Virtual Host: wamphelpers.localhost
On port 443 Virtual Host: wamphelpers.localhost
On port 443 Virtual Host: wamphelpers.localhost



Edited 1 time(s). Last edit at 12/16/2018 03:28PM by LivingThis.

Options: ReplyQuote
Re: virtual hosts by port 443
Posted by: Otomatic (Moderator)
Date: December 16, 2018 03:37PM

Hi,

> Firefox does not give me any access at all to the virt hosts since they have a https prefix.
We are not there yet. For the moment, it is imperative, before considering adding SSL https, that all VirtualHost work correctly in httpd port 80. This implies that you have not changed anything at all for SSL port 443 at this time.
- No loadind of
#LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
#LoadModule ssl_module modules/mod_ssl.so
- No include of
#Include conf/extra/httpd-ssl.conf

You didn't notice it, but read the comments in the wamp\bin\apache\apache\apache2.4.37\conf\extra\httpd-ssl.conf
# When we also provide SSL we have to listen to the
# standard HTTP port (see above) and to the HTTPS port

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: virtual hosts by port 443
Posted by: Otomatic (Moderator)
Date: December 16, 2018 05:48PM

Hi,

It is stated in my procedure (not yet published) that:
-- Modification of file j:\wamp\bin\apache\apache2.4.37\conf\httpd.conf
Replace
# Secure (SSL/TLS) connections
#Include conf/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
#       starting without SSL on platforms with no /dev/random equivalent
#       but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
by
# Secure (SSL/TLS) connections
# Note: The following must must be present to support
#       starting without SSL on platforms with no /dev/random equivalent
#       but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
Include conf/extra/httpd-ssl.conf
</IfModule>
In this way, the conf/extra/httpd-ssl.conf file will only be loaded if the module ssl_module is enabled.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: virtual hosts by port 443
Posted by: Otomatic (Moderator)
Date: December 16, 2018 06:33PM

Hi,

> Firefox does not give me any access at all to the virt hosts since they have a https prefix.
You must validate an exception for this local site. Firefox allows you to do this; the local site will then run in https, of course without the green padlock, but locally, it is absolutely not a problem.

Sorry, my Firefox is in French


---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: virtual hosts by port 443
Posted by: LivingThis (---.cm-6-4a.dynamic.ziggo.nl)
Date: December 18, 2018 04:06PM

Okay really thank you. I have WAMP running again

Options: ReplyQuote


Sorry, only registered users may post in this forum.