PHPackages                             berkan/server - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. berkan/server

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

berkan/server
=============

Berkan - PHP development environment for macOS (Apache &amp; Nginx)

v1.0.4(4mo ago)216MITPHPPHP ^8.1

Since Feb 18Pushed 2mo agoCompare

[ Source](https://github.com/berkanakman/berkanServer)[ Packagist](https://packagist.org/packages/berkan/server)[ Docs](https://github.com/berkanakman/berkanServer)[ RSS](/packages/berkan-server/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (7)Versions (6)Used By (0)

 **BERKAN**
 PHP Development Environment for macOS
 *macOS için PHP Geliştirme Ortamı*

 [![PHP 5.6-8.4](https://camo.githubusercontent.com/8a8625b1dbd6e4026133f2cb02c33a89eecdacf5060753e1fbf144fd5fe6de0e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d352e362d2d382e342d3838393242463f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/8a8625b1dbd6e4026133f2cb02c33a89eecdacf5060753e1fbf144fd5fe6de0e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d352e362d2d382e342d3838393242463f7374796c653d666c61742d737175617265) [![macOS](https://camo.githubusercontent.com/eedec52e63eb3c336e91bfdef01c092f85937187aa984f9e36508dfc7ccb495c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d61634f532d4170706c6525323053696c69636f6e253230253236253230496e74656c2d3030303030303f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/eedec52e63eb3c336e91bfdef01c092f85937187aa984f9e36508dfc7ccb495c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d61634f532d4170706c6525323053696c69636f6e253230253236253230496e74656c2d3030303030303f7374796c653d666c61742d737175617265) [![Apache | Nginx](https://camo.githubusercontent.com/36c4753a0eae5933b2e2c85448cb6e3aa2dd135e94992da62b342b8de4633872/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5765622532305365727665722d4170616368652532302537432532304e67696e782d4432323132383f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/36c4753a0eae5933b2e2c85448cb6e3aa2dd135e94992da62b342b8de4633872/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5765622532305365727665722d4170616368652532302537432532304e67696e782d4432323132383f7374796c653d666c61742d737175617265) [![Databases](https://camo.githubusercontent.com/976189062acf497ab4512f8e8111f3605d0c8b64dc83330c0ea4c3ee74293af2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f44617461626173652d4d7953514c253230253743253230506f737467726553514c2532302537432532304d6f6e676f444225323025374325323052656469732d3333363739313f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/976189062acf497ab4512f8e8111f3605d0c8b64dc83330c0ea4c3ee74293af2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f44617461626173652d4d7953514c253230253743253230506f737467726553514c2532302537432532304d6f6e676f444225323025374325323052656469732d3333363739313f7374796c653d666c61742d737175617265) [![MIT License](https://camo.githubusercontent.com/152aa2a37725b9fd554b28ff24d270f6071c67927a63e6d635a55c8e188e20c7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e3f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/152aa2a37725b9fd554b28ff24d270f6071c67927a63e6d635a55c8e188e20c7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e3f7374796c653d666c61742d737175617265) [![Version 1.0.0](https://camo.githubusercontent.com/d7c09099b54e2bf0dab4a25e6b908a3d8be51cf8e2990b17645f781109ebbf23/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f56657273696f6e2d312e302e302d626c75653f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/d7c09099b54e2bf0dab4a25e6b908a3d8be51cf8e2990b17645f781109ebbf23/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f56657273696f6e2d312e302e302d626c75653f7374796c653d666c61742d737175617265)

---

Table of Contents / İçindekiler
===============================

[](#table-of-contents--i̇çindekiler)

- [English](#english)
    - [What is Berkan?](#what-is-berkan)
    - [Features](#features)
    - [Requirements](#requirements)
    - [Installation](#installation)
    - [Quick Start](#quick-start)
    - [Commands Reference](#commands-reference)
    - [Serving Sites](#serving-sites)
    - [HTTPS / SSL](#https--ssl)
    - [PHP Version Management](#php-version-management)
    - [Database Management](#database-management)
    - [Web Server Selection](#web-server-selection)
    - [Site Proxying](#site-proxying)
    - [Sharing Sites](#sharing-sites)
    - [Custom Drivers](#custom-drivers)
    - [Supported Frameworks](#supported-frameworks)
    - [Configuration](#configuration)
    - [Error Display Control](#error-display-control)
    - [Short Open Tag](#short-open-tag)
    - [Logs &amp; Diagnostics](#logs--diagnostics)
    - [Architecture](#architecture)
    - [Troubleshooting](#troubleshooting)
    - [Uninstalling](#uninstalling)
- [Türkçe](#t%C3%BCrk%C3%A7e)
    - [Berkan Nedir?](#berkan-nedir)
    - [Özellikler](#%C3%B6zellikler)
    - [Gereksinimler](#gereksinimler)
    - [Kurulum](#kurulum)
    - [Hızlı Başlangıç](#h%C4%B1zl%C4%B1-ba%C5%9Flang%C4%B1%C3%A7)
    - [Komut Referansı](#komut-referans%C4%B1)
    - [Site Sunma](#site-sunma)
    - [HTTPS / SSL Desteği](#https--ssl-deste%C4%9Fi)
    - [PHP Versiyon Yönetimi](#php-versiyon-y%C3%B6netimi)
    - [Veritabanı Yönetimi](#veritaban%C4%B1-y%C3%B6netimi)
    - [Web Sunucu Seçimi](#web-sunucu-se%C3%A7imi)
    - [Site Proxy](#site-proxy)
    - [Site Paylaşımı](#site-payla%C5%9F%C4%B1m%C4%B1)
    - [Özel Driver Yazma](#%C3%B6zel-driver-yazma)
    - [Desteklenen Framework'ler](#desteklenen-frameworkler)
    - [Konfigürasyon](#konfig%C3%BCrasyon)
    - [Hata Görüntüleme Kontrolü](#hata-g%C3%B6r%C3%BCnt%C3%BCleme-kontrol%C3%BC)
    - [Short Open Tag](#short-open-tag-1)
    - [Log ve Tanı](#log-ve-tan%C4%B1)
    - [Mimari](#mimari)
    - [Sorun Giderme](#sorun-giderme)
    - [Kaldırma](#kald%C4%B1rma)

---

English
=======

[](#english)

What is Berkan?
---------------

[](#what-is-berkan)

**Berkan** is a lightweight macOS PHP development environment that supports both **Apache (httpd)** and **Nginx** as web servers. Choose your preferred web server during installation, switch between them at any time, and manage PHP versions and databases from a single CLI.

Berkan configures your Mac to always run your chosen web server, PHP-FPM, and DnsMasq in the background when your machine starts. Then, using DnsMasq, Berkan proxies all requests on the `.test` TLD to point to sites installed on your local machine.

In other words, a blazing fast macOS PHP development environment that uses roughly **7 MB of RAM**. Berkan isn't a complete replacement for Vagrant or Docker, but it's a great alternative if you want a flexible, speed-focused baseline.

Features
--------

[](#features)

### Web Server (Apache or Nginx)

[](#web-server-apache-or-nginx)

Berkan lets you choose between **Apache** and **Nginx** during installation, and switch at any time with `berkan server:switch`.

**Apache (httpd):**

- Native **`.htaccess` support** - your rewrite rules work exactly as they do on production
- **`mod_rewrite`** for URL routing and pretty URLs
- **`mod_ssl`** for TLS/HTTPS with self-signed trusted certificates
- **`mod_proxy` + `mod_proxy_fcgi`** for connecting Apache to PHP-FPM via Unix socket
- **`mod_proxy_http`** for reverse-proxying to other local services
- **`mod_headers`**, **`mod_deflate`**, **`mod_vhost_alias`**, **`mod_http2`**
- Automatic `apachectl configtest` validation before every restart

**Nginx:**

- High-performance event-driven architecture
- **`fastcgi_pass`** for connecting Nginx to PHP-FPM via Unix socket
- **SSL/TLS** with HTTP/2 support
- **Reverse proxy** with WebSocket support
- **Gzip compression** out of the box
- Automatic `nginx -t` validation before every restart

### Site Serving

[](#site-serving)

- **Zero-configuration** - park a directory and every subfolder is instantly a `.test` site
- **Interactive park** - `berkan park` scans projects, detects frameworks, and lets you assign PHP versions per project
- **Park** entire directories: `~/Sites/blog` becomes `http://blog.test`
- **Link** individual projects from anywhere on disk with custom names
- **Automatic framework detection** via the driver system (25+ built-in drivers)
- Custom **404 page** for sites that can't be found
- Configurable **directory listing** (on/off)

### HTTPS / SSL

[](#https--ssl)

- **One-command HTTPS**: `berkan secure myapp` generates a trusted TLS certificate
- **2048-bit RSA** private keys with **SAN (Subject Alternative Name)**
- Certificates are **automatically trusted** in the macOS System Keychain
- **HTTP-to-HTTPS redirect** is configured automatically
- **HTTP/2** enabled on all secured sites
- **HSTS header** added by default for secure sites
- Unsecure a site back to HTTP with a single command

### PHP Management

[](#php-management)

- **Full PHP version range**: PHP 5.6, 7.0–7.4, 8.0–8.4 supported via `shivammathur/php` tap
- **Global PHP version switching** between any installed PHP version
- **Install/remove PHP versions** at any time with `berkan php:install` / `berkan php:remove`
- **List installed PHP versions** with `berkan php:list`
- **Per-site PHP isolation** - different sites can run different PHP versions simultaneously
- **Per-project PHP selection via `berkan park`** - interactive project scanning with automatic framework detection and PHP version assignment
- **Isolated PHP-FPM pools** - each isolated version gets its own socket (`berkan-7.4.sock`, `berkan-8.1.sock`, etc.)
- **Automatic framework detection** during park: Laravel, Symfony, WordPress, Drupal, Magento 2, Craft CMS, Joomla, Composer projects, Plain PHP
- `berkan php` - run PHP CLI using Berkan's managed version
- `berkan composer` - run Composer with the correct PHP binary
- Automatic **PHP-FPM pool configuration** with Unix socket (`berkan.sock`)
- Memory limit, upload size, and execution time tuned for development (512 MB, no timeout)

### Error Display Control

[](#error-display-control)

- **Toggle PHP error display** with `berkan error hide` / `berkan error show`
- Uses PHP-FPM `auto_prepend_file` for reliable per-request error control
- Works consistently across all sites, including those with `.htaccess` rewrites and PHP version isolation
- Settings persist in `config.json` and take effect immediately without restart

### Short Open Tag

[](#short-open-tag)

- **Toggle PHP `short_open_tag`** with `berkan shorttag on` / `berkan shorttag off`
- Enables or disables the `
