Initial commit: OpenCode setup and configuration
This commit is contained in:
22
apply_https.sh
Executable file
22
apply_https.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "Applying Nginx SSL configuration for OpenCode..."
|
||||
|
||||
# Copy new config to available sites
|
||||
sudo cp /home/wartana/opencode/opencode.nginx /etc/nginx/sites-available/opencode
|
||||
|
||||
# Ensure link exists
|
||||
if [ ! -L /etc/nginx/sites-enabled/opencode ]; then
|
||||
sudo ln -s /etc/nginx/sites-available/opencode /etc/nginx/sites-enabled/
|
||||
fi
|
||||
|
||||
# Test configuration
|
||||
echo "Testing Nginx configuration..."
|
||||
sudo nginx -t
|
||||
|
||||
# Reload Nginx
|
||||
echo "Reloading Nginx..."
|
||||
sudo systemctl reload nginx
|
||||
|
||||
echo "HTTPS configuration applied successfully!"
|
||||
Reference in New Issue
Block a user