mirror of
git://f0xx.org/ac/ac-deploy
synced 2026-07-29 05:00:35 +03:00
cluster: fix url-shortener nginx fastcgi routing for s.f0xx.org
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
committed by
Anton Afanasyeu
parent
2f544de974
commit
76d4797cac
@@ -1,6 +1,7 @@
|
|||||||
# BE cluster — url-shortener vhost (Host: s.f0xx.org from FE)
|
# BE cluster — url-shortener vhost (Host: s.f0xx.org from FE)
|
||||||
# Install: include from /etc/nginx/http.d/androidcast.conf or http.d/url-shortener.conf
|
# Install: /etc/nginx/http.d/url-shortener.conf on cast01–03
|
||||||
# Docroot: URL_SHORTENER_ROOT/public (default /var/www/url-shortener/public)
|
# Docroot: /var/www/url-shortener/public (deploy-ac-url-shortener.sh)
|
||||||
|
# Config: config/config.php + MariaDB (see ensure_url_shortener_prod_config.php pattern)
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
@@ -10,16 +11,24 @@ server {
|
|||||||
index index.php;
|
index index.php;
|
||||||
|
|
||||||
location ^~ /api/ {
|
location ^~ /api/ {
|
||||||
try_files $uri /index.php?$query_string;
|
include fastcgi_params;
|
||||||
|
fastcgi_pass 127.0.0.1:9000;
|
||||||
|
fastcgi_param SCRIPT_FILENAME /var/www/url-shortener/public/index.php;
|
||||||
|
fastcgi_param SCRIPT_NAME /index.php;
|
||||||
|
fastcgi_param REQUEST_URI $request_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ "^/[a-f0-9]{6,16}$" {
|
location ~ "^/[a-f0-9]{6,16}$" {
|
||||||
try_files $uri /index.php?$query_string;
|
include fastcgi_params;
|
||||||
|
fastcgi_pass 127.0.0.1:9000;
|
||||||
|
fastcgi_param SCRIPT_FILENAME /var/www/url-shortener/public/index.php;
|
||||||
|
fastcgi_param SCRIPT_NAME /index.php;
|
||||||
|
fastcgi_param REQUEST_URI $request_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ \.php$ {
|
location = /index.php {
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
||||||
fastcgi_pass 127.0.0.1:9000;
|
fastcgi_pass 127.0.0.1:9000;
|
||||||
|
fastcgi_param SCRIPT_FILENAME /var/www/url-shortener/public/index.php;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user