0

我在尝试访问 GitBucket 网页时遇到问题,因此我可以执行系统管理员职责。我无法从服务器控制台上的 FireFox 打开它,也无法从远程 PC 打开它。这是第一次安装在新的 Ubuntu 20.04 系统上。ssh 正在工作,因为我可以打开系统的 SSH 会话。我安装了以下内容:

  • GitBucket
  • NGINX
  • MySQL 8,我删除并安装 MySQL 5.7

我的 NGINX 配置文件:

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
        worker_connections 768;
        # multi_accept on;
}

http {

        ##
        # Basic Settings
        ##

        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        # server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ##
        # SSL Settings
        ##

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
        ssl_prefer_server_ciphers on;

        ##
        # Logging Settings
        ##

        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;

        ##
        # Gzip Settings
        ##

        gzip on;

        # gzip_vary on;
        # gzip_proxied any;
        # gzip_comp_level 6;
        # gzip_buffers 16 8k;
        # gzip_http_version 1.1;
        # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

        ##
        # Virtual Host Configs
        ##

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


#mail {
#       # See sample authentication script at:
#       # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
#       # auth_http localhost/auth.php;
#       # pop3_capabilities "TOP" "USER";
#       # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
#       server {
#               listen     localhost:110;
#               protocol   pop3;
#               proxy      on;
#       }
#
#       server {
#               listen     localhost:143;
#               protocol   imap;
#               proxy      on;
#       }
#}

我的 /etc/nginx/sites-enabled/gitbuck 文件是:

server {
    listen   80; # The default is 80 but this here if you want to change it.
    server_name abt33.rsint.net;

    location / {
        proxy_pass              http://localhost:8080;
        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_connect_timeout   150;
        proxy_send_timeout      100;
        proxy_read_timeout      100;
        proxy_buffers           4 32k;
        client_max_body_size    500m; # Big number is we can post big commits.
        client_body_buffer_size 128k;
    }
}

还有我的防火墙:

Status: active

To                         Action      From
--                         ------      ----
3389                       ALLOW       192.168.33.0/24
3389                       ALLOW       Anywhere
3389/tcp                   ALLOW       Anywhere
20,21,10000:10100/tcp      ALLOW       Anywhere
3306/tcp                   ALLOW       Anywhere
3306                       ALLOW       Anywhere
OpenSSH                    ALLOW       Anywhere
80/tcp                     ALLOW       Anywhere
80                         ALLOW       Anywhere
8080                       ALLOW       Anywhere
3389 (v6)                  ALLOW       Anywhere (v6)
3389/tcp (v6)              ALLOW       Anywhere (v6)
20,21,10000:10100/tcp (v6) ALLOW       Anywhere (v6)
3306/tcp (v6)              ALLOW       Anywhere (v6)
3306 (v6)                  ALLOW       Anywhere (v6)
OpenSSH (v6)               ALLOW       Anywhere (v6)
80/tcp (v6)                ALLOW       Anywhere (v6)
80 (v6)                    ALLOW       Anywhere (v6)
8080 (v6)                  ALLOW       Anywhere (v6)

GitBucket 服务正在运行。我已经检查了所有我能想到的日志,但我找不到关于正在发生的事情的线索。

谢谢,道格

4

1 回答 1

0

事实证明,我需要在防火墙中打开端口 443。现在,如果我使用http://abt33.rsint.net:8080不是https:// ,它似乎可以工作,我不知道为什么。

道格

于 2021-04-07T15:35:32.750 回答