Services
PHP & NGINX security audit
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 asconfig.php.bak.
NGINX configuration
- PHP handling —
location ~ \.php$blocks withouttry_files $uri =404, combined withcgi.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
publicdirectory exposes.env,.git,composer.json, logs and storage. - Alias traversal — an
aliasinside alocationmissing 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_headerinheritance rule that silently drops headers in nested locations. - Proxies and request handling — trusted
X-Forwarded-Forandreal_ipsettings, 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 auditandnpm auditresults, 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
- A written report — every finding explained in plain English, with the evidence and why it matters to your business.
- A risk ranking — critical, high, medium and low, so you know what has to happen this week and what can wait.
- A specific fix for each finding — the configuration change, code change or upgrade path, not a generic recommendation.
- 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?
Is this a penetration test?
How do I know if my PHP version is still supported?
Can you fix the vulnerabilities you find?
Do you need access to our servers?
Do you only audit Laravel applications?
Related services
-
Upgrade Laravel to a supported version, close security gaps and pay down the technical debt that makes every change risky.
-
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