mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-04-25 08:45:58 +03:00
[GH-ISSUE #141] Auto Provisioning Conf files #4509
Labels
No labels
Q/A
bug
casdoor
dependencies
docker
documentation
duplicate
enhancement
help wanted
invalid
lego
platform:openwrt
platform:windows
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-ui#4509
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AlexTryHarder on GitHub (Jul 11, 2023).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/141
Would it be possible to provision a website by filling custom form in UI?
At the moment I'm using a script, but it requires me to log in to SSH every single time.
`#!/bin/sh
echo "Domain:"
read domain
mkdir /var/www/html/$domain
touch /etc/nginx/sites-available/$domain.conf
cat </etc/nginx/sites-available/$domain.conf
server {
listen 80;
root /var/www/html/$domain;
index index.html index.htm;
server_name $domain www.$domain;
error_page 404 /404.html;
location / {
try_files $uri $uri/ =404;
}
}
EOF
ln -s /etc/nginx/sites-available/$domain.conf /etc/nginx/sites-enabled/
systemctl restart nginx`
@0xJacky commented on GitHub (Jul 11, 2023):
Hello, I believe there may be some misunderstanding. If you're looking to add a new site configuration, you can easily do so by navigating to 'Manage Sites > Add Site', and subsequently filling out the provided form. The Nginx UI will then generate a configuration file and place it in the /etc/nginx/sites-available directory.
Following this, the program will activate your new site configuration by creating a soft link to the /etc/nginx/sites-enabled directory. Finally, Nginx will be automatically reloaded by Nginx UI.