os="$(cat "$__global/explorer/os")"

# Note: __service nginx --action reload


domain="$__object_id"
nginx_config_dir="/etc/nginx/conf.d"

require="__package/nginx" __file $nginx_config_dir/$domain.conf --source - << EOF

server {

   server_name $domain;
   listen [::]:80 ;

   location / {
      autoindex on;
      root /var/www/html/$domain;
   }
}
EOF

# Messaging is not needed because atm I assume that the config file will get overwritten every run, even if the contents are the same.
#echo "conf_file_changed" >> "$__messages_out"