简体   繁体   English

在 Ubuntu 20.04 上安装 GitBucket

[英]Installation of GitBucket on Ubuntu 20.04

I have a problem trying to access the GitBucket web page so I can do sys admin duties.我在尝试访问 GitBucket web 页面时遇到问题,因此我可以执行系统管理员职责。 I cannot open it from FireFox on the server console nor can I open it from a remote PC.我无法从服务器控制台上的 FireFox 打开它,也无法从远程 PC 上打开它。 The is a first time install on a new Ubuntu 20.04 system.这是第一次安装在新的 Ubuntu 20.04 系统上。 ssh is working as I can open a SSH session to the system. ssh 正在工作,因为我可以向系统打开 SSH session。 I installed the following:我安装了以下内容:

  • GitBucket GitBucket
  • NGINX NGINX
  • MySQL 8, which I removed and install MySQL 5.7 MySQL 8,我将其卸下并安装 MySQL 5.7

My NGINX conf file:我的 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;
#       }
#}

And my /etc/nginx/sites-enabled/gitbuck file is:我的 /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;
    }
}

And my firewall:还有我的防火墙:

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)

The GitBucket service is running. GitBucket 服务正在运行。 I have checked all the logs I can think of and I cannot find a clue as to what is happening.我已经检查了所有我能想到的日志,但我找不到关于正在发生的事情的线索。

Thanks, Doug谢谢,道格

As it turns out I needed to open port 443 in my firewall.事实证明,我需要在防火墙中打开端口 443。 Now it seems to work if I use http://abt33.rsint.net:8080 and NOT https:// I do not know why.现在,如果我使用http://abt33.rsint.net:8080不是https:// 我不知道为什么,它似乎可以工作。

Doug道格

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM