mirror of
git://f0xx.org/ac/ac-ms-url-shortener
synced 2026-07-29 03:38:47 +03:00
initial
This commit is contained in:
29
deploy/nginx.be-url-shortener.fragment
Normal file
29
deploy/nginx.be-url-shortener.fragment
Normal file
@@ -0,0 +1,29 @@
|
||||
# BE Alpine — url-shortener vhost fragment
|
||||
# Include from /etc/nginx/conf.d/apps.conf or separate file.
|
||||
#
|
||||
# Docroot: /var/www/localhost/htdocs/apps/s/public
|
||||
# PHP-FPM: same socket as crash reporter unless load warrants a pool.
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name s.f0xx.org;
|
||||
|
||||
root /var/www/localhost/htdocs/apps/s/public;
|
||||
index index.php;
|
||||
|
||||
# API + QR
|
||||
location ^~ /api/ {
|
||||
try_files $uri /index.php?$query_string;
|
||||
}
|
||||
|
||||
# Short slug redirect (6–16 hex chars). Regex MUST be quoted — bare {6,16} breaks nginx -t.
|
||||
location ~ "^/[a-f0-9]{6,16}$" {
|
||||
try_files $uri /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_pass unix:/run/php-fpm.socket;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user