WCMP (Windows+ Caddy2+ PHP+ MySQL) ALL-in-1 Portable Package

I made this GUI tool for lazy forks. (I am not sure I should post it in this production category?)

image

“ALL-in-One” 1-click windows webserver using Caddy2+php+MySQL (like XAMPP or WAMP) for quick test site development (or for production if you like, there are no artificial performance limits). Open-source.

Unzip and it is ready in 5 seconds. Fully portable. Take the server + websites anywhere you go.

(It also makes the server-moving / full-site-backup much easier, simply copy/paste/move this folder to somewhere else, run again and everything will follow)

Simply run WCMP.exe And you now have a webserver+php+database environment for your quick web application development. (full function wordpress tested)

(Including Caddy2 v2.0.0, PHP v7.4.6, MariaDB v10.4, PHPMyAdmin v5.0.2; They all can be replaced to whatever version you want)

Notes:

  1. All the included programs are the latest x64 version binaries (May 2020) fetched from the official site, all original. All credit and copyright go to their amazing developers. And I don’t reserve any rights to this little tool.

  2. All The configurations are mostly “factory default” with little performance modification, good enough for personal blogs and medium-size projects.

    • Caddyfile link to php port 9000 (default, you can not change) for php fastcgi;
    • php.ini link to mysql port 3306(default, you can change). Some PHP extensions enabled for wordpress to run;
    • Everything is using “relative path”, so the whole package is portable;
    • Database username root, empty password (mariadb default), change it as you like;
    • The phpmyadmin is the default site01. You can use it to create new databases, change root password etc., at your first visit to http://127.0.0.1
  3. If you replace the programs inside the sub-folders to other versions (eg. php5 replace php7, MySQL replace MariaDB) they should work fine (keep eyes on the config files if you don’t know their change history)

  4. This tool is just a basic windows GUI app. Run it with task-scheduler as a background service if you like, then it becomes a service starter/watch-dog.

Download the tool and the source code here: https://kknbb.com/stories/wcmp-windowscaddy2phpmysql-all-in-1-portable-package/

3 Likes

Very cool!

(I moved this to the Showcase category.)

Thanks for making that and sharing it with us!

Hey dear @matt, since you are here, can I ask you something?

I don’t need to hold any rights from this little GUI tool, but the zip file does include binaries from Caddy, PHP, Mariadb, PHPmyAdmin.

Is it legal to do so? Is there any copyright or license I must announce or anything?

Dunno about the others, but Caddy uses the Apache 2.0 license, which makes it free and open source software: caddy/LICENSE at master · caddyserver/caddy · GitHub

So you’re good to distribute Caddy. The Apache 2.0 license requires that you include the license when distributing it, so just add a copy of the license file I just linked.

1 Like

Yep, *and state all changes.

1 Like

Yep. understand. Adding license and things. It should be fine. :laughing:

Hi there! Great little tool but I’m not able to start the server. PHP and MySQL are starting, while Caddy is red and there is nothing loading with localhost in the browser. Tried to change few mail addresses and domain names and still no luck. At some point Windows Firewall asked me to grant permission for the server to access an external resource for installing the certificate. Most probably it’s something I don’t do right but I can’t figure out what.

In the log I keep getting the following every 10 seconds:

2020-08-11 04:34:47 : {“level”:“info”,“ts”:1597109676.7874355,“msg”:“using adjacent Caddyfile”}
{“level”:“warn”,“ts”:1597109676.7894366,“logger”:“admin”,“msg”:“admin endpoint disabled”}
{“level”:“info”,“ts”:1597109676.7894366,“logger”:“http”,“msg”:“server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server”,“server_name”:“srv0”,“http_port”:80}
{“level”:“info”,“ts”:1597109676.7904353,“logger”:“tls”,“msg”:“cleaned up storage units”}
2020/08/11 04:34:36 [INFO][cache:0xc0005c03c0] Started certificate maintenance routine
run: loading initial config: loading new config: http app module: start: tcp: listening on :80: listen tcp :80: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
2020-08-11 04:34:47 : Restarting Caddy

Would you mind to test this, using the “default caddy settings” within this tool (after you unzip this little tool, run it without changing anything), is caddy run green or red?

If it runs GREEN after unzip, there must be something wrong with your own caddyfile configurations. I am not a caddy developer I don’t read caddy error log too well. You may want to post the error msg to other sections of the forum. Or you can paste your caddyfile here I can take a look if any mistake is in there.

If it runs RED right after unzip, it can be something occupying your :80 port, or your AV/Network firewall blocked caddy core functions.

This could happen if you still have Apache running (with XAMPP for example?) and already being bound to port 80.

I didn’t remember IIS was activated some time ago so after deactivation now WCMP works!
Thank you very much for help!

1 Like

I have UniServer and was considering it causing me troubles, but it turned out to be IIS. Thank you, it works now!

This topic was automatically closed after 90 days. New replies are no longer allowed.

Is this project still live, I’m unable to find working links to the project.