Reverse proxy for PHP built-in server which supports multiprocessing and TLS/SSL encryption
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 13 commits ahead of mpyw:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
socket
src
tests
.gitignore
.scrutinizer.yml
.travis.yml
LICENSE
README.md
Runner.php
certificate.pem
codeception.yml
composer.json
hyper-run

README.md

iumio Framework Internal Server (FIS)

@ Let's create more simply

Description

Reverse proxy for PHP built-in server which supports multiprocessing and TLS/SSL encryption adapted for iumio Framework

Installing

Global install

composer global require iumio/framework-internal-server:^2.0

If not yet, you must add ~/.composer/vendor/bin to $PATH.
Append the following statement to ~/.bashrc, ~/.zshrc or what not.

export PATH="$HOME/.composer/vendor/bin:$PATH"

Local install only for development environment

composer require --dev iumio/framework-internal-server:^2.0

Use vendor/bin/hyper-run as the execution path.

Usage

iumio-user@localhost:~$ hyper-run -h

Usage:
    hyper-run <options>

Example:
    hyper-run -S localhost:8080 -s localhost:8081

[Required]
    -S   "<Host>:<Port>" of an HTTP server. Multiple arguments can be accepted.
    -s   "<Host>:<Port>" of an HTTPS server. Multiple arguments can be accepted.

[Optional]
    -n   The number of PHP built-in server clusters, from 1 to 20. Default is 10.
    -t   Path for the document root. Default is the current directory.
    -r   Path for the router script. Default is empty.
    -c   Path for the PEM-encoded certificate.
         Default is "/Users/iumio-user/.composer/vendor/iumio/framework-internal-server/certificate.pem".

Restrictions:
    - The option -s is only supported on PHP 5.6.0 or later.
    - Access logs will not be displayed on Windows.

mpyw@localhost:~$

Example

hyper-run -S localhost:8080 -s localhost:8081 -t src/app/www

It listens on

  • http://localhost:8080
  • https://localhost:8081

using the directory src/app/www as the document root.

Note for Windows users

Unfortunately, cmd.exe has no option to run via shebang #!/usr/bin/env php, so you need to create the following batch file in the proper directory.

For Standalone PHP

@echo OFF
"C:\php\php.exe" "%HOMEPATH%\.composer\vendor\iumio/framework-internal-server\hyper-run" %*

For XAMPP

@echo OFF
"C:\xampp\php\php.exe" "%HOMEPATH%\.composer\vendor\iumio/framework-internal-server\hyper-run" %*

Used with iumio Framework Console Manager

iumio-user@localhost:~$ php bin/manager server:start
  • Warning : iumio Framework is not compatible with https protocol with php built-in server.

Documentation

Contributing

Framework Internal Server is forked from mpyw/php-hyper-builtin-server to make it compatible with iumio Framework.

iumio Framework is an Open Source with MIT Licence. We need any help to continue the framework development and create a new community.

About Us

iumio Framework is an iumio component, created by RAFINA Dany and co-founded by HURON Kevin