17 lines
485 B
Bash
17 lines
485 B
Bash
#!/usr/bin/env bash
|
|
|
|
set -ex
|
|
|
|
sudo apt-get install -y nginx
|
|
sudo mv /tmp/gitea-nginx.conf /etc/nginx/sites-available/gitea.conf
|
|
sudo ln -s /etc/nginx/sites-available/gitea.conf \
|
|
/etc/nginx/sites-enabled/
|
|
sudo unlink /etc/nginx/sites-enabled/default
|
|
|
|
sudo mkdir -p /var/www/gitea
|
|
sudo mv /tmp/fullchain.pem /var/www/gitea/fullchain.pem
|
|
sudo mv /tmp/privkey.pem /var/www/gitea/privkey.pem
|
|
chown www-data:www-data /var/www/gitea/{fullchain,privkey}.pem
|
|
|
|
sudo systemctl enable nginx
|