diff --git a/api/favicon.ico/default.php b/api/favicon.ico/default.php new file mode 100644 index 0000000..ddb5056 --- /dev/null +++ b/api/favicon.ico/default.php @@ -0,0 +1,4 @@ + "error", + "message" => $error->getMessage() + ]; + + echo json_encode($output); + } \ No newline at end of file diff --git a/server.conf b/server.conf index 0494394..512a4f8 100644 --- a/server.conf +++ b/server.conf @@ -1,4 +1,4 @@ -# == victorwesterlund.com == +# -- victorwesterlund.com -- server { listen 80; @@ -37,7 +37,7 @@ server { } } -# == api.victorwesterlund.com == +# -- api.victorwesterlund.com -- server { listen 80; @@ -59,8 +59,8 @@ server { root /var/www/github_victorwesterlund_victorwesterlund.com/api; - location \* { - try_files /router.php$request_uri =404; + location / { + try_files /router.php =404; add_header Access-Control-Allow-Origin *; include snippets/fastcgi-php-router.conf; fastcgi_pass unix:/run/php/php7.3-fpm.sock;