PHPackages                             yangkai/server-code-version - 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. yangkai/server-code-version

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

yangkai/server-code-version
===========================

project block test

v1.1(6y ago)05PHPPHP ^7.0.12

Since Dec 23Pushed 6y ago1 watchersCompare

[ Source](https://github.com/yangkaihello/server-code-version)[ Packagist](https://packagist.org/packages/yangkai/server-code-version)[ RSS](/packages/yangkai-server-code-version/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

\##版本区分插件是利用nginx服务来映射项目方便快捷替换项目版本测试

\###1.nginx的配置

```

server {

        listen 80;
        server_name  localhost;
        index index.php index.html;
        #设置你的项目名称
        set $project "version";

        #HTTP版本配置
        if ( $http_server_code_version = "" ) {
                set $http_server_code_version "master";
        }

        location /server-version {
                try_files $uri $uri/ /index.php;
        }

        #设置项目目录
        set $rootPath "/www/project/${project}/${http_server_code_version}";

        #php配置
        location ~ \.php$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            #SERVER_CODE_VERSION 是php用来区分你的版本号的必须配置
            fastcgi_param  SERVER_CODE_VERSION $http_server_code_version;
            include        fastcgi_params;
        }

        root $rootPath;

        #之后的配置根据项目自定义
        location / {
                  # Redirect everything that isn't a real file to index.php
                try_files $uri $uri/ /index.php?$args;
        }

    }

```

\###2.使用方式

- 在http header 头部中设置 server-code-version 来控制版本（默认是master版本）
- 通过在你的 [http://域名/server-version](http://%E5%9F%9F%E5%90%8D/server-version) 来设定你需要的版本这个方式是此控件主要操作方式

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

2

Last Release

2335d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a0280e655218366674ba9a6854747e3d448a8cfc702f896b09c8839726c61caf?d=identicon)[yangkaihello](/maintainers/yangkaihello)

---

Tags

codeserverversionyangkai

### Embed Badge

![Health badge](/badges/yangkai-server-code-version/health.svg)

```
[![Health](https://phpackages.com/badges/yangkai-server-code-version/health.svg)](https://phpackages.com/packages/yangkai-server-code-version)
```

###  Alternatives

[spatie/laravel-webhook-server

Send webhooks in Laravel apps

1.1k8.8M22](/packages/spatie-laravel-webhook-server)[felixfbecker/language-server

PHP Implementation of the Visual Studio Code Language Server Protocol

1.2k95.4k](/packages/felixfbecker-language-server)[pragmarx/health

Laravel Server &amp; App Health Monitor and Notifier

2.0k1.0M2](/packages/pragmarx-health)[felixfbecker/language-server-protocol

PHP classes for the Language Server Protocol

22476.7M6](/packages/felixfbecker-language-server-protocol)[clue/socket-raw

Simple and lightweight OOP wrapper for PHP's low-level sockets extension (ext-sockets).

35111.1M48](/packages/clue-socket-raw)[voryx/thruway

Thruway WAMP router core

6771.0M17](/packages/voryx-thruway)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
