{"id":827,"date":"2015-09-13T09:49:09","date_gmt":"2015-09-13T07:49:09","guid":{"rendered":"http:\/\/www.netexpertise.eu\/en\/?p=827"},"modified":"2021-05-23T09:07:37","modified_gmt":"2021-05-23T07:07:37","slug":"apache-proxy-permission-denied-503","status":"publish","type":"post","link":"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/apache-proxy-permission-denied-503.html","title":{"rendered":"Apache Reverse Proxy 503 Permission Denied"},"content":{"rendered":"\n<p><a href=\"\/en\/category\/misc\/apache\">Apache<\/a> configured as a reverse proxy forwards requests to a web backend. But your browser throws an enigmatic 503 error: \u201cService temporarily unavailable\u201d.<br><br><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"\/images\/503_Service_temporarily_unavailable.jpg\" alt=\"503 Service Temporarily Unavailable on Apache\"\/><\/figure><\/div>\n\n\n\n<p><br>The first thing I do is looking at the http logs in \/var\/log\/httpd\/ssl_error_log, where I am getting some permission issue:<br><em>(13)Permission denied: proxy: HTTP: attempt to connect to 192.168.1.250:8080 (*) failed<\/em><br><br>You may also get this error in the logs:<br><em>AH01114: HTTP: failed to make connection to backend<\/em><br><br>If <a href=\"https:\/\/www.redhat.com\/en\/topics\/linux\/what-is-selinux\" target=\"_blank\" rel=\"noreferrer noopener\">SELinux<\/a> i enabled on your system, it is most likely the root cause of your problem. SELinux denies Apache from initiating connections to the outside. You can check temporarily by turning off SELinux in \/etc\/selinux\/config. A reboot is required.<br><br>If confirmed, turn it back on to keep a higher security level, and add this rule exception:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo setsebool -P httpd_can_network_connect 1<\/code><\/pre>\n\n\n\n<p><br>This variable allows HTTPD processes and modules to connect to the network. There are other boolean variables adding restrictions to HTTPD. To get a list of them, run <em>getsebool -a | grep httpd<\/em>.<br>You will find some interesting variables in that list such as:<br>&#8211; httpd_can_network_connect_db (default off)<br>&#8211; httpd_enable_ftp_server (default off)<br>&#8211; httpd_enable_cgi (default on)<br>etc&#8230;<br><br>The -P switch makes the change persistant across reboots. You may need to restart Apache:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo systemctl restart httpd<\/code><\/pre>\n\n\n\n<p>This error is known and documented on the <a href=\"https:\/\/wiki.apache.org\/httpd\/13PermissionDenied\">Apache<\/a> website.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apache configured as a reverse proxy forwards requests to a web backend. But your browser throws an enigmatic 503 error: \u201cService temporarily unavailable\u201d. The first thing I do is looking at the http logs in \/var\/log\/httpd\/ssl_error_log, where I am getting some permission issue:(13)Permission denied: proxy: HTTP: attempt to connect to 192.168.1.250:8080 (*) failed You may [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[65,11],"tags":[390,386,372],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Netexpertise - Apache Reverse Proxy 503 Permission Denied<\/title>\n<meta name=\"description\" content=\"Your get a 503 Service Temporarily Unavailable when connecting to a website through an Apache reverse proxy? This may be related to SELinux\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/apache-proxy-permission-denied-503.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Netexpertise - Apache Reverse Proxy 503 Permission Denied\" \/>\n<meta property=\"og:description\" content=\"Your get a 503 Service Temporarily Unavailable when connecting to a website through an Apache reverse proxy? This may be related to SELinux\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/apache-proxy-permission-denied-503.html\" \/>\n<meta property=\"og:site_name\" content=\"Netexpertise\" \/>\n<meta property=\"article:published_time\" content=\"2015-09-13T07:49:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-23T07:07:37+00:00\" \/>\n<meta name=\"author\" content=\"dave\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@netexpertise\" \/>\n<meta name=\"twitter:site\" content=\"@netexpertise\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/apache-proxy-permission-denied-503.html\",\"url\":\"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/apache-proxy-permission-denied-503.html\",\"name\":\"Netexpertise - Apache Reverse Proxy 503 Permission Denied\",\"isPartOf\":{\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#website\"},\"datePublished\":\"2015-09-13T07:49:09+00:00\",\"dateModified\":\"2021-05-23T07:07:37+00:00\",\"author\":{\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa\"},\"description\":\"Your get a 503 Service Temporarily Unavailable when connecting to a website through an Apache reverse proxy? This may be related to SELinux\",\"breadcrumb\":{\"@id\":\"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/apache-proxy-permission-denied-503.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/apache-proxy-permission-denied-503.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/apache-proxy-permission-denied-503.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/www.netexpertise.eu\/en\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Apache Reverse Proxy 503 Permission Denied\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#website\",\"url\":\"http:\/\/www.netexpertise.eu\/en\/\",\"name\":\"Netexpertise\",\"description\":\"Systems \/ Networks \/ DevOps\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.netexpertise.eu\/en\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa\",\"name\":\"dave\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g\",\"caption\":\"dave\"},\"sameAs\":[\"http:\/\/www.netexpertise.eu\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Netexpertise - Apache Reverse Proxy 503 Permission Denied","description":"Your get a 503 Service Temporarily Unavailable when connecting to a website through an Apache reverse proxy? This may be related to SELinux","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/apache-proxy-permission-denied-503.html","og_locale":"en_US","og_type":"article","og_title":"Netexpertise - Apache Reverse Proxy 503 Permission Denied","og_description":"Your get a 503 Service Temporarily Unavailable when connecting to a website through an Apache reverse proxy? This may be related to SELinux","og_url":"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/apache-proxy-permission-denied-503.html","og_site_name":"Netexpertise","article_published_time":"2015-09-13T07:49:09+00:00","article_modified_time":"2021-05-23T07:07:37+00:00","author":"dave","twitter_card":"summary_large_image","twitter_creator":"@netexpertise","twitter_site":"@netexpertise","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/apache-proxy-permission-denied-503.html","url":"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/apache-proxy-permission-denied-503.html","name":"Netexpertise - Apache Reverse Proxy 503 Permission Denied","isPartOf":{"@id":"http:\/\/www.netexpertise.eu\/en\/#website"},"datePublished":"2015-09-13T07:49:09+00:00","dateModified":"2021-05-23T07:07:37+00:00","author":{"@id":"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa"},"description":"Your get a 503 Service Temporarily Unavailable when connecting to a website through an Apache reverse proxy? This may be related to SELinux","breadcrumb":{"@id":"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/apache-proxy-permission-denied-503.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.netexpertise.eu\/en\/systems\/linux\/apache-proxy-permission-denied-503.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/apache-proxy-permission-denied-503.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/www.netexpertise.eu\/en"},{"@type":"ListItem","position":2,"name":"Apache Reverse Proxy 503 Permission Denied"}]},{"@type":"WebSite","@id":"http:\/\/www.netexpertise.eu\/en\/#website","url":"http:\/\/www.netexpertise.eu\/en\/","name":"Netexpertise","description":"Systems \/ Networks \/ DevOps","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.netexpertise.eu\/en\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa","name":"dave","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/image\/","url":"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g","contentUrl":"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g","caption":"dave"},"sameAs":["http:\/\/www.netexpertise.eu"]}]}},"_links":{"self":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts\/827"}],"collection":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/comments?post=827"}],"version-history":[{"count":0,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts\/827\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/media?parent=827"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/categories?post=827"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/tags?post=827"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}