Comments (6)
Looks like you are using a Front Controller (index.php).
Here are some examples:
https://github.com/TechEmpower/FrameworkBenchmarks/tree/master/frameworks/PHP/php-ngx/deploy
There a lot of ways to do it.
I'll create an example for a Front Controller (when I have free time)
from ngx-php.
It is a Front Controller that is used to take any "route" and redirect it to index.php, and currently I don't know how to do it.
For example, how concatenate index.php with its optionnal GET arguments?
I know the repository you sent me, but this is perfect example of non applicable because all routes is hard coded.
from ngx-php.
@roukmoute It's route anything.
server {
listen 80;
server_name localhost;
access_log logs/cp-stats-web.access.log ;
root /home/mbxps/mbxps/develop/quanzhao/production/cp-stats-web/public;
index index.php index.html index.htm;
location = /favicon.ico {
}
location ~ ^/(echarts|antv|jquery|jqueryui|d3|nvd3|semantic|bootstrap|static)/ {
}
location ~ /clf {
proxy_pass http://10.16.172.70:8888;
}
location ~ ^(.*)$ {
content_by_php '
global $START_TIME;
$START_TIME = microtime(true);
if (!defined("APPLICATION_PATH")){
define("APPLICATION_PATH", "/home/mbxps/mbxps/develop/quanzhao/production/cp-stats-web");
}
require_once(APPLICATION_PATH."/vendor/autoload.php");
require_once(APPLICATION_PATH."/framework/Dispatch.php");
$application = new Dispatch();
$application->run();
';
}
}
from ngx-php.
Also I'm finishing and adapter for Ngx-php to use any php app, without touch 1 line of code.
I made it first for Workerman https://github.com/joanhey/AdapterMan
from ngx-php.
@rryqszq4 My email, I want to contact you.
[email protected]
from ngx-php.
@rryqszq4 My email, I want to contact you. [email protected]
@joanhey My email is [email protected]
from ngx-php.
Related Issues (20)
- ngx_var_get causes nginx to core dump
- [enhancement] Add a timer event
- Simple Demo, Microblog using NGX-PHP (PHP8) and Docker HOT 2
- ngx-php dockerfile need upgrade HOT 4
- rocky linux 8 + php 8.0 + nginx 1.23.1 HOT 4
- Fail with PHP 8.2 HOT 3
- [Question] Ngx-php internally use forks or threads ? HOT 3
- 一些指令怎么使用呢?没有说明啊
- Async Mysql fail only in this repo :/
- Fix var_dump in tests
- [question] What is the difference with or without _block HOT 1
- Create new release HOT 2
- [question] Can we use ngx_socket_connect() to an upstream? HOT 3
- is this support AWS Linux 2 and PHP 8.2.X
- Ngx-php added as supported SAPI in PHP8.3 HOT 5
- Error inlcude file (cannot declare class) HOT 3
- ngx_var_get nginx Signal 11 HOT 4
- Request body > 10kb not response HOT 5
- Fail async MySQL with MySQL v8.4 LTS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-php.