Skip to content
Products
Docs
Pricing
Blog
Log In
Sign Up
Docs
Docs
Getting Started
On this page

Server configuration

Tune the web server and PHP for UNA 15 — rewrites, compression, static cache headers, OPcache, and container traps.
Core
Base
~15.0
Source
Copy Page
Tip
Note
Important
Important
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 5;
gzip_min_length 256;
gzip_types text/plain text/css text/xml application/javascript text/javascript application/json application/xml image/svg+xml application/manifest+json application/wasm;
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/css text/xml application/javascript text/javascript application/json application/xml image/svg+xml application/manifest+json
</IfModule>
Important
location ~* \.(?:woff2?|ttf|otf|eot|svg|png|jpe?g|gif|webp|avif|ico|css|js|mjs|map)$ {
    try_files $uri @dynamic;
    expires 30d;
    add_header Cache-Control "public";
    access_log off;
}

location @dynamic {
    rewrite "^/s/([a-zA-Z0-9_]+)/([a-zA-Z0-9\.]+)" /storage.php?o=$1&f=$2 last;
    rewrite ^/(.+)$ /r.php?_q=$1 last;
}
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/css                  "access plus 30 days"
    ExpiresByType application/javascript    "access plus 30 days"
    ExpiresByType image/png                 "access plus 30 days"
    ExpiresByType image/jpeg                "access plus 30 days"
    ExpiresByType image/webp                "access plus 30 days"
    ExpiresByType image/svg+xml             "access plus 30 days"
    ExpiresByType font/woff2                "access plus 365 days"
    <Files "sw.js.php">
        ExpiresActive Off
    </Files>
</IfModule>
@static {
    path *.woff2 *.woff *.ttf *.otf *.eot *.svg *.png *.jpg *.jpeg *.gif *.webp *.avif *.ico *.css *.js *.mjs *.map
    not path /s/*
}
header @static Cache-Control "public, max-age=2592000"
opcache.enable=1
opcache.memory_consumption=256
opcache.interned_strings_buffer=32
opcache.max_accelerated_files=100000
opcache.validate_timestamps=1
opcache.revalidate_freq=0
    cron:
        volumes:
            - ./scripts/docker-compose/php-cron.ini:/usr/local/etc/php/php.ini
            - ./:/opt/una
6d
On this page
Web server and rewritePublic URL reachability from PHPSite URL, HTTPS, and proxiesCompressionnginxApache mod_deflateCaddyStatic asset cachingnginxApache mod_expiresCaddyApache, nginx, Caddy, and RailwayPHP OPcachePHP runtime floorsPermissions, cron, and uploadsFix the Compose cron container PHP settingsMailAfter upgradesSymptoms → likely causeRelated docs
Introduction
Getting Started
License
Concepts
Architecture
Requirements
Server configuration
Installation
Deployment
Releases
Upgrades
NEO
Glossary
Roadmap
Configuration
Apps
CODE
Auth
Connect