i am going to put multiple apps on a single subdomains, i.e api.domain.com;
where each subfolder house corresponding limoncello app like:
api.domain.com/school1/subschool1/...
where api endpoint api.domain.com/school1/subschool1/v1/users... etc...
i did some adjustment on nginx like
server {
listen 80;
server_name api.domain.com;
access_log off;
error_log off;
root /srv/www;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$args;
}
location /school1/subschool {
root /srv/www/api/school1/subschool1/public/;
rewrite ^/school1/subschool1/(.*)$ /$1 break;
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri $uri/ /index.php?$args = 404;
set $newurl $request_uri;
if ($newurl ~ ^/school1/subschool1(.*)$) {
set $newurl $1;
root /srv/www/api/school1/subschool1/public/;
}
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param REQUEST_URI $newurl;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
}
}
is it a right approach to bring up limoncello app on subfolder usage ?
i am going to put multiple apps on a single subdomains, i.e api.domain.com;
where each subfolder house corresponding limoncello app like:
api.domain.com/school1/subschool1/...
where api endpoint api.domain.com/school1/subschool1/v1/users... etc...
i did some adjustment on nginx like
is it a right approach to bring up limoncello app on subfolder usage ?