Перейти к содержанию

Application Recipes

Ready-to-use NGINX configurations for popular web applications and frameworks.


PHP Frameworks & CMS

Application Description
PHP-FPM PHP FastCGI Process Manager setup
WordPress Blog & CMS platform with multisite support
Drupal Content management framework
Symfony PHP framework (versions 2.x - 6.x)
CodeIgniter Lightweight PHP framework
Yii High-performance PHP framework
Zend Framework Enterprise PHP framework
MediaWiki Wiki platform (powers Wikipedia)

E-commerce

Application Description
Shopware Open-source e-commerce platform
osCommerce E-commerce with SEO-friendly URLs

Forums & Community

Application Description
XenForo Modern forum software
MyBB Free forum software

Wikis & Documentation

Application Description
DokuWiki Simple wiki without database
PmWiki Wiki for collaborative websites
MoinMoin Python-based wiki with uWSGI

Project Management & Analytics

Application Description
Redmine Ruby project management
Matomo Web analytics (formerly Piwik)
b2evolution Blog/CMS with forums

Python Frameworks

Application Description
Django Python web framework with FastCGI/Gunicorn
Pylons Python web framework with Flup

Ruby Applications

Application Description
Ruby (Unicorn/Puma) Ruby app servers via Unix socket

Java/JVM

Application Description
Java servers Jetty, Tomcat, GlassFish as backends

Common Patterns

Most PHP applications follow similar patterns:

server {
    server_name example.com;
    root /var/www/app;
    index index.php;

    # Static files
    location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
        expires max;
        log_not_found off;
    }

    # Route requests to front controller
    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    # PHP handling
    location ~ \.php$ {
        try_files $uri =404;
        include fastcgi_params;
        fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }

    # Block hidden files
    location ~ /\. {
        deny all;
    }
}