{"id":141,"date":"2023-05-25T09:06:33","date_gmt":"2023-05-25T06:06:33","guid":{"rendered":"https:\/\/info.9ru.su\/?p=141"},"modified":"2023-07-06T12:20:13","modified_gmt":"2023-07-06T09:20:13","slug":"%d1%83%d1%81%d1%82%d0%b0%d0%bd%d0%be%d0%b2%d0%ba%d0%b0-gitlab-%d0%bd%d0%b0-ubuntu-22-04-%d0%bf%d0%be%d1%88%d0%b0%d0%b3%d0%be%d0%b2%d0%b0%d1%8f-%d0%b8%d0%bd%d1%81%d1%82%d1%80%d1%83%d0%ba%d1%86%d0%b8","status":"publish","type":"post","link":"https:\/\/info.9ru.su\/?p=141","title":{"rendered":"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Gitlab \u043d\u0430 Ubuntu 22.04: \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p><a href=\"https:\/\/timeweb.cloud\/tutorials\/git\/ustanovka-gitlab-na-ubuntu-22-04\">https:\/\/timeweb.cloud\/tutorials\/git\/ustanovka-gitlab-na-ubuntu-22-04<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/oliversmith.io\/technology\/2014\/07\/18\/reverse-proxying-gitlab-with-apache-and-ssl\/\">https:\/\/oliversmith.io\/technology\/2014\/07\/18\/reverse-proxying-gitlab-with-apache-and-ssl\/<\/a><\/p>\n\n\n\n<p>GitLab \u2013 \u044d\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0441 \u0446\u0435\u043b\u044c\u044e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u043c\u0438 Git. \u041e\u043d \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u0435\u0442 \u0438 \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430, \u0435\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f.&nbsp;<\/p>\n\n\n\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b GitLab:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438;<\/li>\n\n\n\n<li>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435, \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u043e\u043c \u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432;<\/li>\n\n\n\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043a\u043e\u0434\u0430 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0438 \u043e\u0442\u0447\u0435\u0442\u043d\u043e\u0441\u0442\u0438;<\/li>\n\n\n\n<li>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u043c\u0435\u0442\u0440\u0438\u043a;<\/li>\n\n\n\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0435\u0439.<\/li>\n<\/ul>\n\n\n\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u043d\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u042d\u0442\u043e \u043b\u0438\u0448\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430\u044f \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u041f\u041e \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0439 \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n\n\n\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 GitLab \u043d\u0430 Ubuntu \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0435\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"predvaritelnye-trebovaniya\"><a href=\"https:\/\/timeweb.cloud\/tutorials\/git\/ustanovka-gitlab-na-ubuntu-22-04#predvaritelnye-trebovaniya\"><\/a>\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f<\/h2>\n\n\n\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u0445 \u0434\u043b\u044f<strong> <\/strong>\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 GitLab \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n\n\n\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0435\u0440, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043b\u0438\u0431\u043e \u043d\u0430 \u043b\u0438\u0447\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435, \u043b\u0438\u0431\u043e \u0432 <a class=\"\" href=\"https:\/\/timeweb.cloud\/vds-vps\">\u043e\u0431\u043b\u0430\u043a\u0435<\/a>. \u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043a GitLab, \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043d\u0430\u0431\u0436\u0435\u043d:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u0427\u0435\u0442\u044b\u0440\u0435\u0445\u044a\u044f\u0434\u0435\u0440\u043d\u044b\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c (\u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u043e 500 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439);<\/li>\n\n\n\n<li>4 \u0413\u0411 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 (\u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u043e 500 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439);<\/li>\n\n\n\n<li>\u041e\u0421 Ubuntu 22.04.<\/li>\n<\/ol>\n\n\n\n<p>\u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043c\u044f test.com.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"shag-1--dobavlenie-neobhodimyh-zavisimostej\"><a href=\"https:\/\/timeweb.cloud\/tutorials\/git\/ustanovka-gitlab-na-ubuntu-22-04#shag-1--dobavlenie-neobhodimyh-zavisimostej\"><\/a>\u0428\u0430\u0433 1. \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439<\/h2>\n\n\n\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u044d\u0442\u0430\u043f\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u0434\u043b\u044f GitLab \u041f\u041e. \u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 Ubuntu.<\/p>\n\n\n\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u0432:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get update<\/code><\/pre>\n\n\n\n<p>\u0410 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install -y curl openssh-server ca-certificates tzdata perl<\/code><\/pre>\n\n\n\n<p>\u0415\u0441\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u044c \u041f\u041e \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0443\u0436\u0435 \u0431\u044b\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0440\u0430\u043d\u0435\u0435. \u041b\u0443\u0447\u0448\u0438\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u044e \u0441\u0442\u0440\u043e\u043a\u0443, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0443\u044e \u0432\u044b\u0448\u0435, \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e.<\/p>\n\n\n\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u2014 \u044d\u0442\u043e Postfix (\u0438\u043b\u0438 Sendmail), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043b\u0443\u0436\u0438\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u043d\u0430 email:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install -y postfix<\/code><\/pre>\n\n\n\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432 \u043e\u0442\u043a\u0440\u044b\u0432\u0448\u0435\u043c\u0441\u044f \u043e\u043a\u043d\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u00ab\u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u0441\u0430\u0439\u0442\u00bb, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u043d\u0438\u0436\u0435.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u0414\u0430\u043b\u0435\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0434\u043e\u043c\u0435\u043d \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u2014 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 test.com.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"shag-2--ustanovka-gitlab\">\u0428\u0430\u0433 2. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 GitLab<\/h2>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c GitLab. \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/tmp\ncurl -LO https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ce\/script.deb.sh<\/code><\/pre>\n\n\n\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438 \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u0432\u0432\u043e\u0434\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo less \/tmp\/script.deb.sh<\/code><\/pre>\n\n\n\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0441 \u0432\u0441\u0451 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442, \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u0441\u043a\u0440\u0438\u043f\u0442\u0430:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo bash \/tmp\/script.deb.sh<\/code><\/pre>\n\n\n\n<p>\u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 GitLab:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install gitlab-ce<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"shag-3--nastrojka-brandmauehra\">\u0428\u0430\u0433 3. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0431\u0440\u0430\u043d\u0434\u043c\u0430\u0443\u044d\u0440\u0430<\/h2>\n\n\n\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u043e \u043a\u0430\u043a\u0438\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d \u0442\u0440\u0430\u0444\u0438\u043a. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0442 \u0431\u0440\u0430\u043d\u0434\u043c\u0430\u0443\u044d\u0440\u0430, \u0432\u0432\u043e\u0434\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw status<\/code><\/pre>\n\n\n\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u043f\u043e \u0440\u0438\u0441\u0443\u043d\u043a\u0443, \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d \u0442\u0440\u0430\u0444\u0438\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 SSH. \u0412\u0434\u043e\u0431\u0430\u0432\u043e\u043a \u043a SSH, \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u043c HTTP \u0438 HTTPS \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 GitLab \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u043e\u043c.<\/p>\n\n\n\n<p>\u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f HTTP:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw allow http<\/code><\/pre>\n\n\n\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c HTTPS:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw allow https<\/code><\/pre>\n\n\n\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u043d\u0435\u0441\u0435\u043d\u043d\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0442\u0430\u0442\u0443\u0442 \u0431\u0440\u0430\u043d\u0434\u043c\u0430\u0443\u044d\u0440\u0430. \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u043f\u043e \u0440\u0438\u0441\u0443\u043d\u043a\u0443 \u043d\u0438\u0436\u0435, \u0432\u0441\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0442\u0443\u043f\u0438\u043b\u0438 \u0432 \u0441\u0438\u043b\u0443.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"shag-4--nastrojka-fajla-konfiguracii\">\u0428\u0430\u0433 4. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/h2>\n\n\n\n<p>\u041f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c GitLab \u0432\u0430\u0436\u043d\u043e \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0432 \u0444\u0430\u0439\u043b\u0435 <code>gitlab.rb<\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 <code>nano<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/etc\/gitlab\/gitlab.rb<\/code><\/pre>\n\n\n\n<p>\u0412 \u043e\u0442\u043a\u0440\u044b\u0432\u0448\u0435\u043c\u0441\u044f \u0444\u0430\u0439\u043b\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u043d\u0438\u0436\u0435 \u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0438\u043c\u044f \u0434\u043e\u043c\u0435\u043d\u0430 \u043d\u0430 test.com. \u0423 \u0432\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0434\u0440\u0443\u0433\u043e\u0435 \u0438\u043c\u044f. \u0422\u0430\u043a\u0436\u0435 \u0441\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u2014 HTTPS.\u00a0<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0439\u0434\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443, \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u043d\u0438\u0436\u0435, \u0438 \u0432\u0441\u0442\u0430\u0432\u0438\u043c \u0432 \u043f\u0443\u0441\u0442\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 \u043f\u043e\u0441\u043b\u0435 \u0437\u043d\u0430\u043a\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 email. \u042d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u0434\u043e\u043c\u0435\u043d\u043e\u043c. \u0422\u0430\u043a\u0436\u0435 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 (CTRL+O) \u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 (CTRL+X). \u0427\u0442\u043e\u0431\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u043d\u0435\u0441\u043b\u0430 \u0432\u0441\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0440\u0435\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo gitlab-ctl reconfigure<\/pre>\n\n\n\n<p>\u0417\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0441\u0442 \u0432\u0441\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043d\u043e \u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442 Let\u2019s Encrypt \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Configuring SSL and Gitlab through an Apache Reverse Proxy<\/h1>\n\n\n\n<p>18 Jul 2014<\/p>\n\n\n\n<p>I\u2019ve recently started to use Gitlab as an alternative to a Github paid account for projects I don\u2019t wish to make public. I wanted to install Gitlab on a server which is used for a few other applications which all use Apache, while Gitlab is really easy to install it installs nginx by default and expects to run on port 80. Normally in this situation I would configure Nginx to point to a non standard port, proxy through apache on the same server and terminate the SSL at apache, however there are some quirks in Gitlab which make this difficult; in this post I\u2019ll describe how to proxy Gitlab through apache using SSL.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"the-problem\">The Problem<\/h2>\n\n\n\n<p>While Gitlab can be manually installed to work with apache this makes upgrades \/ changes difficult, it comes with a very nice Chef based installer but it assumes it\u2019s the only thing installed, if a simple HTTPS proxy is configured (terminating the SLL at Apache) then Gitlab will still mix in some non SSL URLs as it thinks it\u2019s still using an unencrypted connection, while not a huge risk this is untidy and annoyed me.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"the-solution\">The Solution<\/h2>\n\n\n\n<p>The solution is to configure Gitlab to use SSL too and enable an SSL proxy in Apache, this involves defining options in two files:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"gitlabrb\">gitlab.rb<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>external_url 'https:\/\/&lt;url&gt;:4443'\nnginx&#91;'ssl_certificate'] = \"\/etc\/ssl\/localcerts\/&lt;certname&gt;.crt\"\nnginx&#91;'ssl_certificate_key'] = \"\/etc\/ssl\/localcerts\/&lt;keyname&gt;.key\"<\/code><\/pre>\n\n\n\n<p>*After which don\u2019t forget to run<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> sudo gitlab-ctl reconfigure <\/code><\/pre>\n\n\n\n<p>to push the changes into the nginx config*<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"apache-vhost\">Apache vhost<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;VirtualHost &lt;ip&gt;:443&gt;\n\n        ServerName &lt;server url&gt;\n        SSLEngine on\n        SSLCertificateFile \/etc\/ssl\/localcerts\/&lt;certname&gt;.crt\n        SSLCertificateKeyFile \/etc\/ssl\/localcerts\/&lt;keyname&gt;.key\n    &lt;Proxy *&gt;\n        Order deny,allow\n        Allow from all\n    &lt;\/Proxy&gt;\n\n\tSSLProxyEngine on\n    ProxyRequests Off\n    ProxyPass \/ https:\/\/&lt;url&gt;:4443\/\n    ProxyPassReverse \/ https:\/\/&lt;url&gt;\/\n\n    Header edit Location ^http:\/\/&lt;url&gt;\/ https:\/\/&lt;url&gt;\/\n\tRequestHeader set X-Forwarded-Proto \"https\"\n\n&lt;\/VirtualHost&gt;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/timeweb.cloud\/tutorials\/git\/ustanovka-gitlab-na-ubuntu-22-04 https:\/\/oliversmith.io\/technology\/2014\/07\/18\/reverse-proxying-gitlab-with-apache-and-ssl\/ GitLab \u2013 \u044d\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0441 \u0446\u0435\u043b\u044c\u044e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u043c\u0438 Git. \u041e\u043d \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u0435\u0442 \u0438 \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-141","post","type-post","status-publish","format-standard","hentry","category-12"],"_links":{"self":[{"href":"https:\/\/info.9ru.su\/index.php?rest_route=\/wp\/v2\/posts\/141","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/info.9ru.su\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/info.9ru.su\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/info.9ru.su\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/info.9ru.su\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=141"}],"version-history":[{"count":4,"href":"https:\/\/info.9ru.su\/index.php?rest_route=\/wp\/v2\/posts\/141\/revisions"}],"predecessor-version":[{"id":155,"href":"https:\/\/info.9ru.su\/index.php?rest_route=\/wp\/v2\/posts\/141\/revisions\/155"}],"wp:attachment":[{"href":"https:\/\/info.9ru.su\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/info.9ru.su\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=141"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/info.9ru.su\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}