Comments (8)
Thanks for this detailed issue.
Can you also show me the php script (aka front controller if you're using a framework) which serves any url like /_spx ?
from php-spx.
So far I've not needed any web server other than the built-in one from php for my projects. The web server does not serve any content at this point in time. I've been trying to profile a Laravel artisan task, trying to find bottlenecks.
My nginx config reflects that. Everything is passed through to php-fpm. The /srv
folder just contains a phpinfo() file to check if everything was being loaded.
server {
listen 80 default_server;
root /srv;
location / {
include "fastcgi.conf";
fastcgi_pass 127.0.0.1:9000;
}
}
from php-spx.
To have SPX web ui working you need to have a php script called on any unexisting URL (like a framework front controllers) including those starting with /_spx. See try_files for nginx.
from php-spx.
I tried to configure it with nginx and laravel I get the same error: here is the error:
| 172.19.0.1 - - [30/May/2018:16:49:08 +0000] "GET /_spx/?SPX_KEY=dev HTTP/1.1" 500 1470 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36"
And my config
server {
listen 80;
listen [::]:80;
server_name spx.local;
root /srv/site/public;
index index.php index.html;
location @handler {
rewrite / /index.php;
}
location ~* _spx {
try_files $uri $uri/ @handler;
}
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_pass ppm:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
from php-spx.
@aftabnaveed you do not need a dedicated vhost. Can you show me your application vhost config ? The only required thing is PHP being triggered on /_spx* request URIs, as long as _spx
is the configured prefix (which is the case by default).
from php-spx.
This is my vhost which points to a Laravel Application:
server {
listen 80;
listen [::]:80;
server_name spx.local;
root /srv/site/public;
index index.php index.html;
location @handler {
rewrite / /index.php;
}
location ~* _spx {
try_files $uri $uri/ @handler;
}
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_pass ppm:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
And my spx.ini
extension=spx.so
spx.http_enabled=1
spx.http_key="dev"
spx.http_ip_whitelist="172.19.0.1,10.0.75.1"
I tried both IPs separately but still it won't work.
SPX from my php.ini
SPX Support | enabled
-- | --
SPX Version | 0.2.4
SPX Support | enabled
-- | --
SPX Version | 0.2.4
from php-spx.
OK it finally worked for my by fixing the location for _spx in my vhost. Here is the version which worked
server {
listen 80;
listen [::]:80;
server_name spx.local;
root /srv/laraveltest/public;
index index.php index.html;
location @handler {
rewrite / /index.php;
}
location ~ /_spx {
try_files $uri $uri/ @handler;
}
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_pass ppm:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Now its time to play with it.
from php-spx.
@aftabnaveed thanks for your feedback.
from php-spx.
Related Issues (20)
- Do not enable SPX when JIT is enabled HOT 3
- Core dumped when executing with long arguments HOT 5
- Link to code.jquery.com HOT 2
- UI / Report: highlight a partircular (or pattern) function call count as a dynamic metric
- Feature request: visualize static and instance methods differently
- Feature Request: SQL Query time HOT 1
- Accessibility issue. Light mode needed as not everyone can see the dark contrast. HOT 2
- PHP 5.4 support HOT 1
- Web UI not loading HOT 1
- Support for PHP 8.3
- Potential misinformation about leak HOT 3
- No UI on site hosted behind Reverse Proxy HOT 3
- ESM modules resolution error HOT 1
- File not found. HOT 1
- Install fails in MacOS Ventura HOT 4
- SPX does not intercept when using built-in server HOT 1
- configure error on macOS : cannot find zlib HOT 3
- spx.so: undefined symbol: gc_globals HOT 4
- perf_events HOT 7
- installation documentation not super clear HOT 1
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 php-spx.