mirror of
https://github.com/AnimeThemes/animethemes-api-docs.git
synced 2026-07-11 01:34:06 +02:00
1.6 KiB
1.6 KiB
Requirements
- Nginx
- Certbot
- Bun
Nginx
Create a new Nginx site configuration:
sudo nano /etc/nginx/sites-available/api-docs.animethemes.moe
Paste the following configuration there:
server {
listen 80;
listen [::]:80;
server_name api-docs.animethemes.moe;
return 301 https://$server_name$request_uri;
}
server {
root /var/www/html/animethemes-api-docs/docs/.vitepress/dist;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name api-docs.animethemes.moe;
# Nginx Bad Bot Blocker Includes
include /etc/nginx/bots.d/ddos.conf;
include /etc/nginx/bots.d/blockbots.conf;
location / {
try_files $uri $uri/ /index.html;
index index.html;
}
location ~ /\.ht {
deny all;
}
location ~ /.well-known {
allow all;
}
}
# Save the file, then enable the site
sudo ln -s /etc/nginx/sites-available/api-docs.animethemes.moe /etc/nginx/sites-enabled/
# Validate and reload Nginx configuration
sudo nginx -t
sudo systemctl reload nginx
sudo systemctl restart nginx
Install Certificates
To install HTTPS certificates using Let's Encrypt, follow the official guide from DigitalOcean.
Application Setup
# Go to the web directory and clone repository from Github
cd /var/www/html
sudo git clone git@github.com:AnimeThemes/animethemes-api-docs.git
cd animethemes-api-docs
# Install the dependencies using Bun
bun install
# Build the static files
bun run docs:build