Git Product home page Git Product logo

nginx-ui's Introduction

Nginx UI Logo

Nginx UI

Yet another Nginx Web UI, developed by 0xJacky and Hintay.

Build and Publish GitHub license Release Version GitHub Star GitHub Fork Repo Size GitHub Fork

Docker Stars Docker Pulls Image Size

Documentation

To check out docs, visit nginxui.com.

Stargazers over time

Stargazers over time

English | Español | 简体中文 | 繁體中文 | Tiếng Việt

Table of Contents
  1. About The Project
  2. Getting Started
  3. Manual Build
  4. Script for Linux
  5. Example of Nginx Reverse Proxy Configuration
  6. Contributing
  7. License

About The Project

Dashboard

Demo

URL:https://demo.nginxui.com

  • Username:admin
  • Password:admin

Features

  • Online statistics for server indicators such as CPU usage, memory usage, load average, and disk usage.
  • Online ChatGPT Assistant
  • One-click deployment and automatic renewal Let's Encrypt certificates.
  • Online editing websites configurations with our self-designed NgxConfigEditor which is a user-friendly block editor for nginx configurations or Ace Code Editor which supports highlighting nginx configuration syntax.
  • Online view Nginx logs
  • Written in Go and Vue, distribution is a single executable binary.
  • Automatically test configuration file and reload nginx after saving configuration.
  • Web Terminal
  • Dark Mode
  • Responsive Web Design

Internationalization

  • English
  • Simplified Chinese
  • Traditional Chinese

We welcome translations into any language.

Built With

Getting Started

Before Use

The Nginx UI follows the Debian web server configuration file standard. Created site configuration files will be placed in the sites-available folder that under the Nginx configuration folder (auto-detected). The configuration files for an enabled site will create a soft link to the sites-enabled folder. You may need to adjust the way the configuration files are organised.

For non-Debian (and Ubuntu) systems, you may need to change the contents of the nginx.conf configuration file to the Debian style as shown below.

