リバース:サブドメイン+ nginxの+はそうのようなgitlab +ウェブサイト+ジェンキンスを実行する方法の完全なガイドや説明のためのインターネットを検索するプロキシ+ジェンキンス+ gitlab
- ジェンキンス@ jenkins.domain.com
- GitLab @ gitlab.domain.com
- 静的なウェブサイトの@ domain.comサーバー上の
すなわち特定のサービスおよびサブドメインを経由してそれらへのアクセスを持って、私が発見し、答えていません。
我々は、Ubuntuを使用してnginxのと私たちはnginxのウェルカムページを見ることができるドメイン名example.comと当社のIPアドレス111.111.111.111に
を指しているレコードを持っています。
サブドメインはどのように解決されていますか?それらを作成する場所? サーバーがDNSになることはできますか? 最終的なnginx confとは何でしょうか?
それは静的なウェブサイトを提供するために必要とジェンキンスためと404
server {
access_log logs/landing.access.log;
server_name example.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
location/{
root /var/www/html/landing;
index index.html;
}
location /app {
proxy_pass http://localhost:9981;
}
location ^~ /jenkins {
proxy_pass http://127.0.0.1:9990;
proxy_read_timeout 90;
# Fix the “It appears that your reverse proxy set up is broken" error.
proxy_redirect http://127.0.0.1:9990 $scheme://example.com;
# Optionally, require HTTP basic auth.
# auth_basic "Please authenticate to use Jenkins";
# auth_basic_user_file /opt/nginx/htpasswd;
}
}
の結果は、別のサーバブロックがそこすべきであると静的なファイルを提供しようとするので、この1つは、間違っていますか?私がexample.comないsubdomain.example.com経由でアクセスしようとしているよう
server {
access_log logs/jenkins.access.log;
server_name jenkins example.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:9990;
}
しかし、この1つは別の理由のために404を与えるが、私は、最初のもので、この第二ブロックの衝突を想定しています。また、subdomain.example.comは解決されません。
誰が最終的にサブドメインを解決するのですか? –
あなたのネームサーバーは、各サブドメインのnginxサーバーを指しています。 –
サブドメインはどこにでも定義する必要がありますか?私はnginxのサーバーブロックでそれらを書く場合? –