Implementing HTTPS over a LAN with Wamp
Hi everyone
I've been struggling to implement HTTPS in Wamp-powered websites over a LAN (Local Area Network)
The requirement is the following
Computer1 hosts one or several Wamp-powered websites
<www_root>\path1a\
<www_root>\path1b\
...
accessible through
https: //computer1-name/path1a/
https: //computer1-name/path1b/
...
Computer2 hosts one or several Wamp-powered websites
<www_root>\path2a\
<www_root>\path2b\
...
accessible through
https: //computer2-name/path1a/
https: //computer2-name/path1b/
...
etc.
Please note that I've inserted an extra non-breaking space before each // to make URLs readable on this page.
Also note that paths *may* be the same, eg. path1a=path2a, allowing to test the same site under different settings, eg.
https: //computer1-name/path/
https: //computer2-name/path/
Problems to solve
How to let one computer see another computer's sites, without using IPs (which are subject to change as we all know)?
How to get this working through HTTPS and without permanent "security warnings" from Edge/Chrome/Firefox/Safari/... ?
I came up with a complete, working solution that I wish to share.
For illustration purpose, I also detailed the related configuration of WordPress, easily adaptable to any CMS (Drupal, Joomla,...).
Enjoy
NL
WAMPSERVER INSTALLATION DETAILS
Windows 11 Home 25H2 up-to-date
Wampserver 3.4.0
Installation directory: D:\wamp
WWW root directory: D:\wamp\www
Apache 2.4.65, meaning that the Apache directory is
D:\wamp\bin\apache\apache2.4.65\bin
Adapt the following to your needs if different.
WORDPRESS INSTALLATION DETAILS (for illustration purpose)
WP 6.9.1 FR+EN
WP root directory: D:\wamp\www\wordpress, meaning that WP sites are located at
D:\wamp\www\wordpress\wp-site-1
D:\wamp\www\wordpress\wp-site-2
...
MAIN IDEA
Because of the LAN sticky access requirement, neither IPs (not sticky) nor localhost (not networkable) can be used.
The built-in Wamp HTTPS specific settings cannot be used either.
Trying to do so just destroyed the installation (parse errors, conf errors, etc.).
And unfortunately the destroyed installation(s) could not be recovered, neither by reinstalling (rejected by the installer because of an existing installation!) nor by the tools provided on the Wampserver official site.
A working solution obtains by making a fresh new installation and complying with the following rules:
1. Do not use the Wampserver Tray icon for *setting* anything, only use it as checking interface
2. Always edit configuration files yourself and run commands yourself from an admin CMD or PS prompt
3. Most important: let the entire HTTPS configuration be stored in a conf file that is understood by Apache but ignored by Wamp (!)
SSL VIRTUAL HOSTS SETUP
Hereafter "wamp-computer" refers to any of the above computers running Wampserver, with Windows name "wamp-computer-name" and IP "wamp-computer-ip"
Repeat all steps below for each computer running Wampserver
During the following steps ensure that
1. Wampserver is NOT running
2. the Windows account that you use has Administrator privileges, in order to be able to run anything "as administrator"
Windows reminder for newbies

"run as administrator" is an execution context that is granted to accounts which have Administrator privileges.
Thereby it is *not* a change of user!
Of course, the built-in Administrator account has Administrator privileges, hence can run anything "as administrator"
If an account has no Administrator privileges and tries to run something "as administrator", it will be prompted to enter the credentials of an account which does.
SSL/HTTPS reminder for newbies