http {
	# ...
	include /etc/nginx/conf.d/*.conf;
	include /etc/nginx/sites-enabled/*;
}

For more information: debian/conf/nginx.conf

Installation

Nginx UI is available on the following platforms:

  • Mac OS X 10.10 Yosemite and later (amd64 / arm64)
  • Linux 2.6.23 and later (x86 / amd64 / arm64 / armv5 / armv6 / armv7)
    • Including but not limited to Debian 7 / 8, Ubuntu 12.04 / 14.04 and later, CentOS 6 / 7, Arch Linux
  • FreeBSD
  • OpenBSD
  • Dragonfly BSD
  • Openwrt

You can visit latest release to download the latest distribution, or just use installation scripts for Linux.

Usage

In the first runtime of Nginx UI, please visit http://<your_server_ip>:<listen_port>/install in your browser to complete the follow-up configurations.

From Executable

Run Nginx UI in Terminal

nginx-ui -config app.ini

Press Control+C in the terminal to exit Nginx UI.

Run Nginx UI in Background

nohup ./nginx-ui -config app.ini &

Stop Nginx UI with the follow command.

kill -9 $(ps -aux | grep nginx-ui | grep -v grep | awk '{print $2}')

With Systemd

If you are using the installation script for Linux, the Nginx UI will be installed as nginx-ui service in systemd. Please use the systemctl command to control it.

Start Nginx UI

systemctl start nginx-ui

Stop Nginx UI

systemctl stop nginx-ui

Restart Nginx UI

systemctl restart nginx-ui

With Docker

Our docker image uozi/nginx-ui:latest is based on the latest nginx image and can be used to replace the Nginx on the host. By publishing the container's port 80 and 443 to the host, you can easily make the switch.

Note
  1. When using this container for the first time, ensure that the volume mapped to /etc/nginx is empty.
  2. If you want to host static files, you can map directories to container.
Deploy with Docker
  1. Install Docker.

  2. Then deploy nginx-ui like this:

docker run -dit \
  --name=nginx-ui \
  --restart=always \
  -e TZ=Asia/Shanghai \
  -v /mnt/user/appdata/nginx:/etc/nginx \
  -v /mnt/user/appdata/nginx-ui:/etc/nginx-ui \
  -p 8080:80 -p 8443:443 \
  uozi/nginx-ui:latest
  1. When your docker container is running, Log in to nginx-ui panel with http://<your_server_ip>:8080/install.
Deploy with Docker-Compose
  1. Install Docker-Compose.

  2. Creat a docker-compose.yml file like this:

version: '3.3'
services:
    nginx-ui:
        stdin_open: true
        tty: true
        container_name: nginx-ui
        restart: always
        environment:
            - TZ=Asia/Shanghai
        volumes:
            - '/mnt/user/appdata/nginx:/etc/nginx'
            - '/mnt/user/appdata/nginx-ui:/etc/nginx-ui'
            - '/var/www:/var/www'
        ports:
            - 8080:80
            - 8443:443
        image: 'uozi/nginx-ui:latest'
  1. Then creat your container by:
docker-compose up -d
# If using docker-compose-plugin
docker compose up -d
  1. When your docker container is running, Log in to nginx-ui panel with http://<your_server_ip>:8080/install.

Manual Build

On platforms that do not have an official build version, they can be built manually.

Prerequisites

  • Make

  • Golang 1.22+

  • node.js 21+

    npx browserslist@latest --update-db

Build Frontend

Please execute the following command in app directory.

pnpm install
pnpm build

Build Backend

Please build the app first, and then execute the following command in the project root directory.

go build -o nginx-ui -v main.go

Script for Linux

Basic Usage

Install and Upgrade

bash <(curl -L -s https://raw.githubusercontent.com/0xJacky/nginx-ui/master/install.sh) install

The default listening port is 9000, and the default HTTP Challenge port is 9180. If there is a port conflict, please modify /usr/local/etc/nginx-ui/app.ini manually, then use systemctl restart nginx-ui to reload the Nginx UI service.

Remove Nginx UI, except configuration and database files

bash <(curl -L -s https://raw.githubusercontent.com/0xJacky/nginx-ui/master/install.sh) remove

More Usage

bash <(curl -L -s https://raw.githubusercontent.com/0xJacky/nginx-ui/master/install.sh) help

Example of Nginx Reverse Proxy Configuration

server {
    listen          80;
    listen          [::]:80;

    server_name     <your_server_name>;
    rewrite ^(.*)$  https://$host$1 permanent;
}

map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}

server {
    listen  443       ssl;
    listen  [::]:443  ssl;
    http2   on;

    server_name         <your_server_name>;

    ssl_certificate     /path/to/ssl_cert;
    ssl_certificate_key /path/to/ssl_cert_key;

    location / {
        proxy_set_header    Host                $host;
        proxy_set_header    X-Real-IP           $remote_addr;
        proxy_set_header    X-Forwarded-For     $proxy_add_x_forwarded_for;
        proxy_set_header    X-Forwarded-Proto   $scheme;
        proxy_http_version  1.1;
        proxy_set_header    Upgrade             $http_upgrade;
        proxy_set_header    Connection          $connection_upgrade;
        proxy_pass          http://127.0.0.1:9000/;
    }
}

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is provided under a GNU Affero General Public License v3.0 license that can be found in the LICENSE file. By using, distributing, or contributing to this project, you agree to the terms and conditions of this license.

nginx-ui's People

Contributors

0xjacky avatar anotiawang avatar buco7854 avatar dependabot[bot] avatar elf168 avatar hintay avatar iahtoh avatar jraaay avatar kcholoren avatar klic-infra avatar leic4u avatar nthsky avatar peterdavehello avatar quanbisen avatar sanvu88 avatar vorobalek avatar vorobalek-private avatar weblate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nginx-ui's Issues

Docker 部署错误

今天拉取了最新的 Docker 镜像构建后,感觉不对劲,于是下午花了点时间搭了个环境手动构建了一遍,发现了两个小问题(?

  1. dockerfile 文件里的 rm -f /etc/nginx/conf.d/default.conf 命令似乎没有效果,因为 default.conf 还是存在且正常映射,导致直接访问 80 端口显示的页面是 nginx 欢迎页,而不是 nginx-ui 后台,需要手动删除然后重启容器;但是这么一来便没有了意义,甚至不如直接开放 9000 端口 (
  2. 初次访问的时候,不会自动跳转到 /install 页面进行初始化,而是直接跳到了 /login?next=/dashboard 进行账号登录(应该是近几天提交里才出现的 bug,因为我另一台机子上的老镜像是没问题的

ps: docker hub 上的镜像版本除了始终最新的 latest ,能否按 Nginx-UI 的版本号进行二次区分,比如:v1.4.2 等等(~

image

网站管理/站点列表 搜索功能

  • 是否考虑站点列表 右边增加一个搜索框,对于对外公网映射站点很多(>= 几十个),增加一个搜索功能很实用
    找起来方便 :)

  • 搜索条件可以是 名称描述 ,配置里面的 ip地址

  • 突然发现【名称】在第一次创建后,不支持修改

No code formatting for Manage Sites --> Advanced

First of all, thanks for getting Issue #69 tackled so quickly! Much appreciated.

When I go to Manage Sites --> Modify --> Advanced, my nginx code is automatically formatted. I have a rather complicated configuration for my site (complicated at least in the eyes of the parser), and the auto formatting breaks my config. (While I can modify my site config through Manage Configs, it's a bit more of a hassle.)

So my proposal is when clicking the 'Advanced' toggle button in Manage Sites, don't automatically format the code. This way advanced users won't have their config messed up. (I also really like white space in my config for ease of understanding and I lose this with auto formatting.)

You might consider having a button at the bottom of the screen to auto format like you do for Manage Configs for those who would like to use it. This would greatly improve usability. Thanks!

integration with terminal/shell

Maybe instead of adding a lot of features, it's better to add one feature that is used very often.
terminal/shell
maybe like a webmin terminal, making this a complete application, without having to ssh into the server

thank you for this very cool application, I use it to handle my proxy

使用过程中的几个小问题

  1. SSL 证书管理功能:上传、删除、快速选择/取消绑定至站点等,有在计划内嘛?

  2. 初始安装完成后,可以将 nginx-ui.conf 的配置内容添加到 网站管理/站点列表 里,以便更加便捷的对 Nginx UI 管理后台进行域名分配等操作嘛?

  3. 新版本的 编辑站点 界面体验感觉不太好:

    • 点击指令项输入框时,会弹出注释框,但是当焦点完全消失时,注释框不会自动收起
    • 注释框里也有一个 在下面添加指令 按钮,是多出来了,还是设计便是如此?
    • Locations 下的 Location 节点无法直接便捷的进行删除或者添加新节点,需要进入 高级模式
  4. nginx/modules 是个软连接文件(源文件是个目录),在 配置管理 界面中是否应该隐藏显示,因为它无法进行编辑和修改操作:
    image

  5. 网站管理/添加站点 界面新增站点时,基本信息填写完毕点击下一步后,SSL 配置页显示不正常,只有一个 启用 TLS 开关按钮,没有 Server 2 界面,但此时点击这个开关按钮后, Server 2 界面就会出现,不过是一片空白,只剩下一个 下一步 按钮,并且点击下一步会报错,无法完成:

点击按钮前:

image

点击按钮后:

image

此时点击下一步后出现的报错:

image

虽然报错,但此时,在 站点列表 页面可以对其进行修改,但是显示照样不正常,没有 ssl_certificatessl_certificate_key 指令项:

image

终端一直提示 Login incorrect

刚刚心血来潮想试试 Nginx UI 附带的终端,但是发现用户和密码正确的情况下,一直都是提示 Login incorrect,是因为部署在了 Docker 容器里还是为什么嘞(~

-1a7a79df2c9885ed.jpg

自动续期不工作

版本 : nginx-ui v1.6.8
安装方式: docker-compose

业务访问提示非安全才发现证书过期了
如图所示,显示0天已过期,正常应该是到期前一个月就自动续期

1675391492(1)

然后手动点击续期,续期流程正常没问题。
1675391592

日志查阅

如标题所述,希望可以为各站点日志和 Nginx 错误日志提供日志查看功能

ps: 有个小疑问,配置管理界面是否应该增加一个 Nginx 重启/配置重载功能,还是说修改完配置后会自动重启/重载(?

Terminal not ditable

Hi,

Thank you for this nice GUI.
I have a strange problem, when I open the UI from the IP and port, everything looks nice, however when I use Nginx to forward the io and the port to a local domain the terminal is not editable ar all.

Screenshot 2023-01-20 at 2 51 30 PM

Thanks in advance.

Support other system init

Is it possible to support other init systems than systemd, such as openrc / dinit

Maybe a design like the custom nginx restart command, so you can easily restart nginx from the web ui

(Suggestion) Edit-Site Collapsible Locations

Hello. As the title says, I think it would be really nice and make the Edit-Site page look better if you could collapse the Locations and have it simply show the name of the location and its path when collapsed

nginx-ui: Error ReadPtyAndWriteWs read pty: read /dev/ptmx: input/output error

Hi,
I am running ngix-ui on redhat 8 and can access all of the feature offer over GUI, except "terminal". when i click to access terminal, i am getting below Error

nginx-ui: Error ReadPtyAndWriteWs read pty: read /dev/ptmx: input/output error

I tried basic troubleshooting including disabling selinux, but no luck. Please suggest how to proceed next..!

Problem with conditionals

Hi, I found a problem that I think is new, because this configuration was already working, but yesterday I edited a Site and a problem appeared.
My configuration has several ifs inside the location part.
For example:

location /XXXX/ {
        proxy_pass YYYY
       ....
        if ($allowed_country = no) {        return 444; }
    }

But when I re-edit the site, in the editor it becomes:

location /XXXX/ {
        proxy_pass YYYY
       ....
        if ($allowed_country = no);
        return 444;
    }

And I get an error when I try to save:

Nginx Configuration Parse Error
nginx: [emerg] directive "if" has no opening "{" in /etc/nginx/sites-enabled/tkl-default:83 nginx: configuration file /etc/nginx/nginx.conf test failed 

Any ideas why?
Thank you!

Auto correcting code is broken in advance mode

Autocorrecting in code editor in advanced mode is broken

You can give the opportunity to configure automatic correction or apply it at the click of a button.

image

Example set code:

  add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;

    add_header Referrer-Policy "no-referrer" always;
    add_header X-Content-Type-Options "nosniff" always;
    add_header X-Download-Options "noopen" always;
    add_header X-Frame-Options "SAMEORIGIN" always;
    add_header X-Permitted-Cross-Domain-Policies "none" always;
    add_header X-Robots-Tag "none" always;
    add_header X-XSS-Protection "1; mode=block" always;

    fastcgi_hide_header X-Powered-By;


   fastcgi_buffers 64 4K;
    gzip on;
    gzip_vary on;
    gzip_comp_level 4;
    gzip_min_length 256;
    gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
   gzip_types application/atom+xml
   application/javascript
   application/json application/ld+json
   application/manifest+json
   application/rss+xml
   application/vnd.geo+json
   application/vnd.ms-fontobject
   application/x-font-ttf
   application/x-web-app-manifest+json
   application/xhtml+xml
   application/xml
   font/opentype
   image/bmp
   image/svg+xml
   image/x-icon
   text/cache-manifest
   text/css text/plain
   text/vcard
   text/vnd.rim.location.xloc
   text/vtt
   text/x-component
   text/x-cross-domain-policy;

OpenWrt 中无法执行, -ash: ./nginx-ui: not found

系统
主机名 OpenWrt
型号 AMD Ryzen 7 5700U with Radeon Graphics : 4 Core 16 Thread (CpuMark : 129514.455702 Scores)
CPU 信息 1810.579 MHz
固件版本 OpenWrt R20.12.12 / Mask Ver.D201231 / LuCI Master (git-20.343.54716-6fc079f)
内核版本 5.4.85

root@OpenWrt:~/nginx-ui# ls
README-zh_CN.md              app.ini                      nginx-ui-linux-amd64.tar.gz
README.md                    nginx-ui
root@OpenWrt:~/nginx-ui# ./nginx-ui
-ash: ./nginx-ui: not found
root@OpenWrt:~/nginx-ui#

Support Cluster Management | 支持集群管理

产品如果可以支持维护Nginx集群,会让整个产品上升好几个level。比如添加多个节点,组成一个集群,配置存放到git上,修改配置后提交到git,并可以小流量更新到集群中nginx节点上等。
建议参考的产品设计:
1、携程的zeus:https://github.com/ctripcorp/zeus
2、点评的camel:https://github.com/dianping/camel
希望会有启发。。

——————————————-

If this product could support maintaining an Nginx cluster, it would elevate the entire product by several levels. For example, adding multiple nodes to form a cluster, storing configurations in Git, submitting configuration changes to Git, and performing rolling updates to the Nginx nodes in the cluster.

I recommend referring to the following product designs for inspiration:

  1. Zeus by Ctrip: https://github.com/ctripcorp/zeus
  2. Camel by Dianping: https://github.com/dianping/camel

I hope these will provide useful insights.

Missing /etc/nginx/ssl

Simple issue:
On my ubuntu, the ssl folder in /etc/nginx/ does not exist, when I was using the let's encrypt auto certificate.

The easy way to fix it is just to make sure the ssl folder in /etc/nginx/ is created.

sudo mkdir /etc/nginx/ssl

feat: Config/site templates

Predefined templates for creating sites.

EX: Reverse Proxy site template, PHP Application site template, etc.

Docker 支持

如标题所述,未来会考虑支持 Docker 方式部署嘛?

网站管理操作的 ‘启用/禁用’ 按钮点击后不会自动刷新显示

如标题所示,刚刚发现点击 启用/禁用 按钮后,它不会自动刷新显示,需要手动刷新。

比如:点击 禁用 后,需要手动刷新页面才会变成显示启用。但是,虽然不刷新页面的话,显示的字不会变,但它的功能是会正常变化的,也就是如下图所示时,我再次点击 禁用 按钮,网站会正常启用,反之亦然:

image

Docker 映射静态页面部署文件夹

Docker 部署时,是不是可以映射出一个特定文件夹来支持静态页面的部署,然后或许还可以在添加站点的界面上提示下路径什么的(~

添加站点功能导致404

因站点目前已404无法做相关截图,见谅。
我在演示站点中使用添加网站功能,随便输入字符单击下一步后报错。这可能是导致目前站点404的原因,这可能是个漏洞,没有对用户输入过滤。并且页面css似乎有问题,可能是设计出错。
如果可以我喜欢能够提供一些建议,比如:反向代理、负载均衡、站点流量统计等

database is locked

The webui show ‘Server error’, and it won't start

Here is the logs
2023/02/11 19:55:17 /home/runner/work/nginx-ui/nginx-ui/server/model/model.go:43 database is locked [5005.834ms] [rows:0] CREATE TABLE config_backups (id integer,created_at datetime,updated_at datetime,deleted_at datetime,name text,file_path text,content text,PRIMARY KEY (id`))
2023/02/11 19:55:17 database is locked
2023/02/11 19:55:18 [notice] 9#9: using the "epoll" event method
2023/02/11 19:55:18 [notice] 9#9: nginx/1.23.1
2023/02/11 19:55:18 [notice] 9#9: built by gcc 10.2.1 20210110 (Debian 10.2.1-6)
2023/02/11 19:55:18 [notice] 9#9: OS: Linux 5.10.0-13-amd64
2023/02/11 19:55:18 [notice] 9#9: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2023/02/11 19:55:18 [notice] 17#17: start worker processes
2023/02/11 19:55:18 [notice] 17#17: start worker process 18
2023/02/11 19:55:18 [notice] 17#17: start worker process 19
2023/02/11 19:55:18 [notice] 17#17: start worker process 20
2023/02/11 19:55:18 [notice] 17#17: start worker process 21
2023/02/11 19:55:18 Nginx config dir path: /etc/nginx

2023/02/11 19:55:18 /home/runner/go/pkg/mod/gorm.io/driver/[email protected]/migrator.go:32
[1.026ms] [rows:-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="config_backups"

2023/02/11 19:55:23 /home/runner/work/nginx-ui/nginx-ui/server/model/model.go:43 database is locked
[5005.234ms] [rows:0] CREATE TABLE config_backups (id integer,created_at datetime,updated_at datetime,deleted_at datetime,name text,file_path text,content text,PRIMARY KEY (id))
2023/02/11 19:55:23 database is locked
2023/02/11 19:55:24 [notice] 8#8: using the "epoll" event method
2023/02/11 19:55:24 [notice] 8#8: nginx/1.23.1
2023/02/11 19:55:24 [notice] 8#8: built by gcc 10.2.1 20210110 (Debian 10.2.1-6)
2023/02/11 19:55:24 [notice] 8#8: OS: Linux 5.10.0-13-amd64
2023/02/11 19:55:24 [notice] 8#8: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2023/02/11 19:55:24 [notice] 16#16: start worker processes
2023/02/11 19:55:24 [notice] 16#16: start worker process 17
2023/02/11 19:55:24 [notice] 16#16: start worker process 18
2023/02/11 19:55:24 [notice] 16#16: start worker process 19
2023/02/11 19:55:24 [notice] 16#16: start worker process 20
2023/02/11 19:55:24 Nginx config dir path: /etc/nginx

2023/02/11 19:55:24 /home/runner/go/pkg/mod/gorm.io/driver/[email protected]/migrator.go:32`

Add support for PHP-FPM

With the addition of PHP-FPM support, nginx-ui is basically a simple web control panel.

Users can quickly add a dynamic website.

No notification of config syntax errors

First of all, thanks for writing this great software! It will help me manage my servers with ease.

I prefer to edit my site config files using the 'Manage Configs' link (because my configs get messed up by the auto-formatting when using the 'Manage Sites' --> 'Modify' method). Upon saving the file in 'Manage Configs', the changes take effect immediately, which is very nice. But if I forget a trailing semicolon or mess something else up, I am completely unaware of it. Nginx-UI just reports success on the save.

My suggestion would be: upon any config change, run 'nginx -t' to make sure the config is valid. If the config is not valid, don't save the file, but instead make a modal pop up with the error message(s) and give options like "Don't save" or "Save anyway."

Note: When clicking the 'reload nginx' graphic at the top of the UI, the same issue exists. It will report success, even if config errors are detected. Again, a modal would be wonderful indicating the error(s) and have the options "Don't reload" or "Reload anyway."

The problem with both of these features as they are is that a particular site (with syntax errors) may stop functioning and you won't be aware of it. Fixing this would make this software so much more helpful.

Thanks for your consideration!

体验后的几个小建议

本来没准备新开 issues 的,但是写着写着发现好像又长了,就新开一个了(~

  1. 希望 站点列表 里的站点名称可修改,然后再加上一个站点描述:

image

  1. Server x 标签页这里我觉得可以为它增加一个标签设置,比如说:快速注释/启用、删除、自定义标签页名等

image

  1. Location 指令节点的注释可以像其他指令输入框一样触发焦点时弹出吗?这样子如果没有写注释的话,页面留白不会太大,然后删除按钮我觉得可以放在标题区域,这个 Location 标题栏我觉得还可以再来个自定义 Location 名称或者跟第二条类似的设置,而且这个注释框好像没有边框线条:

image

  1. 添加站点 时的默认 Locations 指令,我觉得可以改为当开启 TLS/SSL 并且 用 Let's Encrypt 对网站进行加密 功能启用时,再附加上,反之,关闭时自动注释或删除掉该条 Locations 指令:

image

  1. 如果已添加了自定义的 SSL 证书,此时如果启用 用 Let's Encrypt 对网站进行加密 功能时,可以加个二次确认或折叠隐藏吗?防止误点击之类,然后这个证书的 此前无效 时间可以改成 签发时间

image

  1. 希望可以在 站点添加/编辑 页面功能中,添加一个 强制 HTTPS/HSTS 访问 的功能
  2. 希望可以在 站点添加/编辑 页面功能中,添加一个快速反向代理的功能:简单输入路径和端口,自动插入标准的 Location 指令节点
  3. 希望可以在 站点添加/编辑 页面功能中,添加一个快速启用防盗链的功能,这个似乎还得做个区分,因为普通站点和反向代理站点的防盗链写法还不太一样
  4. 唔,最后这个应该算 Bug 吧,如果 Locations 功能块下已有 Location 指令,那么新增的 Location 是可以正常添加和保存的,但是,如果 Locations 功能块下的 Location 指令在新添加前(上一次保存)就已经删除掉了所有的 Location,那么将无法正常添加,具体表现为:点击修改站点 => 删除所有 Location 并保存 => 再次点击修改站点 => 点击 添加 Location => 输入相关信息 => 点击确认,此时页面无任何反应:

无法添加:

image

可正常添加保存:

image

Problem building the project for arm64

I was hoping to get little help from you.
I am trying to build your project for arm64 architecture.
When I compile with this command
CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build -ldflags "-X 'github.com/0xJacky/Nginx-UI/server/settings.buildTime=$(date +%s)'" -o nginx-ui -v main.go
and run it in docker I get this error below...

  • nginx-ui | /app/nginx-ui: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /app/nginx-ui)
  • nginx-ui | /app/nginx-ui: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /app/nginx-ui)
  • nginx-ui | /app/nginx-ui: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /app/nginx-ui)

Compiling with CGO_ENABLED=0 works but looks like sqlite requires cgo and I get error on creating the initial database.
Any chance you could point me to the right direction how to fix this?

Filter Logs

adding a way to filter the logs on the /nginx_log page, it helps a lot to visualize and understand some errors

Error with app.ini

My problem is that no matter what I put in the app.ini file, the service ignores it and runs with default values.

I always get the alert that the service is running in debug mode and the port is always 9000. I haven't done anything special, just run the installation script.

I am using ubuntu se 22.04.

关于非80端口下,Let's Encrypt功能的补充建议

关于非80端口下,Let's Encrypt功能的补充建议

使用场景

  1. 家用宽带-动态公网ip
  2. 80443端口被封
  3. 使用DDNS服务,将动态公网ip更新到阿里DNS解析
  4. 使用docker运行nginx-ui作内网服务的反向代理到公网

遇到问题

80端口被封的情况下,nginx-ui默认提供的证书申请方案无法实现(无法从外网访问到/.well-known/acme-challenge)

建议方案

以下为建议方案

1、参考Lego

可以参考Lego,提供基于DNS服务商的证书申请方案(Lego已经提供了很多的DNS服务商API调用)

2、使用基于DNS的text记录解析

通过在DNS解析里添加一条text记录来证明自己对该域名的拥有权,参考Letsencrypt通过DNS TXT记录来验证域名有效性

以上

本人是前端开发,如果前端需要支持可以联系我

Let's Encrypt 无法获取证书

Let's Encrypt 无法获取证书, 报错

issue cert fail to obtain: error: one or more domains had a problem: [test.com] acme: error: 400 :: urn:ietf:params:acme:error:connection :: 67.225.146.248: Fetching http://test.com/.well-known/acme-challenge/7-pueXIOSJ007LsQpwKUt1vofLDzsz-JIBb6YhT21Zo: Timeout during connect (likely firewall problem)

v1.7.6

NOTE

This verison refactored auto-cert module.
Please reopen auto-cert for the sites you need to renew certification automatically.

Features

  1. Store auto-cert log to db.
  2. Added restart nginx btn #72.
  3. Check if the site exists before add or rename.
  4. Added a shortcut that you can duplicate the site configuation.

Enhance

  1. Analytic initial and it's reactive style.

Fix

  1. NgxConfig block directives issue #77.
  2. Cron task not start after installed #74.
  3. If server_name contains _, this may cause an unexpected error when obtaining SAN certification.

Chore

  1. Increased certifications renewal frequency from once a month to once a week.
  2. Updated translations

For more change log about v.1.7.0 please check v1.7.0 Release Note.

需求:增加站点复制功能

  1. 目前站点的配置大部分都跟已有站点一致。
  2. 在没有站点模板的情况下,复制功能是比较容易实现的,希望增加一个复制按钮。
  3. 复制的站点默认禁用,修改server_name等信息后可自行启用。

运行错误 runtime error: invalid memory address or nil pointer dereference

您好,我在mac上编译成win exe 控制台运行报以下错误

2021/11/05 17:02:52 /*****/go/pkg/mod/gorm.io/driver/[email protected]/migrator.go:32
[0.000ms] [rows:-] SELECT count(
) FROM sqlite_master WHERE type='table' AND name="config_backups"
panic: runtime error: invalid memory address or nil pointer dereference
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x3cfbce]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.