diff --git a/add-site.sh b/add-site.sh index d00d508..bae5eb8 100755 --- a/add-site.sh +++ b/add-site.sh @@ -36,7 +36,7 @@ hostname=$(hostname -f) # Set up directory structure main_web_root="/var/www/$domain" -sudo mkdir -p "$main_web_root"/{_main/www,subdomains,logs,error-pages} +sudo mkdir -p "$main_web_root"/{_main/www,subdomains,logs} # Create the user with the web root as home directory and add to www-data and websftpusers groups sudo useradd -m -d /var/www/$domain -s /bin/false -U -G www-data,websftpusers $username @@ -85,9 +85,6 @@ MySQL Host: $hostname Main web root: $main_web_root/_main/www Subdomain web root: $main_web_root/subdomains/[subdomain]/www - -Custom error pages: $main_web_root/error-pages -Subdomain custom error pages: $main_web_root/subdomains/[subdomain]/error-pages EOL" sudo chown "$username:$username" "$info_file" sudo chmod 600 "$info_file" @@ -144,9 +141,7 @@ sudo systemctl reload nginx echo "Setup complete for $domain" echo "Access via SFTP at $hostname with the username $username and the password $password" echo "Main website files should be placed in: _main/www" -echo "Custom error pages can be placed in: error-pages" echo "Subdomain files should be placed in: subdomains/[subdomain]/www" -echo "Subdomain custom error pages can be placed in: subdomains/[subdomain]/error-pages" echo "Site information (including MySQL credentials) is stored in: $info_file" echo "Cloudflare credentials for this domain are stored in: $cf_credentials" echo "Logs are stored in: logs" diff --git a/site-config.conf b/site-config.conf index 3c083c0..92e92fe 100644 --- a/site-config.conf +++ b/site-config.conf @@ -44,26 +44,6 @@ server { } root "$site_root/www"; - # Site-specific error pages - error_page 403 /site-error-page/403.html; - error_page 404 /site-error-page/404.html; - error_page 503 /site-error-page/503.html; - error_page 500 502 504 /site-error-page/50x.html; - location ^~ /site-error-page/ { - alias "$site_root/error-pages/"; - internal; - } - - # Domain-specific error pages - error_page 403 /domain-error-page/403.html; - error_page 404 /domain-error-page/404.html; - error_page 503 /domain-error-page/503.html; - error_page 500 502 504 /domain-error-page/50x.html; - location ^~ /domain-error-page/ { - alias "/var/www/$DOMAIN/error-pages/"; - internal; - } - # Default error page config include snippets/error-pages.conf;