amefs/quickbox-lite

如何更改dashboard端口?

Closed this issue · 2 comments

希望能添加对dashboard端口的设置,我使用端口映射80到外网81无法访问

amefs commented

可以直接修改 /etc/nginx/sites-enabled/default 中的监听端口

listen 81 default_server;
listen [::]:81 default_server;

如果你的443端口依然不能使用则还需要修改为如下内容,删除https支持,但在公开网络中不建议取消https加密:

server {
    listen 81 default_server;
    listen [::]:81 default_server;
    server_name _;

    location /.well-known {
      alias /srv/.well-known;
      allow all;
      default_type "text/plain";
      autoindex    on;
    }

    client_max_body_size 40M;
    server_tokens off;
    root /srv/;

    index index.html index.php index.htm;

    # resolve multi-redirect
    if ($request_uri ~ "^[^?]*?//") {
    rewrite "^" $scheme://$host$uri permanent;
    }

    location ~ \.php$
    {
      fastcgi_read_timeout 240;
      fastcgi_pass  unix:/run/php/php7.4-fpm.sock;
      include snippets/fastcgi-php.conf;
      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
    include /etc/nginx/apps/*.conf;

    location ~ /\.ht {
        deny all;
    }

    location /fancyindex {

    }
}