{"id":178,"date":"2013-03-05T14:06:04","date_gmt":"2013-03-05T13:06:04","guid":{"rendered":"http:\/\/michlstechblog.info\/blog\/?p=178"},"modified":"2013-07-30T22:26:44","modified_gmt":"2013-07-30T20:26:44","slug":"apache-403-issue-on-alias-directive-and-a-virtual-directory","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/apache-403-issue-on-alias-directive-and-a-virtual-directory\/","title":{"rendered":"Apache: Alias directive for virtual directory returns HTTP Error 403"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_178 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_178')){$('.twoclick_social_bookmarks_post_178').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"Apache%3A%20Alias%20directive%20for%20virtual%20directory%20returns%20HTTP%20Error%20403\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0AI%20have%20added%20a%20virtual%20directory%20to%20an%20apache%20web%20server%20and%20the%20virtual%20directory%20is%20located%20outside%20the%20document%20root.%20I%20configured%20the%20httpd.conf%20how%20it%20is%20decripted%20in%20the%20apache%20doc%0D%0A%0D%0AWhen%20I%20access%20the%20virtual%20directory%20an%20error%20%22Access%20forbidden%21%C2%A0Error%20403%22%20occured.%20The%20config%20seems%20to%20ok%3A%0D%0A%0D%0A%5Bsourcecode%20language%3D%22plain%22%5D%0D%0AAlias%20%2Fvirtualdirectory%2F%20%26quot%3BD%3A%2Fuser%2Fwww%2Fvirtual%2F%26quot%3B%20...\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/apache-403-issue-on-alias-directive-and-a-virtual-directory\\\/\",\"post_id\":178,\"post_title_referrer_track\":\"Apache%3A+Alias+directive+for+virtual+directory+returns+HTTP+Error+403\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>I have added a virtual directory to an apache web server and the virtual directory is located outside the document root. I configured the httpd.conf how it is decripted in the <a title=\"Apache documention for module Alias\" href=\"http:\/\/httpd.apache.org\/docs\/2.0\/mod\/mod_alias.html#alias\" target=\"_blank\">apache doc<\/a><\/p>\n<p>When I access the virtual directory an error &#8220;Access forbidden!\u00a0Error 403&#8221; occured. The config seems to ok:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nAlias \/virtualdirectory\/ &quot;D:\/user\/www\/virtual\/&quot;\r\n&lt;Directory &quot;D:\/user\/www\/virtual\/&quot;&gt;\r\n   Options Indexes FollowSymLinks MultiViews ExecCGI\r\n   AllowOverride All\r\n   Order allow,deny\r\n   Allow from all\r\n&lt;\/Directory&gt;\r\n<\/pre>\n<h3>Solution:<\/h3>\n<p>The default apache configration is very restrictive. It do not allow to access directories without authentication. This is defined in the Directory section of httpd.conf:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n\r\n&lt;Directory&gt;\r\n   AllowOverride none\r\n   Require all denied\r\n&lt;\/Directory&gt;\r\n\r\n<\/pre>\n<p>Add a &#8220;require all granted&#8221; directive to your virtual directory section will grant the access.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nAlias \/virtualdirectory\/ &quot;D:\/user\/www\/virtual\/&quot;\r\n&lt;Directory &quot;D:\/user\/www\/virtual\/&quot;&gt;\r\n   Options Indexes FollowSymLinks MultiViews ExecCGI\r\n   AllowOverride All\r\n   Order allow,deny\r\n   Allow from all\r\n   Require all granted\r\n&lt;\/Directory&gt;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Hi, I have added a virtual directory to an apache web server and the virtual directory is located outside the document root. I configured the httpd.conf how it is decripted in the apache doc When I access the virtual directory an error &#8220;Access forbidden!\u00a0Error 403&#8221; occured. The config seems to ok: Alias \/virtualdirectory\/ &quot;D:\/user\/www\/virtual\/&quot; &lt;Directory &hellip; <a href=\"https:\/\/michlstechblog.info\/blog\/apache-403-issue-on-alias-directive-and-a-virtual-directory\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Apache: Alias directive for virtual directory returns HTTP Error 403<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39,46],"tags":[40,41,859,45,43,42,44],"class_list":["post-178","post","type-post","status-publish","format-standard","hentry","category-apache","category-knowhow","tag-40","tag-access-forbidden","tag-apache","tag-directory","tag-documentroot","tag-outside","tag-virtual"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/178","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=178"}],"version-history":[{"count":31,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/178\/revisions"}],"predecessor-version":[{"id":1064,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/178\/revisions\/1064"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}