{"id":5814,"date":"2024-02-12T20:34:54","date_gmt":"2024-02-12T19:34:54","guid":{"rendered":"https:\/\/ekiwi.de\/?p=5814"},"modified":"2024-02-12T20:39:05","modified_gmt":"2024-02-12T19:39:05","slug":"linux-activate-apache2-htaccess-files","status":"publish","type":"post","link":"https:\/\/ekiwi.de\/en\/index.php\/5814\/linux-activate-apache2-htaccess-files\/","title":{"rendered":"Linux: Activate Apache2 .htaccess files"},"content":{"rendered":"<p>Activate .htaccess files in Linux, Ubuntu.<\/p>\n<p><!--more--><\/p>\n<p>At the weekend I installed Nextcloud on my new server again. When I checked the system, I was told that the data directories were accessible because the .htaccess files were not being respected.<\/p>\n<p>A freshly installed Apache web server does not have any .htaccess files activated at first, this has to be done in the configuration file.<\/p>\n<p>To do this, we edit the &#8220;apache2.conf&#8221; in the &#8220;\/etc\/apache2&#8221; directory:<\/p>\n<pre>\r\nsudo vim \/etc\/apache2\/apache2.conf\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/02\/apache_htaccess_1.png\" alt=\"\" width=\"484\" height=\"93\" class=\"alignnone size-full wp-image-5809\" srcset=\"\/wp-content\/uploads\/2024\/02\/apache_htaccess_1.png 484w, \/wp-content\/uploads\/2024\/02\/apache_htaccess_1-300x58.png 300w, \/wp-content\/uploads\/2024\/02\/apache_htaccess_1-480x93.png 480w\" sizes=\"auto, (max-width: 484px) 100vw, 484px\" \/><\/p>\n<p>Here we now scroll to the &#8220;Directory&#8221; entry for our web directory and set the value for &#8220;AllowOverride&#8221; to &#8220;All&#8221;. We then restart Apache.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/02\/apache_htaccess_2.png\" alt=\"\" width=\"747\" height=\"124\" class=\"alignnone size-full wp-image-5811\" srcset=\"\/wp-content\/uploads\/2024\/02\/apache_htaccess_2.png 747w, \/wp-content\/uploads\/2024\/02\/apache_htaccess_2-300x50.png 300w\" sizes=\"auto, (max-width: 747px) 100vw, 747px\" \/><\/p>","protected":false},"excerpt":{"rendered":"<p>Activate .htaccess files in Linux, Ubuntu.<\/p>\n","protected":false},"author":1,"featured_media":3088,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[884],"tags":[918,919],"class_list":["post-5814","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server-en","tag-apache-en","tag-linux-en"],"_links":{"self":[{"href":"https:\/\/ekiwi.de\/en\/index.php\/wp-json\/wp\/v2\/posts\/5814","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ekiwi.de\/en\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ekiwi.de\/en\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ekiwi.de\/en\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ekiwi.de\/en\/index.php\/wp-json\/wp\/v2\/comments?post=5814"}],"version-history":[{"count":0,"href":"https:\/\/ekiwi.de\/en\/index.php\/wp-json\/wp\/v2\/posts\/5814\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ekiwi.de\/en\/index.php\/wp-json\/wp\/v2\/media\/3088"}],"wp:attachment":[{"href":"https:\/\/ekiwi.de\/en\/index.php\/wp-json\/wp\/v2\/media?parent=5814"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ekiwi.de\/en\/index.php\/wp-json\/wp\/v2\/categories?post=5814"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ekiwi.de\/en\/index.php\/wp-json\/wp\/v2\/tags?post=5814"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}