2017 © Pedro Peláez
 

project php-hyper-builtin-server

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

image

mpyw/php-hyper-builtin-server

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

  • Sunday, December 24, 2017
  • by mpyw
  • Repository
  • 4 Watchers
  • 55 Stars
  • 648 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 4 Versions
  • 5 % Grown

The README.md

PHP Hyper Built-in Server Build Status Scrutinizer Code Quality

Reverse proxy for PHP built-in server which supports multiprocessing and TLS/SSL encryption., (*1)

Installing

Global install

```shell script composer global require mpyw/php-hyper-builtin-server:^3.0, (*2)


If not yet, you must add **`~/.composer/vendor/bin`** to `$PATH`. Append the following statement to `~/.bashrc`, `~/.zshrc` or what not. ```bash export PATH="$HOME/.composer/vendor/bin:$PATH"

Local install only for development environment

```shell script composer require --dev mpyw/php-hyper-builtin-server:^3.0, (*3)


Use **`vendor/bin/hyper-run`** as the execution path. ## Usage ### Quick start ```shell script hyper-run -S localhost -s localhost -t src/app/www

2 servers will start with the directory src/app/www as the document root:, (*4)

  • http://localhost:8000
  • https://localhost:44300

Servers start with first unoccupied port within range depending on a scheme., (*5)

Scheme Default Range
HTTP 8000 8000-8099
HTTPS 44300 44300-44399

Customize ports

```shell script hyper-run -S localhost:8080 -s localhost:4000 -t src/app/www, (*6)


2 servers will start with the directory `src/app/www` as the document root: - `http://localhost:8080` - `https://localhost:4000` ### Command Reference ```ShellSession mpyw@localhost:~$ hyper-run -h Usage: hyper-run <options> Example: hyper-run -S localhost:8000 -s localhost:44300 [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/mpyw/.composer/vendor/mpyw/php-hyper-builtin-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:~$

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., (*7)

For Standalone PHP

@echo OFF
"C:\php\php.exe" "%HOMEPATH%\.composer\vendor\mpyw\php-hyper-builtin-server\hyper-run" %*

For XAMPP

@echo OFF
"C:\xampp\php\php.exe" "%HOMEPATH%\.composer\vendor\mpyw\php-hyper-builtin-server\hyper-run" %*

License

  • PHP Hyper Built-in Server is open-sourced software licensed under the MIT license by @mpyw.

The Versions

24/12 2017

dev-master

9999999-dev

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

  Sources   Download

MIT

The Requires

 

The Development Requires

server proxy ssl tls multiprocess built-in reverse multiprocessing builtin

02/09 2016

v2.0.5

2.0.5.0

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

  Sources   Download

MIT

The Requires

 

server proxy ssl tls multiprocess built-in reverse multiprocessing builtin

16/08 2016

v1.x-dev

1.9999999.9999999.9999999-dev

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

  Sources   Download

MIT

The Requires

 

server proxy ssl tls multiprocess built-in reverse multiprocessing builtin

16/08 2016

v1.0.2

1.0.2.0

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

  Sources   Download

MIT

The Requires

 

server proxy ssl tls multiprocess built-in reverse multiprocessing builtin