mirror of
https://codeberg.org/vlw/victorwesterlund.com.git
synced 2025-09-14 03:23:41 +02:00
Added dummy file to "api/" and made it canonial in server.conf
Added "router.php" which will function as a proxy for all api requests
This commit is contained in:
parent
26ec726238
commit
9fda2e2e36
2 changed files with 7 additions and 5 deletions
5
api/router.php
Normal file
5
api/router.php
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
http_response_code("503 Service Unavailable");
|
||||||
|
header("Content-Type: text/plain");
|
||||||
|
echo "Not available yet";
|
|
@ -59,11 +59,8 @@ server {
|
||||||
|
|
||||||
root /var/www/github_victorwesterlund_victorwesterlund.com/api;
|
root /var/www/github_victorwesterlund_victorwesterlund.com/api;
|
||||||
|
|
||||||
location \ {
|
location \* {
|
||||||
try_files $uri $uri.html $uri/ =404;
|
try_files /router.php$request_uri =404;
|
||||||
}
|
|
||||||
|
|
||||||
location ~ \.php$ {
|
|
||||||
add_header Access-Control-Allow-Origin *;
|
add_header Access-Control-Allow-Origin *;
|
||||||
include snippets/fastcgi-php.conf;
|
include snippets/fastcgi-php.conf;
|
||||||
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
|
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
|
||||||
|
|
Loading…
Add table
Reference in a new issue