Skip to content

tool for setting up a caddy-server with PHP and MariaDB support

License

Notifications You must be signed in to change notification settings

Hope-IT-Works/WCMP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

WCMP

WCMP (Windows Caddy MariaDB PHP)1

tool for setting up a caddy-server with PHP and MariaDB support

Warning

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.

About

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)")]
Loading

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.

How to install

  1. Start PowerShell as Administrator
  2. 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.

How to run

By default, WCMP installs Windows Services which start automatically.

You can start the services manually with the following commands:

Caddy Server

cd caddy
.\caddy.exe run --watch

MariaDB Server

.\mariadb\bin\mysqld.exe

PHP-CGI Server

.\php\php-cgi.exe -b 127.0.0.1:9000

Documentation

Service Documentation Ports
Caddy Link 80→HTTP
443→HTTPS
2019→Config-API
MariaDB Link 3306→SQL
PHP Link 9000→PHP-CGI (common gateway interface)

FAQ

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

  1. e.g. LAMP (Linux Apache MySQL PHP)

About

tool for setting up a caddy-server with PHP and MariaDB support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published