FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

freeunitdev/molra: hongzhidao fork original Nginx Unit · GitHub

Latest commit

 

History

2,228 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MOLRA

Based on NGINX Unit 1.26.

Build

On Debian or Ubuntu, install the build dependencies:

sudo apt update
sudo apt install -y build-essential curl php-dev libphp-embed

Build and install into the current directory:

./configure --prefix="$PWD" --user="$(id -un)" --group="$(id -gn)"
./configure php
make -j"$(nproc)"
make install

Configure PHP

Create a PHP application:

mkdir -p app
cat > app/index.php <<'PHP'
<?php
echo "Hello from MOLRA\n";
PHP

Start the server:

./sbin/unitd

Create 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/config

Access

curl http://127.0.0.1:8080/

About

hongzhidao fork original Nginx Unit

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages


Back | FazBrowse Home | New Git URL