background preloader

Nginx/php stuff to sort

Facebook Twitter

Ngx_core_module.html#error_log. Example Configuration user www www; worker_processes 2; error_log /var/log/nginx-error.log info; events { use kqueue; worker_connections 2048; } ...

ngx_core_module.html#error_log

Directives. Connection processing methods (events.html #epoll) PHP FastCGI Example. Download - PHP-FPM. PHP-FPM is finally in PHP core!

Download - PHP-FPM

It is based off of the 0.6.x series in Launchpad, and is now the "officially" supported release. All the different versions of PHP-FPM are below. PHP Core (PHP 5.3.3 and later) PHP-FPM is now included in PHP core as of PHP 5.3.3. Get Download. Getting a Git Repository. If you can read only one chapter to get going with Git, this is it.

Getting a Git Repository

This chapter covers every basic command you need to do the vast majority of the things you’ll eventually spend your time doing with Git. By the end of the chapter, you should be able to configure and initialize a repository, begin and stop tracking files, and stage and commit changes. We’ll also show you how to set up Git to ignore certain files and file patterns, how to undo mistakes quickly and easily, how to browse the history of your project and view changes between commits, and how to push and pull from remote repositories. Apache Subversion Source Code. You can install Subversion by compiling its source code release directly, or you can install one of the prepackaged binaries if there is one for your operating system.

Apache Subversion Source Code

Unless a release has "alpha", "beta", or "rc" in its name, it is tested and considered stable for production use. When upgrading, just install "on top of" the older release. Subversion 1.x is forward-compatible with any newer 1.y. No repository upgrade is required. Postgresql - Error while loading shared libraries: libpq.so.5: cannot open shared object file: No such file or directory. Print. I have written a script to benchmark the several methods of outputting data in PHP: via single quotes, double quotes, heredoc, and printf.

print

The script constructs a paragraph of text with each method. It performs this construction 10,000 times, then records how long it took. Your first PHP-enabled page. Create a file named and put it in your web server's root directory () with the following content: Example #1 Our first PHP script: <html> <head> <title>PHP Test</title> </head> <body> <?

Your first PHP-enabled page

Logging and Monitoring. This section describes how to configure logging of errors and processed requests in NGINX Open Source and NGINX Plus.

Logging and Monitoring

In This Section Setting Up the Error Log NGINX writes information about encountered issues of different severity levels to the error log. The error_log directive sets up logging to a particular file, stderr, or syslog and specifies the minimal severity level of messages to log. A debugging log. To enable a debugging log, nginx needs to be configured to support debugging during the build: .

A debugging log

/configure --with-debug ... Then the debug level should be set with the error_log directive: error_log /path/to/log debug; To verify that nginx is configured to support debugging, run the nginx -V command: Download - PHP-FPM. Php fpm - Nginx 1 FastCGI sent in stderr: “Primary script unknown” Beginner’s Guide. This guide gives a basic introduction to nginx and describes some simple tasks that can be done with it.

Beginner’s Guide

It is supposed that nginx is already installed on the reader’s machine. If it is not, see the Installing nginx page. Understanding and Implementing FastCGI Proxying in Nginx. Introduction Nginx has become one of the most flexible and powerful web server solutions available.

Understanding and Implementing FastCGI Proxying in Nginx

However, in terms of design, it is first and foremost a proxy server. This focus means that Nginx is very performant when working to handle requests with other servers. Nginx can proxy requests using http, FastCGI, uwsgi, SCGI, or memcached. How to remove location block from $uri in nginx configuration? Beginner’s Guide. This guide gives a basic introduction to nginx and describes some simple tasks that can be done with it. It is supposed that nginx is already installed on the reader’s machine. If it is not, see the Installing nginx page.

This guide describes how to start and stop nginx, and reload its configuration, explains the structure of the configuration file and describes how to set up nginx to serve out static content, how to configure nginx as a proxy server, and how to connect it with a FastCGI application. nginx has one master process and several worker processes. Nginx - How do you restart php-fpm? Nginx (Web Server)