#!/bin/bash echo "[BOOTSTRAP] Running initial nginx setup for FOX-API..." # Download the nginx config files curl -s https://git.kakio.us/Furality/coder-templates/raw/branch/main/configs/fox-api/nginx/nginx.conf > /etc/nginx/nginx.conf # Make a folder for the nginxconfig.io files mkdir -p /etc/nginx/nginxconfig.io/ #Make sure the nginxconfig.io files are owned by www-data chown -R www-data:www-data /etc/nginx/nginxconfig.io/ # Download the nginxconfig.io files curl -s https://git.kakio.us/Furality/coder-templates/raw/branch/main/configs/fox-api/nginx/nginxconfig.io/general.conf > /etc/nginx/nginxconfig.io/general.conf curl -s https://git.kakio.us/Furality/coder-templates/raw/branch/main/configs/fox-api/nginx/nginxconfig.io/php_fastcgi.conf > /etc/nginx/nginxconfig.io/php_fastcgi.conf curl -s https://git.kakio.us/Furality/coder-templates/raw/branch/main/configs/fox-api/nginx/nginxconfig.io/security.conf > /etc/nginx/nginxconfig.io/security.conf # Download the nginx sites-available files curl -s https://git.kakio.us/Furality/coder-templates/raw/branch/main/configs/fox-api/nginx/sites-available/fox-api.conf > /etc/nginx/sites-available/fox-api.conf # Link the sites-available files to sites-enabled ln -s /etc/nginx/sites-available/fox-api.conf /etc/nginx/sites-enabled/fox-api.conf # Remove the default nginx site rm /etc/nginx/sites-enabled/default # Restart nginx systemctl restart nginx echo "[BOOTSTRAP] Done!"