2020.03.30
#localhost name resolution is handled within DNS itself.
128.127.0.0.1 localhost dev1 https://www.expressvpn.com/
::1 localhost dev1 https://www.expressvpn.com/
Listen 8083
ServerName localhost:8083
...
<Directory "J:/awww/www/">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
Now in J:\xampp\xampp-control.exe :
http://localhost:8083/ shows :
Apache Friends Applications FAQs HOW-TO Guides PHPInfo phpMyAdmin
dev1:8083/phpmyadmin/ shows Server: 127.0.0.1 Database :
in http://dev1:8083/phpmyadmin/import.php
To see http://dev1:8083/fwphp/www/ (dev1 is apache virtual host) :
First VirtualHost section is default or fallback virtual host,
used f or all requests that do not match ServerName or ServerAlias
in any \
<VirtualHost *:8083>
DocumentRoot "/xampp/htdocs/"
ServerName localhost
</VirtualHost>
#### sets up a virtual host named dev1
<VirtualHost *:8083>
DocumentRoot "J:/awww/www/"
ServerName dev1
</VirtualHost>
Self signed certificate comes with xampp :
SSLCertificateFile "conf/ssl.crt/server.crt"
SSLCertificateKeyFile "conf/ssl.key/server.key"
To see https://dev1/fwphp/www/ (dev1 is apache virtual host) :
4. J:\xampp\apache\conf\extra\httpd-ssl.conf
<VirtualHost _default_:443>
DocumentRoot "J:/awww/www"
ServerName dev1:443
ServerAdmin slavkoss22@gmail.com
ErrorLog "J:/xampp/apache/logs/error.log"
TransferLog "J:/xampp/apache/logs/access.log"
SSLEngine on
SSLCertificateFile "conf/ssl.crt/server.crt"
SSLCertificateKeyFile "conf/ssl.key/server.key"
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "J:/xampp/apache/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-5]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
CustomLog "J:/xampp/apache/logs/ssl_request.log" \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
<VirtualHost _default_:443>
# General setup for the virtual host
DocumentRoot "J:/xampp/htdocs"
#ServerName www.example.com:443
ServerName localhost:443
#ServerAdmin admin@example.com
ServerAdmin slavkoss22@gmail.com
ErrorLog "J:/xampp/apache/logs/error.log"
TransferLog "J:/xampp/apache/logs/access.log"
# SSL Engine Switch:
# Enable/Disable SSL for this virtual host.
SSLEngine on
SSLCertificateFile "conf/ssl.crt/server.crt"
SSLCertificateKeyFile "conf/ssl.key/server.key"
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "J:/xampp/apache/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-5]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
CustomLog "J:/xampp/apache/logs/ssl_request.log" \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
To see http://dev1:8083/fwphp/www/ :