SSL (Secured Socket Layer) is a certificate-based network protocol ensuring encryption of transmitted data
Technically, the standard TCP port (Transmission Control Protocol) for SSL is 143.
HTTP (HyperText Transfer Protocol) aka "the web" is ensuring transmission of data in plain text, suitable for direct display by a web browser
Technically, the standard TCP port (Transmission Control Protocol) for HTTP is 80.
HTTPS is simply HTTP with SSL as the transmitter, ie. it is an "encrypted web protocol"
You do not need to master these concepts (I don't), just to know their names and what they do.
The following steps allow to implement HTTPS in two different but compatible configurations
1. Implement a master SSL virtual host
https: //wamp-computer-name/
yielding (almost) the same output
http: //localhost/
as a default Wamp installation, but *only* when opened from the wamp-computer itself.
Here the Apache DocumentRoot (on the wamp-computer) is
d:/wamp/www
2. Implement a specific SSL virtual host
https: //myvirtualhost/
yielding (almost) the same output
http: //myvirtualhost/
as a default Wamp installation, but *only* when opened from the wamp-computer itself.
Here the Apache DocumentRoot (on the wamp-computer) is
d:/wamp/www/myvirtualhost
It is perfectly possible to implement only *one* of these configurations.
However the choice has been made to implement configuration 1, with an option to implement configuration 2 additionaly.
PLEASE NOTE THAT THE STEP ORDER IS CRITICAL!
[STEP 1a] ON THE WAMP-COMPUTER
Edit (as administrator)
C:\Windows\System32\drivers\etc\hosts
as follows
#WAMP
127.0.0.1 localhost
::1 localhost
#Irrespective of the creation of a master SSL virtual host
127.0.0.1 wamp-computer-name
::1 wamp-computer-name
#For each specific SSL virtual host (if any)
127.0.0.1 myvirtualhost
::1 myvirtualhost
#For each other computer on the LAN
other-computer-ip other-computer-name
[STEP 1b] ON EACH OTHER COMPUTER ON THE LAN
Edit (as administrator)
C:\Windows\System32\drivers\etc\hosts
as follows
#WAMP
127.0.0.1 localhost
::1 localhost
#For the wamp-computer, irrespective of the creation of a master SSL virtual host
wamp-computer-ip wamp-computer-name
[STEP 2] ON THE WAMP-COMPUTER
Edit (as administrator)
D:\wamp\wampmanager.conf
and ensure that
NotVerifyHosts = "on"
This is mandatory to prevent Wampserver from overriding "C:\Windows\System32\drivers\etc\hosts"
Also, a recommended cosmetic choice is to let
LinksOnProjectsHomePage = "on"
in order to be able to click on projects on Wampserver Homepage.
Regarding HTTPS, it is also recomended to let
httpsReady = "on"
UseWampHttps = "on"
AllowLocalhostHttps = "off"
to align the present manual settings with the Wampserver Tray display.
But beware: do NOT configure any HTTPS setting from the Wampserver Tray (sorry about that).
[STEP 3] ON THE WAMP-COMPUTER
From Windows search bar type
Windows Defender Firewall with Advanced Security (in English)
Pare-Feu Windows Defender avec fonctions avancées de sécurité (in French)
and click
"Execute as administrator" (in English)
"Exécuter en tant qu'administrateur" (in French)
Then, in the Firewall console
Click "Inbound Rules"
Click "New Rule..."
Select Port "TCP"
In "Specific local ports," enter "443"
Select "Allow the connection"
Ensure that ONLY "Private" and "Public/Domain" are checked
Click "Finish"
This will allow other computers from the LAN to see
https: //wamp-computer-name
and websites under it, eg. the WordPress sites described above, because HTTPS operates on port 443.
[STEP 4] ON THE WAMP-COMPUTER: FOR THE MASTER SSL VIRTUAL HOST AND FOR EACH SPECIFIC SSL VIRTUAL HOST (IF ANY)
Open an admin CMD prompt on
D:\wamp\bin\apache\apache2.4.65\bin
and execute
openssl req -x509 -newkey rsa:2048 -keyout ../conf/key/wamp-computer-name.key -out ../conf/key/wamp-computer-name.crt -days 3650 -nodes -subj "/CN=wamp-computer-name" -addext "subjectAltName=DNS:wamp-computer-name,DNS:localhost,IP:127.0.0.1" -config ../conf/openssl.cnf
This lets OpenSSL (always installed by default with Apache) create the essential Windows certificates for handling SSL.
REMARK. The certificate lifespan lies in the "-days 3650" switch, standing for 10 years. Other possibilities are
"-days 365" (1 year) to stay on the safe side
"-days 825" (roughly 2.2 years) because some browsers would throw a "Security Warning" beyond this threshold
For a specific SSL virtual host replace "wamp-computer-name" by "myvirtualhost" in the above.
[STEP 5] ON THE WAMP-COMPUTER
Edit (as administrator)
D:\wamp\bin\apache\apache2.4.65\conf\httpd.conf
as follows
# SSL Virtual hosts (ignored by Wamp)
Include conf/extra/httpd-vhosts-ssl.conf
#Turn standard SSL port 443 into a configuration variable
Define SSLPORT443 443
#Enforce listening to reconfigured SSL port
Listen 0.0.0.0:${SSLPORT443}
Listen [::0]:${SSLPORT443}
=> this *points* to the conf file that is "understood by Apache but ignored by Wamp"

[STEP 6] ON THE WAMP-COMPUTER: FOR EACH SPECIFIC VIRTUAL HOST (IF ANY)
Edit (as administrator)
D:\wamp\bin\apache\apache2.4.65\conf\extra\httpd-vhosts.conf
as follows
<VirtualHost *:80>
ServerName virtualhost
DocumentRoot "d:/wamp/www/myvirtualhost"
<Directory "d:/wamp/www/myvirtualhost/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
This is actually the standard setting for a specific non-SSL virtual host
[STEP 7a] ON THE WAMP-COMPUTER: FOR THE MASTER SSL VIRTUAL HOST
Edit (as administrator)
D:\wamp\bin\apache\apache2.4.65\conf\extra\httpd-vhosts-ssl.conf
as follows
<VirtualHost *:${SSLPORT443}>
ServerName wamp-computer-name
# Master Root of all projects
DocumentRoot "D:/wamp/www"
<Directory "D:/wamp/www/">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
# Master Root certificate
SSLEngine on
SSLCertificateFile "D:/wamp/bin/apache/apache2.4.65/conf/key/wamp-computer-name.crt"
SSLCertificateKeyFile "D:/wamp/bin/apache/apache2.4.65/conf/key/wamp-computer-name.key"
</VirtualHost>
=> this *is* the conf file that is "understood by Apache but ignored by Wamp"

[STEP 7b] ON THE WAMP-COMPUTER: FOR EACH SPECIFIC SSL VIRTUAL HOST (IF ANY)
Edit (as administrator)
D:\wamp\bin\apache\apache2.4.65\conf\extra\httpd-vhosts-ssl.conf
as follows
<VirtualHost *:${SSLPORT443}>
ServerName myvirtualhost
# Root of specific SSL virtual host
DocumentRoot "d:/wamp/www/myvirtualhost"
<Directory "d:/wamp/www/myvirtualhost/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
# Certificate of specific SSL virtual host
SSLEngine on
SSLCertificateFile "d:/wamp/bin/apache/apache2.4.65/conf/key/myvirtualhost.crt"
SSLCertificateKeyFile "d:/wamp/bin/apache/apache2.4.65/conf/key/myvirtualhost.key"
</VirtualHost>
[STEP 8a] ON THE WAMP-COMPUTER: FOR THE MASTER SSL VIRTUAL HOST AND FOR EACH SPECIFIC SSL VIRTUAL HOST (IF ANY)
Browse to
D:\wamp\bin\apache\apache2.4.65\conf\key
then double-click
wamp-computer-name.crt
and store it for
Local Computer
in location
Trusted Root Certification Authorities
For a specific SSL virtual host replace "wamp-computer-name" by "myvirtualhost" in the above.
[STEP 8b] ON EACH OTHER COMPUTER ON THE LAN: FOR THE MASTER SSL VIRTUAL HOST AND FOR EACH SPECIFIC SSL VIRTUAL HOST (IF ANY)
Make sure "D:\" has been shared as data_d on wamp-computer
Browse to
\\wamp-computer-name\data_d\wamp\bin\apache\apache2.4.65\conf\key
then double-click
wamp-computer-name.crt
and store it for
Local Computer
in location
Trusted Root Certification Authorities
For a specific SSL virtual host replace "wamp-computer-name" by "myvirtualhost" in the above (except in the network path of course)
[STEP 9a] ON THE WAMP-COMPUTER: FOR THE MASTER SSL VIRTUAL HOST AND FOR EACH SPECIFIC SSL VIRTUAL HOST (IF ANY)
In Firefox, open the Certificate Manager
Settings > Privacy & Security > View Certificates
Ensure that the "Authorities" column is selected
Click the "Import.." button and browse to
D:\wamp\bin\apache\apache2.4.65\conf\key\wamp-computer-name.crt
In the "Downloading certificate" dialog, select both options
Trust this CA for identity websites
Trust this CA for identity email users
then click OK once to close the Downloading certificate" dialog, and once again to close the "Certificate Manager" dialog
For a specific SSL virtual host replace "wamp-computer-name" by "myvirtualhost" in the above
[STEP 9b] ON EACH OTHER COMPUTER ON THE LAN: FOR THE MASTER SSL VIRTUAL HOST AND FOR EACH SPECIFIC SSL VIRTUAL HOST (IF ANY)
In Firefox, open the Certificate Manager
Settings > Privacy & Security > View Certificates
Ensure that the "Authorities" column is selected
Click the "Import.." button and browse to
\\wamp-computer-name\data_d\wamp\bin\apache\apache2.4.65\conf\key\wamp-computer-name.crt
In the "Downloading certificate" dialog, select both options
Trust this CA for identity websites
Trust this CA for identity email users
then click OK once to close the Downloading certificate" dialog, and once again to close the "Certificate Manager" dialog
For a specific SSL virtual host replace "wamp-computer-name" by "myvirtualhost" in the above (except in the network path of course)
[STEP 10] ON THE WAMP-COMPUTER AND ON EACH OTHER COMPUTER ON THE LAN
In Firefox, open the Password Manager and add/update HTTPS credentials for the master SSL virtual host and/or each specific SSL virtual host, eg.
Website address : https: //wamp-computer-name
Username : (the http username)
Password : (the http password)
For each existing WordPress project, check that
Settings > General point > WordPress Address (URL)
Settings > General point > Site Address (URL)
point to an HTTPS address
[STEP 11] ON THE WAMP-COMPUTER
Irrespective of the creation of a master SSL virtual host and specific SSL virtual hosts (in any), check that for each existing WordPress project
D:\wamp\www\wordpress\myproject\.htaccess
comprises
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /wordpress/myproject/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/myproject/index.php [L]
</IfModule>
# END WordPress
[STEP 12a] ON THE WAMP-COMPUTER - OPTIONAL CHECKS
Cleanup possible previous certificate
Local Machine certificates
Win + R > certlm.msc
Current User certificates
Win + R > certmgr.msc
Open an admin CMD prompt on
D:\wamp\bin\apache\apache2.4.65\bin
and ensure no ghost references to previous SSL Virtual Hosts remain by executing
httpd -t
Open an admin CMD prompt anywhere and test a single file without the GUI (but with the full Apache power) by executing
php -S localhost:8000
[STEP 12b] ON EACH OTHER COMPUTER ON THE LAN - OPTIONAL CHECKS
Open an admin CMD prompt anywhere and run successively
ping wamp-computer-ip
tracert wamp-computer-ip
ping wamp-computer-name
tracert wamp-computer-name
Open an admin PowerShell prompt anywhere and run successively
Test-NetConnection wamp-computer-ip -Port 443
netstat -ano | findstr :443
All these commands should return a no-error response
Else review carefully the setup step sequence!
[STEP 13] ON THE WAMP-COMPUTER
The above HTTPS configuration can now be addressed from any browser!
To allow to address it from the Wampserver Homepage too, here is a fix.
It is purely cosmetic indeed, replacing "localhost" under HTTP by the relevant computer-name under HTTPS
// WARNING [for the Wampserver Forum only]. Remove the non-breaking spaces have been inserted before each // to make URLs readable on this page
Edit (as administrator)
D:\wamp\www\index.php
by replacing
if(count($list_projects) > 0) {
if($wampConf['LinksOnProjectsHomePage'] == 'on') {
$projectContents .= "<li class='projectsdir'>http: //localhost/project/</li>\n";
}
foreach($list_projects as $file) {
$projectContents .= ($wampConf['LinksOnProjectsHomePage'] == 'on') ? "<li><a href='http: //localhost/".$file."/'>".$file."</a></li>" : '<li>'.$file.'</li>';
$nbProjects++;
$nbProjectsLines++;
}
if($wampConf['LinksOnProjectsHomeByIp'] == 'on') {
$projectContents = str_replace('localhost',$c_local_ip,$projectContents);
}
}
if(empty($projectContents))
$projectContents = "<li class='projectsdir'>".$langues['txtNoProjet']."</li>\n";
else {
if($wampConf['LinksOnProjectsHomePage'] == 'off') {
$projectContents .= "<li class='projectsdir'>".sprintf($langues['txtProjects'].'.<br>'.$langues['txtProjectsLink'],$wwwDir)."</li>";
if(strpos($projectContents,"http: //localhost/"

!== false) {
$projectContents .= "<li><i style='color:blue;'>Warning:</i> See below</li>";
if(!isset($error_content))
$error_content = '';
$error_content .= "<p style='color:blue;'>".sprintf($langues['nolocalhost'],$wampConf['apacheVersion'])."</p>";
}
}
}
by
// Override for SSL and Master Hostname
// WARNING. Only select HTTPS if a master SSL Virtual Host is up and running
// $localhost = "http: //localhost/";
$localhost = "https: //wamp-computer-name/";
if(count($list_projects) > 0) {
if($wampConf['LinksOnProjectsHomePage'] == 'on') {
// $projectContents .= "<li class='projectsdir'>http: //localhost/project/</li>\n";
$projectContents .= "<li class='projectsdir'>".$localhost."project/</li>\n";
}
foreach($list_projects as $file) {
// $projectContents .= ($wampConf['LinksOnProjectsHomePage'] == 'on') ? "<li><a href='http: //localhost/".$file."/'>".$file."</a></li>" : '<li>'.$file.'</li>';
$projectContents .= ($wampConf['LinksOnProjectsHomePage'] == 'on') ? "<li><a href='".$localhost.$file."/'>".$file."</a></li>" : '<li>'.$file.'</li>';
$nbProjects++;
$nbProjectsLines++;
}
if($wampConf['LinksOnProjectsHomeByIp'] == 'on') {
$projectContents = str_replace('localhost',$c_local_ip,$projectContents);
}
}
if(empty($projectContents))
$projectContents = "<li class='projectsdir'>".$langues['txtNoProjet']."</li>\n";
else {
if($wampConf['LinksOnProjectsHomePage'] == 'off') {
$projectContents .= "<li class='projectsdir'>".sprintf($langues['txtProjects'].'.<br>'.$langues['txtProjectsLink'],$wwwDir)."</li>";
// if(strpos($projectContents,"http: //localhost/"

!== false) {
if(strpos($projectContents,$localhost) !== false) {
$projectContents .= "<li><i style='color:blue;'>Warning:</i> See below</li>";
if(!isset($error_content))
$error_content = '';
$error_content .= "<p style='color:blue;'>".sprintf($langues['nolocalhost'],$wampConf['apacheVersion'])."</p>";
}
}
}
If for any reason you need to switch back to the default Wampserver Homepage display, simply toggle
$localhost = "http: //localhost/";
// $localhost = "https: //wamp-computer-name/";
[FINAL STEP]
Lauch Wamp and enjoy!
BEWARE. When opening an HTTPS link as designed above, you could be prompted ONCE to accept a "Security Risk".
Just go for it, and you will not be nagged anymore.
Edited 27 time(s). Last edit at 03/01/2026 02:59PM by newlog.