Skip to content
Coder Studios

Services

PHP & NGINX security audit

A hands-on vulnerability check of your PHP application and the NGINX server in front of it — what’s exposed, what’s out of date and what to fix first.

Who this is for

Businesses running a PHP website or web application who aren’t sure how secure it is. Typical reasons people get in touch:

  • the site runs on an old PHP version and nobody is sure what will break if it’s upgraded;
  • the developer or agency who built it has moved on, and the server has been left as it was;
  • a customer, insurer or Cyber Essentials assessment has asked questions you can’t answer;
  • something odd has happened — spam sent from the server, unexpected files, a defaced page — and you want to know how;
  • you’re about to invest in new features and want to know what you’re building on.

Why PHP and NGINX together

Most automated scanners look at an application from the outside, and most server hardening guides ignore the application. Real vulnerabilities are usually in the gap between the two: an NGINX rule that hands an uploaded image to PHP-FPM, a document root that exposes .env, a debug page that leaks credentials. Because we build PHP applications and look after the servers they run on, we review the whole request path — from TLS to the database query — as one system.

What we check

PHP version, extensions and configuration

  • End-of-life PHP — PHP 8.1 and earlier no longer get security patches; PHP 8.2 stops receiving them on 31 December 2026. We confirm what you’re running, including the CLI and cron versions, which are often different from the web version.
  • php.ini hardening — display_errors, expose_php, allow_url_include, open_basedir, disable_functions, upload limits and session cookie settings (session.cookie_secure, httponly, samesite, strict mode).
  • PHP-FPM pools — which user each pool runs as, whether sites share a pool, file permissions on the code and the status and ping pages.
  • OPcache and leftovers — stray phpinfo() files, installers, database admin tools and backup copies such as config.php.bak.

NGINX configuration

  • PHP handling — location ~ \.php$ blocks without try_files $uri =404, combined with cgi.fix_pathinfo, can let an attacker run an uploaded file as PHP. This is still one of the most common serious findings.
  • Document root — pointing NGINX at the project root rather than the public directory exposes .env, .git, composer.json, logs and storage.
  • Alias traversal — an alias inside a location missing its trailing slash can serve files from outside the intended folder.
  • Hidden and sensitive files — rules that deny dotfiles, version control, backups and upload directories executing scripts.
  • TLS — protocol versions, ciphers, certificate renewal, HSTS and redirects from HTTP.
  • Security headers — Content-Security-Policy, X-Content-Type-Options, Referrer-Policy and frame protection, and the NGINX add_header inheritance rule that silently drops headers in nested locations.
  • Proxies and request handling — trusted X-Forwarded-For and real_ip settings, a default server block that rejects unknown Host headers, server_tokens, request size limits and rate limiting on login and contact forms.
  • NGINX version — whether the installed NGINX and OpenSSL packages have outstanding security advisories.

Dependencies and known vulnerabilities

  • composer audit and npm audit results, checked against the code you actually use, so you aren’t chasing irrelevant warnings;
  • abandoned packages that will never receive a fix;
  • frameworks and CMSs past end of life, which no dependency update can solve on its own.

The application itself

  • Secrets — keys and passwords committed to the repository, debug mode left on in production, an application key that has leaked or never been rotated.
  • Injection — SQL built from strings, unescaped output (XSS), shell commands, file includes and unserialize() on user input.
  • Authentication and accounts — password storage, session fixation, rate limiting, password reset flows and whether changing an account’s email address can be used to take the account over.
  • Authorisation — whether users can reach each other’s records by changing an ID in the URL.
  • File uploads — type checks, storage outside the web root and file names an attacker controls.
  • CSRF, CORS and cookies — tokens on state-changing requests and cookie flags.

What you get

  1. A written report — every finding explained in plain English, with the evidence and why it matters to your business.
  2. A risk ranking — critical, high, medium and low, so you know what has to happen this week and what can wait.
  3. A specific fix for each finding — the configuration change, code change or upgrade path, not a generic recommendation.
  4. A conversation — a call to go through the report, answer questions and agree next steps with you or your developers.

After the audit

Some findings are quick configuration fixes we can apply the same week. Others point to a bigger decision: an old Laravel version that needs upgrading and hardening, or an unsupported framework that is better moved to Laravel. The audit gives you the evidence to make that decision and a realistic estimate for each option.

Relevant experience

We have worked with PHP for well over a decade and with Laravel since version 4.2, across CakePHP, Symfony-based and completely custom codebases as well as Laravel. We deploy and operate our own production applications, including PaidProper, which handles customer accounts, payments and integrations. That means we look at configuration as people who have to keep it running, not just tick it off a list.

How an audit usually works

We agree scope in a short call — which sites, which servers, what access you’re comfortable with. You share the repository and configuration, we review it, and you receive the report, usually within one to two weeks depending on the size of the application. Everything is done with your written permission and under a confidentiality agreement if you need one.

Common questions

What is included in a PHP and NGINX security audit?
A review of the PHP version and configuration, PHP-FPM pools, NGINX server blocks, TLS and security headers, Composer and npm dependencies against known vulnerabilities (CVEs), files exposed to the public web, and the application code paths that handle authentication, uploads, user input and payments. You get a written report with every finding ranked by risk and a specific fix for each.
Is this a penetration test?
It is a white-box review: we read the configuration and the code with your permission, rather than attacking the site blind from outside. That finds misconfiguration and code-level problems that external scanners miss, and it is safe to run against production. Where a finding needs proving, we test it in a staging copy. If you need a formal, accredited penetration test for compliance, we can prepare the application for one and fix what it finds.
How do I know if my PHP version is still supported?
Run php -v on the server, or check the PHP version shown by your hosting control panel, then compare it with the supported versions list on php.net. PHP 8.1 and every earlier release no longer receive security fixes, and PHP 8.2 reaches end of life on 31 December 2026. An unsupported PHP version is one of the first things the audit checks, because no amount of application hardening fixes a vulnerable runtime.
Can you fix the vulnerabilities you find?
Yes. Most configuration findings can be fixed in hours. Code and dependency findings are planned with you, highest risk first, and released in small, tested changes. Many clients move straight on to a Laravel upgrade or a migration once they can see the full picture.
Do you need access to our servers?
Read access to the code repository and copies of the NGINX, PHP and PHP-FPM configuration are usually enough. If you prefer, we can work through a screen share with your hosting provider or in-house team. We never need production database contents.
Do you only audit Laravel applications?
No. We audit Laravel, older frameworks such as CodeIgniter, CakePHP, Zend Framework and Symfony, WordPress back ends and completely custom PHP, behind NGINX or Apache.
  • Migrate to Laravel

    Move an out-of-date PHP application or unsupported framework onto a modern Laravel codebase, without losing data, URLs or business rules.
  • PHP development

    Real-world PHP expertise for existing applications, frameworks and custom codebases.

Related insights

  • Laravel vs WordPress — Laravel and WordPress compared from a developer’s point of view, and why we usually choose Laravel for web applications.

Contact

Have a web project?

Tell us what you’re building, what isn’t working, or what you’re trying to improve.