• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » PHP-FPM Status Page for Nginx (Ubuntu, Rackspace Cloud)

By Abhishek Ghosh September 29, 2014 9:12 am Updated on September 29, 2014

PHP-FPM Status Page for Nginx (Ubuntu, Rackspace Cloud)

Advertisement

Here is how you can enable PHP-FPM Status Page for Nginx using Ubuntu as OS on Rackspace Cloud Server. It can throw error with improper setup. Indeed, this status page is quite important but has some security vulnerabilities as it might be checked by the Public using simple GET request. Hence, we suggest the readers to follow the method on dev setup first.

 

PHP-FPM Status Page for Nginx on Ubuntu, Rackspace Cloud Server

 

We assume that you are using a multi-server setup with PVHVM servers with at least 2 virtual cores. As a rule of thumb, you should not use this server as both forward proxy and reverse proxy. You should follow the guides like using a separate database / application server to have a scalable, redundant system first. You might need to manually compile Nginx with HttpStubStatusModule if it is not latest Ubuntu or sources.list is custom set, else you might not have the function ready to be enabled.

PHP-FPM Status Page for Nginx Ubuntu, Rackspace Cloud

 

PHP-FPM Status Page for Nginx on Ubuntu, Rackspace Cloud Server : Steps

 

The sample config page should be located at :

Advertisement

---

Vim
1
2
3
4
http://example.com/status
# or
http://example.com/status.html
# see http://nginx.com/products/live-activity-monitoring/

If you request /status (or whichever URI matches the location group), then NGINX Plus will respond with a JSON document containing the current activity data.

Run this command to check :

Vim
1
nginx -V | grep --color -o http_stub_status

There will be output like :

Vim
1
2
3
4
nginx version: nginx/1.4.6 (Ubuntu)
built by gcc 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_spdy_module --with-http_sub_module --with-http_xslt_module --with-mail --with-mail_ssl_module

Open /etc/php5/fpm/pool.d/www.conf to edit :

Vim
1
2
3
4
5
6
nano /etc/php5/fpm/pool.d/www.conf
# this
# ;pm.status_path = /status
# change to
# pm.status_path = /status
# write out (^ + O) and exit (^ + X); SHIFT + 6 = ^ on Mac keyboard

Search pm.status_path after evoking the search function in Nano with ^ + W. Normally, it is commented. Next, pm.status_path = /status path can be changed and commented out. Next you should edit nginx.conf file (usually located at etc/nginx/nginx.conf, if you can not find use locate nginx.conf command) and do these changes :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
location ~ ^/(status|ping)$ {
     access_log off;
     allow 127.0.0.1;
     allow A.B.C.D #Public IP is A.B.C.D;
     deny all;
     include fastcgi_params;
     fastcgi_pass 127.0.0.1:9000;
# enable the lines below one by one by uncommenting only
# if you are not getting the thing rightly
     #error_page 404 /error/404.php;
     #fastcgi_pass unix:/tmp/php5-fpm.sock;
}

Check config after saving the file :

Vim
1
nginx -t

Then do these :

Vim
1
2
3
service php5-fpm restart
service nginx restart
# do not combine with &&

You’ll get the status here :

Vim
1
http://A.B.C.D./status?full

You might face error, due to upstream block or not having libfcgi0ldbl component. We advice to comment out Public IP and curl from shell. If you activate private IP of another server or loadbalancer, you can avoid the public access.

Tagged With DM57
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to PHP-FPM Status Page for Nginx (Ubuntu, Rackspace Cloud)

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud

    Here is a Step by Step Guide on Setting Up WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud with All Commands and the Configuration.

  • Ubuntu Nginx PHP5-FPM UNIX Socket Configuration

    Some Extra Steps Needed to Perform in Ubuntu for the Right Nginx PHP5-FPM UNIX Socket Configuration. Else You’ll Face Random 502, 504 Error.

  • Ngnix Status Graph in PHP5-FPM Setup

    If We Do Not Create Ngnix Status Graph in PHP5-FPM Setup After Enabling Nginx Status Page, The Fun Remains Incomplete. Easiest Way is Described Here.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy