在Ubuntu 20.04上安装GitBucket



我在尝试访问GitBucket网页时遇到问题,因此我可以执行系统管理职责。我无法从服务器控制台上的FireFox打开它,也无法从远程电脑打开它。这是第一次在新的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服务正在运行。我已经检查了我能想到的所有日志,但我找不到发生了什么的线索。

事实证明,我需要打开防火墙中的443端口。现在,如果我使用http://abt33.rsint.net:8080和NOThttps://我不知道为什么。

相关内容

  • 没有找到相关文章

最新更新