WCMP (Windows Caddy MariaDB PHP)1
tool for setting up a caddy-server with PHP and MariaDB support
WCMP is still in active developement
Please note, that WCMP was designed for development purposes. You could try to use it in production.
If you find any bugs or have any suggestions, please open an issue at issues.
After some research, I realized that there was no way to set up a caddy server with PHP support without much effort. That's why I created this repository. Later MariaDB-server support was integrated too.
flowchart LR
User-- HTTP/HTTPS -->Caddy
Caddy-- "php_fastcgi" -->PHP-CGI
PHP-CGI-- Result -->Caddy
PHP-CGI<-.->MariaDB[("\nMariaDB-Server\n(SQL-Server)")]
The script is pretty advanced and tries to do everything automatically. If it fails at any point, it will tell you what happened.
WCMP comes with default configuration files for all components. You can change them later if you want.
- Start PowerShell as Administrator
- Run the following command:
& $([ScriptBlock]::Create((Invoke-WebRequest -UseBasicParsing -Uri "https://raw.githubusercontent.com/Hope-IT-Works/WCMP/main/src/Invoke-WCMPSetup.ps1").Content)) -Path "C:\ProgramData\WCMP"
The script
- always checks for the latest versions of all components during installation.
- will suggest available PHP versions and lets you choose.
By default, WCMP installs Windows Services which start automatically.
You can start the services manually with the following commands:
cd caddy
.\caddy.exe run --watch
.\mariadb\bin\mysqld.exe
.\php\php-cgi.exe -b 127.0.0.1:9000
Service | Documentation | Ports |
---|---|---|
Caddy | Link | 80 →HTTP443 →HTTPS2019 →Config-API |
MariaDB | Link | 3306 →SQL |
PHP | Link | 9000 →PHP-CGI (common gateway interface) |
Is it portable?
By default, WCMP installs Windows Services that are non-portable. Skip the service installation with ```-SkipWinSW``` , if you want an portable installation. The services used by WCMP are configured to work portable. Move your installation where you want.
Why MariaDB?
MariaDB is a open-source fork of MySQL. MariaDB provides better performance and more features than MySQL.
More Information on this topic
Footnotes
-
e.g. LAMP (Linux Apache MySQL PHP) ↩