{"id":3674,"date":"2017-09-13T18:10:46","date_gmt":"2017-09-13T15:10:46","guid":{"rendered":"http:\/\/mummila.net\/nuudelisoppa\/?p=3674"},"modified":"2017-09-13T18:10:46","modified_gmt":"2017-09-13T15:10:46","slug":"apache-2-4-gitlab-omnibus-ce-with-a-relative-url-404-not-found-422-the-change-you-requested-was-rejected","status":"publish","type":"post","link":"https:\/\/mummila.net\/nuudelisoppa\/2017\/09\/13\/apache-2-4-gitlab-omnibus-ce-with-a-relative-url-404-not-found-422-the-change-you-requested-was-rejected\/","title":{"rendered":"Apache 2.4 + Gitlab Omnibus (CE) with a relative URL: 404 (not found), 422 (The change you requested was rejected)"},"content":{"rendered":"<p>It&#8217;s been a painful month battling with this and I&#8217;m too tired to document everything thoroughly, so I&#8217;ll just throw this out there:<\/p>\n<pre><code># \"Note this config assumes unicorn is listening on default port 8080 and\r\n# gitlab-workhorse is listening on port 8181.\"\r\n\r\nAlias \/lab \"\/opt\/gitlab\/embedded\/service\/gitlab-rails\/public\"\r\n\r\n&lt;Directory \/opt\/gitlab\/embedded\/service\/gitlab-rails\/public&gt;\r\n    Include conf-available\/geoblock-non-fi.conf\r\n    \r\n    Options -MultiViews\r\n    #DirectoryIndex disabled\r\n&lt;\/Directory&gt;\r\n\r\n&lt;Location \/lab&gt;\r\n    Include conf-available\/geoblock-non-fi.conf\r\n    \r\n    ErrorDocument 404 \/404.html\r\n    ErrorDocument 422 \/422.html\r\n    ErrorDocument 500 \/500.html\r\n    ErrorDocument 502 \/502.html\r\n    ErrorDocument 503 \/503.html\r\n\r\n    RequestHeader set X-Forwarded-Proto https\r\n    Header set Strict-Transport-Security: \"max-age=15768000;includeSubdomains\"\r\n\r\n    ProxyPass \"http:\/\/127.0.0.1:8181\/lab\"\r\n    ProxyPassReverse \"http:\/\/127.0.0.1:8181\/lab\"\r\n&lt;\/Location&gt;<\/code><\/pre>\n<p>That one disabled line (<code>#DirectoryIndex disabled<\/code>) was required (uncommented) when I used the <a href=\"https:\/\/gitlab.com\/gitlab-org\/gitlab-recipes\/blob\/fbd343f7253aee677bf0726b984b10be2d2418b2\/web-server\/apache\/gitlab-apache24.conf\"><code>RewriteRules<\/code> version of the recipe<\/a>, otherwise it was <a href=\"https:\/\/gitlab.com\/gitlab-org\/gitlab-recipes\/issues\/55\">404 whenever logging in<\/a>.<\/p>\n<p>You also obviously need to either out-comment &#8220;<code>Include conf-available\/geoblock-non-fi.conf<\/code>&#8221; or add your own geoblocking rules in the file it references.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s been a painful month battling with this and I&#8217;m too tired to document everything thoroughly, so I&#8217;ll just throw this out there: # &#8220;Note this config assumes unicorn is listening on default port 8080 and # gitlab-workhorse is listening on port 8181.&#8221; Alias \/lab &#8220;\/opt\/gitlab\/embedded\/service\/gitlab-rails\/public&#8221; &lt;Directory \/opt\/gitlab\/embedded\/service\/gitlab-rails\/public&gt; Include conf-available\/geoblock-non-fi.conf Options -MultiViews #DirectoryIndex disabled &lt;\/Directory&gt; [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3674","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts\/3674","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/comments?post=3674"}],"version-history":[{"count":8,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts\/3674\/revisions"}],"predecessor-version":[{"id":3682,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts\/3674\/revisions\/3682"}],"wp:attachment":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/media?parent=3674"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/categories?post=3674"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/tags?post=3674"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}