| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Based on NGINX Unit 1.26.
On Debian or Ubuntu, install the build dependencies:
sudo apt update
sudo apt install -y build-essential curl php-dev libphp-embedBuild and install into the current directory:
./configure --prefix="$PWD" --user="$(id -un)" --group="$(id -gn)"
./configure php
make -j"$(nproc)"
make installCreate a PHP application:
mkdir -p app
cat > app/index.php <<'PHP'
<?php
echo "Hello from MOLRA\n";
PHPStart the server:
./sbin/unitdCreate and apply the configuration:
cat > config.json <<JSON
{
"listeners": {
"*:8080": {
"pass": "applications/php"
}
},
"applications": {
"php": {
"type": "php",
"root": "$PWD/app",
"index": "index.php"
}
}
}
JSON
curl -X PUT --data-binary @config.json \
--unix-socket "$PWD/control.unit.sock" \
http://localhost/configcurl http://127.0.0.1:8080/| Back | FazBrowse Home | New Git URL |