Sites
Vhost Editor
Every site has an nginx configuration that admins can edit under Settings → Vhost. It is stored at /etc/nginx/sites-enabled/xaxa-<domain>.conf.
Only the admin role sees this editor. nginx (www-data) can read every site's files, so a hand-written vhost is trusted like an admin; users with the user role change their sites through the regular settings, which always produce a checked vhost.
How saving works
- XAXA writes the new configuration.
- It runs
nginx -t. - If the test fails, the previous configuration is restored and the nginx error is shown. Your sites keep running.
- If the test passes, nginx is reloaded gracefully.
Reset to default regenerates the vhost from the site's current settings.
What you can't do
Because nginx reads its configuration as root, a few things are blocked for safety:
load_module,perl_*,lua_*,js_*and other scripting directives.includeof anything other thanfastcgi_params,proxy_params,snippets/*.confor files in/etc/nginx/xaxa/sites/<domain>/.access_log/error_logoutside/var/log/nginx/.*_temp_path,*_cache_path,user,pid,envandworker_*.
The vhost also cannot reach outside its own site:
rootandaliasmust point inside the site user's home (/home/<user>); the only exception is the Let's Encrypt folder/var/lib/xaxa/acme. Variables and..are not allowed in these paths.- File paths in
try_files,index,rewrite(unless it redirects) anderror_pagemay not contain..or request values: only$uri,$document_uri,$fastcgi_script_nameand$fastcgi_path_info(and$1… inrewrite) are allowed before the?. nginx does not resolve..there, sotry_files /../../other-site/.envwould serve another site's file. fastcgi_passto a unix socket must be the site's own PHP pool (unix:/run/php/xaxa-<user>.sock). No*_passorupstreammay use any other unix socket, and the backend address may not start with a variable.PHP_VALUE/PHP_ADMIN_VALUEare set under Settings → PHP.server_namemay only list the site's own domain and aliases. Add a name under Settings → Domain & SSL first.listenis limited to ports 80 and 443 withssl,http2orquic— nodefault_server.disable_symlinkscannot be changed: nginx does not follow a symlink to a file owned by another user, so one site cannot serve another site's files.
Useful snippets
Redirect www to the bare domain — add www.example.com as an alias, then add a separate server block:
server {
listen 80;
listen 443 ssl http2;
server_name www.example.com;
ssl_certificate /etc/nginx/xaxa/sites/example.com/cert.pem;
ssl_certificate_key /etc/nginx/xaxa/sites/example.com/key.pem;
return 301 https://example.com$request_uri;
}
Cache static files longer:
location ~* \.(css|js|woff2)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
Found a mistake or need help? support@xaxa.com.tr