## XAMPP instalac on Windows 10 64 bit
2021.10.30 PHP 8.0.12 xampp-portable-windows-x64-8.0.12-0-VS16.7z 89.12 MB, 2020.03.30 PHP 7.4.3
https://www.apachefriends.org/faq_windows.html
or http://localhost:8083/dashboard/faq.html
http://localhost:8083/dashboard/howto.html
http://localhost:8083/
http://dev1:8083/
SyMenu -> xampp-control.exe called as admin -> click button "Shell" to open Win CLI
J:\xampp>php -v
PHP 8.0.12 (cli) (built: Oct 19 2021 11:21:05) ( ZTS Visual C++ 2019 x64 )
Copyright (c) The PHP Group
Zend Engine v4.0.12, Copyright (c) Zend Technologies
J:\xampp>composer selfupdate
Upgrading to version 2.1.10 (stable channel).
Use composer self-update --rollback to return to version 2.0.8
J:\xampp>composer -v
Composer version 2.1.10 2021-10-29 22:34:57
### 1. C:\Windows\System32\drivers\etc\hosts
\#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/
```
### 2. J:\xampp\apache\conf\httpd.conf
Listen 8083
ServerName localhost:8083
...
#### To see http://dev1:8083/fwphp/www/ (dev1 is apache virtual host) :
```xml
<Directory "J:/awww/www/">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
```
Now in J:\xampp\xampp-control.exe :
1. buttons "Config", "Editor" and "Service and port settings" Apache port 8083
2. buttons "Start mysql" and "Start Apache"
http://localhost:8083/ shows :
Apache Friends Applications FAQs HOW-TO Guides PHPInfo phpMyAdmin
### 3. J:\xampp\phpMyAdmin\config.inc.php
change line to be $cfg['Servers'][$i]['host'] = 'localhost'; (not 127.0.0.1 !)
buttons "Stop mysql" then "Start mysql"
http://localhost:8083/phpmyadmin/ shows Server: localhost
Databases :
1. information_schema
2. mysql
3. performance_schema
4. phpmyadmin
5. test
#### my db-s imported
Click "Import" link in top toolbar
1. J:\\awww\\www\\01_DDL_mysql_blog.sql
To see http://dev1:8083/fwphp/www/ (dev1 is apache virtual host) :
### 4. J:\xampp\apache\conf\extra\httpd-vhosts.conf :
First VirtualHost section is default or fallback virtual host,
used f or all requests that do not match **ServerName or ServerAlias**
in any \<VirtualHost> block.
```xml
<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) :**
**5. J:\xampp\apache\conf\extra\httpd-ssl.conf**
#### SSL Virtual Host Content
```xml
<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>
```
## 6. Developing dev1 web site is virtual host, port 8083, dir J:/awww/www
I put all my php coding in J:/awww/www, ehich is on Github. In J:\xampp\htdocs are some extern (big) applications for testing.
|