CINXE.COM
FAQ - HTTPD - Apache Software Foundation
<!DOCTYPE html> <html lang="en-GB" > <head> <title>FAQ - HTTPD - Apache Software Foundation</title> <meta http-equiv="X-UA-Compatible" content="IE=EDGE,chrome=IE7"> <meta charset="UTF-8"> <meta id="confluence-context-path" name="confluence-context-path" content="/confluence"> <meta id="confluence-base-url" name="confluence-base-url" content="https://cwiki.apache.org/confluence"> <meta id="atlassian-token" name="atlassian-token" content="95e6a062999ade8917d6cfa4dd75b94574862b6f"> <meta id="confluence-space-key" name="confluence-space-key" content="HTTPD"> <script type="text/javascript"> var contextPath = '/confluence'; </script> <meta name="confluence-request-time" content="1732363938149"> <meta name="ajs-use-keyboard-shortcuts" content="true"> <meta name="ajs-com.comalatech.checklists-stats-friendApps" content="sr-rep" /><meta name="ajs-com.comalatech.checklists-stats-comalatechToken" content="Ral2tKFtf09Hw2UoDbfK++vrNBbh8kE6wIhejW8DGJFPs52T2u+XYiZwX7QDonejD2ZfVlLcvTwdyqulVnSePXEV5hqmY/ENNxXpX7LS90NkXLyCtW2j5oMB4UfwzBlNPJbnCR+y4eZTnyLro2VIJHOqqhJR0SBHUf9O0YqbyOhZPUExzNe8up3G8OFY5Jq65uE4lBbcBySuci7/aY4pvwg+vmLtBWhih2CG7910dL9kll0hJihTEwGpEAbrw3t1KTVG9JLLk5lcwNocByKfaIJXQ9nLzhvZCsbbGJsLIWf3w0UshO3OGHlbLaD4YrcAjkk1tAwAzR5tU/0p7jUbPA==" /><meta name="ajs-com.comalatech.checklists-stats-pluginLicenseType" content="PAID" /><meta name="ajs-com.comalatech.checklists-stats-licenseType" content="OPEN_SOURCE" /><meta name="ajs-com.comalatech.checklists-stats-checklistExcerptMacroTotal" content="0" /><meta name="ajs-com.comalatech.checklists-stats-timestamp" content="1732327200029" /><meta name="ajs-com.comalatech.checklists-stats-checklistAttributeMacroTotal" content="0" /><meta name="ajs-com.comalatech.checklists-dev-mode" content="false" /><meta name="ajs-com.comalatech.checklists-trace" content="false" /><meta name="ajs-com.comalatech.checklists-stats-checklistLogMacroTotal" content="0" /><meta name="ajs-com.comalatech.checklists-stats-checklistWikiinputMacroTotal" content="0" /><meta name="ajs-com.comalatech.checklists-stats-checklistLabelMacroTotal" content="0" /><meta name="ajs-com.comalatech.checklists-stats-licenseSize" content="10000" /><meta name="ajs-com.comalatech.checklists-stats-checklistWikiMacroTotal" content="0" /><meta name="ajs-com.comalatech.checklists-stats-instanceId" content="782e50b8e4252e986d61834beb7b94ab" /><meta name="ajs-com.comalatech.checklists-stats-checklistMetadataMacroTotal" content="0" /><meta name="ajs-com.comalatech.checklists-stats-checklistPagelinkMacroTotal" content="0" /><meta name="ajs-com.comalatech.checklists-stats-checklistSelectMacroTotal" content="0" /><meta name="ajs-com.comalatech.checklists-stats-checklistMacroTotal" content="1" /><meta name="ajs-com.comalatech.checklists-stats-totalSpaces" content="444" /><meta name="ajs-com.comalatech.checklists-stats-app" content="chks" /><meta name="ajs-com.comalatech.checklists-stats-checklistInputMacroTotal" content="0" /><meta name="ajs-com.comalatech.checklists-stats-checklistIncludeMacroTotal" content="0" /><meta name="ajs-com.comalatech.checklists-stats-hostVersion" content="7.19.28" /><meta name="ajs-com.comalatech.checklists-stats-totalVersions" content="1010438" /><meta name="ajs-com.comalatech.checklists-stats-totalPages" content="251548" /><meta name="ajs-com.comalatech.checklists-stats-version" content="2.6.13" /><meta name="ajs-com.comalatech.checklists-stats-pluginLicenseSize" content="0" /> <meta name="ajs-is-confluence-admin" content="false"> <meta name="ajs-connection-timeout" content="10000"> <script type="text/x-template" title="gliffy-webpanel-footer"> <div class="gliffy-webpanel-footer"><span>This Confluence installation runs a Free Gliffy License - Evaluate the <a href="http://www.gliffy.com/products/confluence-plugin/">Gliffy Confluence Plugin</a> for your Wiki!</span></div> </script> <style>.ia-fixed-sidebar, .ia-splitter-left {width: 285px;}.theme-default .ia-splitter #main {margin-left: 285px;}.ia-fixed-sidebar {visibility: hidden;}</style> <meta name="ajs-discovered-plugin-features" content="$discoveredList"> <meta name="ajs-keyboardshortcut-hash" content="d431e910a3cbb36558de182580295323"> <meta name="ajs-page-title" content="FAQ"> <meta name="ajs-latest-published-page-title" content="FAQ"> <meta name="ajs-space-name" content="HTTPD"> <meta name="ajs-page-id" content="115522309"> <meta name="ajs-latest-page-id" content="115522309"> <meta name="ajs-content-type" content="page"> <meta name="ajs-parent-page-title" content="HTTPD Home"> <meta name="ajs-parent-page-id" content="62691416"> <meta name="ajs-space-key" content="HTTPD"> <meta name="ajs-max-number-editors" content="12"> <meta name="ajs-macro-placeholder-timeout" content="5000"> <meta name="ajs-jira-metadata-count" content="0"> <meta name="ajs-from-page-title" content=""> <meta name="ajs-can-remove-page" content="false"> <meta name="ajs-can-remove-page-hierarchy" content="false"> <meta name="ajs-browse-page-tree-mode" content="view"> <meta name="ajs-shared-drafts" content="true"> <meta name="ajs-context-path" content="/confluence"> <meta name="ajs-base-url" content="https://cwiki.apache.org/confluence"> <meta name="ajs-version-number" content="7.19.28"> <meta name="ajs-build-number" content="8804"> <meta name="ajs-remote-user" content=""> <meta name="ajs-remote-user-key" content=""> <meta name="ajs-remote-user-has-licensed-access" content="false"> <meta name="ajs-remote-user-has-browse-users-permission" content="false"> <meta name="ajs-current-user-fullname" content=""> <meta name="ajs-current-user-avatar-url" content=""> <meta name="ajs-current-user-avatar-uri-reference" content="/confluence/images/icons/profilepics/anonymous.svg"> <meta name="ajs-static-resource-url-prefix" content="/confluence/s/k3pg1j/8804/noax5f/_"> <meta name="ajs-global-settings-attachment-max-size" content="20971520"> <meta name="ajs-global-settings-quick-search-enabled" content="true"> <meta name="ajs-user-locale" content="en_GB"> <meta name="ajs-user-timezone-offset" content="0"> <meta name="ajs-enabled-dark-features" content="site-wide.shared-drafts,site-wide.synchrony,migration-assistant.enable.assess-l1-cloud-tooling.feature,clc.quick.create,confluence.view.edit.transition,cql.search.screen,confluence-inline-comments-resolved,frontend.editor.v4,http.session.registrar,nps.survey.inline.dialog,confluence.efi.onboarding.new.templates,frontend.editor.v4.compatibility,atlassian.cdn.static.assets,pdf-preview,previews.sharing,previews.versions,file-annotations,confluence.efi.onboarding.rich.space.content,collaborative-audit-log,confluence.reindex.improvements,previews.conversion-service,editor.ajax.save,read.only.mode,graphql,previews.trigger-all-file-types,attachment.extracted.text.extractor,lucene.caching.filter,confluence.table.resizable,notification.batch,previews.sharing.pushstate,confluence-inline-comments-rich-editor,tc.tacca.dacca,site-wide.synchrony.opt-in,atlassian.webresource.twophase.js.i18n.disabled,confluence.denormalisedpermissions,file-annotations.likes,gatekeeper-ui-v2,v2.content.name.searcher,mobile.supported.version,confluence.editor.tinymce.tables,pulp,confluence-inline-comments,confluence-inline-comments-dangling-comment,quick-reload-inline-comments-flags,confluence.retention.rules"> <meta name="ajs-atl-token" content="95e6a062999ade8917d6cfa4dd75b94574862b6f"> <meta name="ajs-confluence-flavour" content="VANILLA"> <meta name="ajs-user-date-pattern" content="dd MMM yyyy"> <meta name="ajs-access-mode" content="READ_WRITE"> <meta name="ajs-render-mode" content="READ_WRITE"> <meta name="ajs-date.format" content="MMM dd, yyyy"> <link rel="shortcut icon" href="/confluence/s/mdjd5z/8804/noax5f/1/_/favicon.ico"> <link rel="icon" type="image/x-icon" href="/confluence/s/mdjd5z/8804/noax5f/1/_/favicon.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/confluence/opensearch/osd.action" title="Apache Software Foundation"/> <meta name="ajs-create-issue-metadata-show-discovery" content="false"> <script> window.WRM=window.WRM||{};window.WRM._unparsedData=window.WRM._unparsedData||{};window.WRM._unparsedErrors=window.WRM._unparsedErrors||{}; WRM._unparsedData["com.atlassian.applinks.applinks-plugin:applinks-common-exported.entity-types"]="{\u0022singular\u0022:{\u0022refapp.charlie\u0022:\u0022Charlie\u0022,\u0022fecru.project\u0022:\u0022Crucible Project\u0022,\u0022fecru.repository\u0022:\u0022FishEye Repository\u0022,\u0022stash.project\u0022:\u0022Stash Project\u0022,\u0022generic.entity\u0022:\u0022Generic Project\u0022,\u0022confluence.space\u0022:\u0022Confluence Space\u0022,\u0022bamboo.project\u0022:\u0022Bamboo Project\u0022,\u0022jira.project\u0022:\u0022Jira Project\u0022},\u0022plural\u0022:{\u0022refapp.charlie\u0022:\u0022Charlies\u0022,\u0022fecru.project\u0022:\u0022Crucible Projects\u0022,\u0022fecru.repository\u0022:\u0022FishEye Repositories\u0022,\u0022stash.project\u0022:\u0022Stash Projects\u0022,\u0022generic.entity\u0022:\u0022Generic Projects\u0022,\u0022confluence.space\u0022:\u0022Confluence Spaces\u0022,\u0022bamboo.project\u0022:\u0022Bamboo Projects\u0022,\u0022jira.project\u0022:\u0022Jira Projects\u0022}}"; WRM._unparsedData["com.atlassian.analytics.analytics-client:programmatic-analytics-init.programmatic-analytics-data-provider"]="false"; WRM._unparsedData["com.atlassian.confluence.plugins.confluence-license-banner:confluence-license-banner-resources.license-details"]="{\u0022daysBeforeLicenseExpiry\u0022:0,\u0022daysBeforeMaintenanceExpiry\u0022:0,\u0022showLicenseExpiryBanner\u0022:false,\u0022showMaintenanceExpiryBanner\u0022:false,\u0022renewUrl\u0022:null,\u0022salesUrl\u0022:null}"; WRM._unparsedData["com.atlassian.plugins.atlassian-plugins-webresource-plugin:context-path.context-path"]="\u0022/confluence\u0022"; WRM._unparsedData["com.atlassian.analytics.analytics-client:policy-update-init.policy-update-data-provider"]="false"; WRM._unparsedData["com.atlassian.applinks.applinks-plugin:applinks-common-exported.authentication-types"]="{\u0022com.atlassian.applinks.api.auth.types.BasicAuthenticationProvider\u0022:\u0022Basic Access\u0022,\u0022com.atlassian.applinks.api.auth.types.TrustedAppsAuthenticationProvider\u0022:\u0022Trusted Applications\u0022,\u0022com.atlassian.applinks.api.auth.types.CorsAuthenticationProvider\u0022:\u0022CORS\u0022,\u0022com.atlassian.applinks.api.auth.types.OAuthAuthenticationProvider\u0022:\u0022OAuth\u0022,\u0022com.atlassian.applinks.api.auth.types.TwoLeggedOAuthAuthenticationProvider\u0022:\u0022OAuth\u0022,\u0022com.atlassian.applinks.api.auth.types.TwoLeggedOAuthWithImpersonationAuthenticationProvider\u0022:\u0022OAuth\u0022}"; WRM._unparsedData["com.atlassian.confluence.plugins.confluence-search-ui-plugin:confluence-search-ui-plugin-resources.i18n-data"]="{\u0022search.ui.recent.link.text\u0022:\u0022View more recently visited\u0022,\u0022search.ui.search.results.empty\u0022:\u0022We couldn\u0027\u0027t find anything matching \u005C\u0022{0}\u005C\u0022.\u0022,\u0022search.ui.filter.clear.selected\u0022:\u0022Clear selected items\u0022,\u0022search.ui.content.name.search.items.panel.load.all.top.items.button.text\u0022:\u0022Show more app results...\u0022,\u0022search.ui.filter.contributor.button.text\u0022:\u0022Contributor\u0022,\u0022search.ui.filter.space.current.label\u0022:\u0022CURRENT\u0022,\u0022search.ui.clear.input.button.text\u0022:\u0022Clear text\u0022,\u0022search.ui.search.results.clear.button\u0022:\u0022clear your filters.\u0022,\u0022help.search.ui.link.title\u0022:\u0022Search tips\u0022,\u0022search.ui.container.close.text\u0022:\u0022Close\u0022,\u0022search.ui.filter.date.month.text\u0022:\u0022The past month\u0022,\u0022search.ui.infinite.scroll.button.text\u0022:\u0022More results\u0022,\u0022search.ui.filter.date.button.text\u0022:\u0022Date\u0022,\u0022search.ui.filter.date.week.text\u0022:\u0022The past week\u0022,\u0022search.ui.result.subtitle.calendar\u0022:\u0022Team calendar\u0022,\u0022search.ui.filter.date.heading\u0022:\u0022Last modified within\u0022,\u0022search.ui.filter.space.input.label\u0022:\u0022Find spaces...\u0022,\u0022search.ui.generic.error\u0022:\u0022Something went wrong. Refresh the page, or contact your admin if this keeps happening.\u0022,\u0022search.ui.recent.spaces\u0022:\u0022Recent Spaces\u0022,\u0022search.ui.result.subtitle.space\u0022:\u0022Space\u0022,\u0022search.ui.filter.space.category.input.label\u0022:\u0022Find space categories...\u0022,\u0022search.ui.filter.space.archive.label\u0022:\u0022Search archived spaces\u0022,\u0022search.ui.filter.label\u0022:\u0022filter\u0022,\u0022search.ui.filter.date.all.text\u0022:\u0022Any time\u0022,\u0022search.ui.filter.date.hour.text\u0022:\u0022The past day\u0022,\u0022search.ui.filters.heading\u0022:\u0022Filter by\u0022,\u0022search.ui.filter.label.input.label\u0022:\u0022Find labels...\u0022,\u0022search.ui.recent.items.anonymous\u0022:\u0022Start exploring. Your search results will appear here.\u0022,\u0022search.ui.input.label\u0022:\u0022Search\u0022,\u0022search.ui.input.aria.label\u0022:\u0022Search, when you type, your results will be displayed below.\u0022,\u0022search.ui.search.result\u0022:\u0022{0,choice,1#{0} search result|1\u003c{0} search results}\u0022,\u0022search.ui.filter.label.button.text\u0022:\u0022Label\u0022,\u0022search.ui.container.clear.ariaLabel\u0022:\u0022Clear\u0022,\u0022search.ui.input.alert\u0022:\u0022Hit enter to search\u0022,\u0022search.ui.filter.no.result.text\u0022:\u0022We can\u0027\u0027t find anything matching your search\u0022,\u0022search.ui.result.subtitle.user\u0022:\u0022User profile\u0022,\u0022search.ui.filter.contributor.input.label\u0022:\u0022Find people...\u0022,\u0022search.ui.filter.content.type.button.text\u0022:\u0022Type\u0022,\u0022search.ui.filter.date.year.text\u0022:\u0022The past year\u0022,\u0022search.ui.advanced.search.link.text\u0022:\u0022Advanced search\u0022,\u0022search.ui.filter.space.button.text\u0022:\u0022Space\u0022,\u0022search.ui.search.results.clear.line2\u0022:\u0022Try a different search term or\u0022,\u0022search.ui.filter.space.category.button.text\u0022:\u0022Space category\u0022,\u0022search.ui.search.results.clear.line1\u0022:\u0022We couldn\u0027\u0027t find anything matching your search.\u0022,\u0022search.ui.content.name.search.items.panel.load.all.top.items.admin.button.text\u0022:\u0022Show more settings and app results...\u0022,\u0022search.ui.recent.pages\u0022:\u0022Recently visited\u0022,\u0022search.ui.search.result.anonymous\u0022:\u0022{0,choice,1#{0} search result|1\u003c{0} search results}. Have an account? {1}Log in{2} to expand your search.\u0022,\u0022search.ui.recent.items.empty\u0022:\u0022Start exploring. Pages and spaces you\u0027\u0027ve visited recently will appear here.\u0022,\u0022search.ui.filter.space.init.heading\u0022:\u0022recent spaces\u0022}"; WRM._unparsedData["com.atlassian.applinks.applinks-plugin:applinks-common-exported.applinks-types"]="{\u0022crowd\u0022:\u0022Crowd\u0022,\u0022confluence\u0022:\u0022Confluence\u0022,\u0022fecru\u0022:\u0022FishEye / Crucible\u0022,\u0022stash\u0022:\u0022Stash\u0022,\u0022jira\u0022:\u0022Jira\u0022,\u0022refapp\u0022:\u0022Reference Application\u0022,\u0022bamboo\u0022:\u0022Bamboo\u0022,\u0022generic\u0022:\u0022Generic Application\u0022}"; WRM._unparsedData["com.atlassian.confluence.plugins.synchrony-interop:synchrony-status-banner-loader.synchrony-status"]="false"; WRM._unparsedData["com.atlassian.applinks.applinks-plugin:applinks-common-exported.applinks-help-paths"]="{\u0022entries\u0022:{\u0022applinks.docs.root\u0022:\u0022https://confluence.atlassian.com/display/APPLINKS-082/\u0022,\u0022applinks.docs.diagnostics.troubleshoot.sslunmatched\u0022:\u0022SSL+and+application+link+troubleshooting+guide\u0022,\u0022applinks.docs.diagnostics.troubleshoot.oauthsignatureinvalid\u0022:\u0022OAuth+troubleshooting+guide\u0022,\u0022applinks.docs.diagnostics.troubleshoot.oauthtimestamprefused\u0022:\u0022OAuth+troubleshooting+guide\u0022,\u0022applinks.docs.delete.entity.link\u0022:\u0022Create+links+between+projects\u0022,\u0022applinks.docs.adding.application.link\u0022:\u0022Link+Atlassian+applications+to+work+together\u0022,\u0022applinks.docs.administration.guide\u0022:\u0022Application+Links+Documentation\u0022,\u0022applinks.docs.oauth.security\u0022:\u0022OAuth+security+for+application+links\u0022,\u0022applinks.docs.troubleshoot.application.links\u0022:\u0022Troubleshoot+application+links\u0022,\u0022applinks.docs.diagnostics.troubleshoot.unknownerror\u0022:\u0022Network+and+connectivity+troubleshooting+guide\u0022,\u0022applinks.docs.configuring.auth.trusted.apps\u0022:\u0022Configuring+Trusted+Applications+authentication+for+an+application+link\u0022,\u0022applinks.docs.diagnostics.troubleshoot.authlevelunsupported\u0022:\u0022OAuth+troubleshooting+guide\u0022,\u0022applinks.docs.diagnostics.troubleshoot.ssluntrusted\u0022:\u0022SSL+and+application+link+troubleshooting+guide\u0022,\u0022applinks.docs.diagnostics.troubleshoot.unknownhost\u0022:\u0022Network+and+connectivity+troubleshooting+guide\u0022,\u0022applinks.docs.delete.application.link\u0022:\u0022Link+Atlassian+applications+to+work+together\u0022,\u0022applinks.docs.adding.project.link\u0022:\u0022Configuring+Project+links+across+Applications\u0022,\u0022applinks.docs.link.applications\u0022:\u0022Link+Atlassian+applications+to+work+together\u0022,\u0022applinks.docs.diagnostics.troubleshoot.oauthproblem\u0022:\u0022OAuth+troubleshooting+guide\u0022,\u0022applinks.docs.diagnostics.troubleshoot.migration\u0022:\u0022Update+application+links+to+use+OAuth\u0022,\u0022applinks.docs.relocate.application.link\u0022:\u0022Link+Atlassian+applications+to+work+together\u0022,\u0022applinks.docs.administering.entity.links\u0022:\u0022Create+links+between+projects\u0022,\u0022applinks.docs.upgrade.application.link\u0022:\u0022OAuth+security+for+application+links\u0022,\u0022applinks.docs.diagnostics.troubleshoot.connectionrefused\u0022:\u0022Network+and+connectivity+troubleshooting+guide\u0022,\u0022applinks.docs.configuring.auth.oauth\u0022:\u0022OAuth+security+for+application+links\u0022,\u0022applinks.docs.insufficient.remote.permission\u0022:\u0022OAuth+security+for+application+links\u0022,\u0022applinks.docs.configuring.application.link.auth\u0022:\u0022OAuth+security+for+application+links\u0022,\u0022applinks.docs.diagnostics\u0022:\u0022Application+links+diagnostics\u0022,\u0022applinks.docs.configured.authentication.types\u0022:\u0022OAuth+security+for+application+links\u0022,\u0022applinks.docs.adding.entity.link\u0022:\u0022Create+links+between+projects\u0022,\u0022applinks.docs.diagnostics.troubleshoot.unexpectedresponse\u0022:\u0022Network+and+connectivity+troubleshooting+guide\u0022,\u0022applinks.docs.configuring.auth.basic\u0022:\u0022Configuring+Basic+HTTP+Authentication+for+an+Application+Link\u0022,\u0022applinks.docs.diagnostics.troubleshoot.authlevelmismatch\u0022:\u0022OAuth+troubleshooting+guide\u0022}}"; WRM._unparsedData["com.atlassian.confluence.plugins.confluence-feature-discovery-plugin:confluence-feature-discovery-plugin-resources.test-mode"]="false"; if(window.WRM._dataArrived)window.WRM._dataArrived();</script> <link rel="stylesheet" href="/confluence/s/6ae781c19260c87c2df2185688cf22d1-CDN/mdjd5z/8804/noax5f/35dbafbbc78d45870cb35c7d7200f6a7/_/download/contextbatch/css/_super,-com.atlassian.plugins.atlassian-plugins-webresource-rest:data-collector-perf-observer/batch.css" data-wrm-key="_super,-com.atlassian.plugins.atlassian-plugins-webresource-rest:data-collector-perf-observer" data-wrm-batch-type="context" media="all"> <link rel="stylesheet" href="/confluence/s/bbcc4b324a5a41fc0ad1bfb9c14f60b7-CDN/mdjd5z/8804/noax5f/3463efedda51c7056b1e351d39fff087/_/download/contextbatch/css/atl.confluence.plugins.pagetree-desktop,main,viewcontent,atl.general,page,atl.comments,-_super/batch.css?gatekeeper-ui-v2=true&highlightactions=true&hostenabled=true" data-wrm-key="atl.confluence.plugins.pagetree-desktop,main,viewcontent,atl.general,page,atl.comments,-_super" data-wrm-batch-type="context" media="all"> <link rel="stylesheet" href="/confluence/s/d41d8cd98f00b204e9800998ecf8427e-CDN/mdjd5z/8804/noax5f/3.9.4/_/download/batch/com.stiltsoft.confluence.handy.macros:handy-header-url-resources/com.stiltsoft.confluence.handy.macros:handy-header-url-resources.css" data-wrm-key="com.stiltsoft.confluence.handy.macros:handy-header-url-resources" data-wrm-batch-type="resource" media="all"> <script data-wrm-key="com.atlassian.plugins.atlassian-plugins-webresource-rest:data-collector-perf-observer" data-wrm-batch-type="resource" data-initially-rendered> !function(){"use strict";if("PerformanceObserver"in window){const e=[];window.__observedResources=e;const r=e=>"script"===e?"script":"css";new PerformanceObserver((n=>{n.getEntries().filter((({initiatorType:e,name:r})=>{const n="script"===e||((e,r)=>"link"===e&&"css"===new URL(r).pathname.split(".").pop())(e,r),i=new URL(location.href).origin===new URL(r).origin;return n&&i})).forEach((({name:n,transferSize:i,encodedBodySize:s,initiatorType:o})=>{e.push([i,s,n,r(o)])}))})).observe({type:"resource"})}}(); </script> <script src="/confluence/s/ae8653e40f51d1074a9abe1f6278d297-CDN/mdjd5z/8804/noax5f/35dbafbbc78d45870cb35c7d7200f6a7/_/download/contextbatch/js/_super,-com.atlassian.plugins.atlassian-plugins-webresource-rest:data-collector-perf-observer/batch.js?locale=en-GB" data-wrm-key="_super,-com.atlassian.plugins.atlassian-plugins-webresource-rest:data-collector-perf-observer" data-wrm-batch-type="context" data-initially-rendered></script> <script src="/confluence/s/c601805369e014d46d54981ee744731c-CDN/mdjd5z/8804/noax5f/3463efedda51c7056b1e351d39fff087/_/download/contextbatch/js/atl.confluence.plugins.pagetree-desktop,main,viewcontent,atl.general,page,atl.comments,-_super/batch.js?gatekeeper-ui-v2=true&highlightactions=true&hostenabled=true&locale=en-GB" data-wrm-key="atl.confluence.plugins.pagetree-desktop,main,viewcontent,atl.general,page,atl.comments,-_super" data-wrm-batch-type="context" data-initially-rendered></script> <script src="/confluence/s/254bc93046e75458230542bb3902a588-CDN/mdjd5z/8804/noax5f/3.9.4/_/download/batch/com.stiltsoft.confluence.handy.macros:handy-header-url-resources/com.stiltsoft.confluence.handy.macros:handy-header-url-resources.js?locale=en-GB" data-wrm-key="com.stiltsoft.confluence.handy.macros:handy-header-url-resources" data-wrm-batch-type="resource" data-initially-rendered></script> <script src="/confluence/s/d41d8cd98f00b204e9800998ecf8427e-T/mdjd5z/8804/noax5f/2.6.13/_/download/batch/com.comalatech.checklists:analyticsResources/com.comalatech.checklists:analyticsResources.js" data-wrm-key="com.comalatech.checklists:analyticsResources" data-wrm-batch-type="resource" data-initially-rendered></script> <script type="module">WRM.requireLazily(["wr!com.atlassian.plugins.atlassian-plugins-webresource-rest:data-collector-async"])</script> <meta name="ajs-site-title" content="Apache Software Foundation" /> <link rel="canonical" href="https://cwiki.apache.org/confluence/display/HTTPD/FAQ"> <link rel="shortlink" href="https://cwiki.apache.org/confluence/x/BbviBg"> <meta name="wikilink" content="[HTTPD:FAQ]"> <meta name="page-version" content="6"> <meta name="ajs-page-version" content="6"> </head> <body id="com-atlassian-confluence" class="theme-default aui-layout aui-theme-default"> <div id='stp-licenseStatus-banner'></div> <div id="page"> <div id="full-height-container"> <div id="header-precursor"> <div class="cell"> </div> </div> <header id="header" role="banner"> <a class="aui-skip-link" href="https://cwiki.apache.org/confluence/login.action?os_destination=%2Fdisplay%2Fhttpd%2FFAQ">Log in</a> <a class="aui-skip-link" href="#nav-sidebar">Skip to sidebar</a> <a class="aui-skip-link" href="#main">Skip to main content</a> <nav class="aui-header aui-dropdown2-trigger-group" aria-label="Site"><div class="aui-header-inner"><div class="aui-header-before"><button class=" aui-dropdown2-trigger app-switcher-trigger aui-dropdown2-trigger-arrowless" aria-controls="app-switcher" aria-haspopup="true" role="button" data-aui-trigger href="#app-switcher"><span class="aui-icon aui-icon-small aui-iconfont-appswitcher">Linked Applications</span></button><div id="app-switcher" class="aui-dropdown2 aui-style-default" role="menu" hidden data-is-user-admin="false" data-is-switcher="true"><div class="app-switcher-loading">Loading…</div></div></div><div class="aui-header-primary"><span id="logo" class="aui-header-logo aui-header-logo-confluence"><a href="/confluence/" aria-label="Go to home page"><span class="aui-header-logo-device">Apache Software Foundation</span></a></span><ul class="aui-nav"> <li> <a id="space-directory-link" href="/confluence/spacedirectory/view.action" class=" aui-nav-imagelink" title="Spaces"> <span>Spaces</span> </a> </li> <li class="aui-buttons"> </li> </ul> </div><div class="aui-header-secondary"><ul class="aui-nav"> <li> <div id="search-ui" class="aui-quicksearch dont-default-focus header-quicksearch"><button id="quick-search-query-button" aria-label="Search" aria-haspopup= "dialog" aria-controls="search_drawer" ></button><input id="quick-search-query" aria-label="Search" placeholder="Search" type="text" aria-haspopup= "dialog" aria-controls="search_drawer" /><div id="quick-search-alert" role="alert">Hit enter to search</div><aui-spinner size="small"></aui-spinner></div> </li> <li> <a id="help-menu-link" class="aui-nav-link aui-dropdown2-trigger aui-dropdown2-trigger-arrowless" href="#" aria-haspopup="true" aria-owns="help-menu-link-content" title="Help"> <span class="aui-icon aui-icon-small aui-iconfont-question-filled">Help</span> </a> <nav id="help-menu-link-content" class="aui-dropdown2 aui-style-default"> <div class="aui-dropdown2-section"> <ul id="help-menu-link-leading" class="aui-list-truncate section-leading first"> <li> <a id="confluence-help-link" href="https://docs.atlassian.com/confluence/docs-719/" class=" " title="Visit the Confluence documentation home" target="_blank" > Online Help </a> </li> <li> <a id="keyboard-shortcuts-link" href="/confluence" class=" " title="View available keyboard shortcuts" > Keyboard Shortcuts </a> </li> <li> <a id="feed-builder-link" href="/confluence/dashboard/configurerssfeed.action" class=" " title="Create your custom RSS feed." > Feed Builder </a> </li> <li> <a id="whats-new-menu-link" href="https://docs.atlassian.com/confluence/docs-719/help.whats.new.iframe.link" class=" " title="" > What’s new </a> </li> <li> <a id="whats-new-menu-link" href="https://confluence.atlassian.com/display/DOC/Confluence+7.19+Release+Notes" class=" " title="" > What’s new </a> </li> <li> <a id="gadget-directory-link" href="/confluence" class=" user-item administration-link " title="Browse gadgets provided by Confluence" > Available Gadgets </a> </li> <li> <a id="confluence-about-link" href="/confluence/aboutconfluencepage.action" class=" " title="Get more information about Confluence" > About Confluence </a> </li> </ul> </div> </nav> </li> <li> </li> <li> </li> <li> <li> <a id="login-link" href="/confluence/login.action?os_destination=%2Fdisplay%2Fhttpd%2FFAQ" class=" user-item login-link " title="" > Log in </a> </li> </li> </ul> </div></div><!-- .aui-header-inner--></nav><!-- .aui-header --> <br class="clear"> </header> <div class="ia-splitter"> <div class="ia-splitter-left"> <div class="ia-fixed-sidebar" role="complementary" aria-label=sidebar> <div class="acs-side-bar ia-scrollable-section"><div class="acs-side-bar-space-info tipsy-enabled" data-configure-tooltip="Edit space details"><div class="avatar"><div class="space-logo" data-key="HTTPD" data-name="HTTPD" data-entity-type="confluence.space"><div class="avatar-img-container"><div class="avatar-img-wrapper"><a href="/confluence/display/HTTPD/Home" title="HTTPD"><img class="avatar-img" src="/confluence/images/logo/default-space-logo.svg" alt="HTTPD"></a></div></div></div></div><div class="space-information-container"><div class="name"><a href="/confluence/display/HTTPD/Home" title="HTTPD">HTTPD</a></div><div class="flyout-handle icon aui-icon aui-icon-small aui-iconfont-edit"></div></div></div><div class="acs-side-bar-content"><div class="acs-nav-wrapper"><div class="acs-nav" data-has-create-permission="false" data-quick-links-state="null" data-page-tree-state="null" data-nav-type="page-tree"><div class="acs-nav-sections"><div class="main-links-section "><ul class="acs-nav-list"><li class="acs-nav-item wiki current-item" aria-current="true" data-collector-key="spacebar-pages"><a class="acs-nav-item-link tipsy-enabled" href="/confluence/collector/pages.action?key=HTTPD" data-collapsed-tooltip="Pages"><span class="icon"></span><span class="acs-nav-item-label">Pages</span></a></li><li class="acs-nav-item blog" data-collector-key="spacebar-blogs"><a class="acs-nav-item-link tipsy-enabled" href="/confluence/pages/viewrecentblogposts.action?key=HTTPD" data-collapsed-tooltip="Blog"><span class="icon"></span><span class="acs-nav-item-label">Blog</span></a></li></ul></div><div class="quick-links-wrapper"></div></div></div></div><div class="ia-secondary-container tipsy-enabled" data-tree-type="page-tree"><div class="ia-secondary-header"><h2 class="ia-secondary-header-title page-tree"><span class="icon"></span><span class="label">Page tree</span></h2></div><div class="ia-secondary-content"> <div class="plugin_pagetree conf-macro output-inline" data-hasbody="false" data-macro-name="pagetree"> <div class="plugin_pagetree_children_list plugin_pagetree_children_list_noleftspace"> <div class="plugin_pagetree_children"> </div> </div> <fieldset class="hidden"> <input type="hidden" name="treeId" value="" /> <input type="hidden" name="treeRequestId" value="/confluence/plugins/pagetree/naturalchildren.action?decorator=none&excerpt=false&sort=position&reverse=false&disableLinks=false&expandCurrent=true&placement=sidebar" /> <input type="hidden" name="treePageId" value="115522309" /> <input type="hidden" name="noRoot" value="true" /> <input type="hidden" name="rootPageId" value="0" /> <input type="hidden" name="rootPage" value="" /> <input type="hidden" name="startDepth" value="0" /> <input type="hidden" name="spaceKey" value="HTTPD" /> <input type="hidden" name="i18n-pagetree.loading" value="Loading..." /> <input type="hidden" name="i18n-pagetree.error.permission" value="Unable to load page tree. It seems that you do not have permission to view the root page." /> <input type="hidden" name="i18n-pagetree.eeror.general" value="There was a problem retrieving the page tree. Please check the server log file for more information." /> <input type="hidden" name="loginUrl" value="/confluence/login.action?os_destination=%2Fpages%2Fviewpage.action%3FspaceKey%3Dhttpd%26title%3DFAQ&permissionViolation=true" /> <input type="hidden" name="mobile" value="false" /> <input type="hidden" name="placement" value="sidebar" /> <fieldset class="hidden"> <input type="hidden" name="ancestorId" value="62691416" /> </fieldset> </fieldset> </div> </div></div></div><div class="hidden"><a href="/confluence/collector/pages.action?key=HTTPD" id="space-pages-link"></a><script type="text/x-template" title="logo-config-content"><h2>Space Details</h2><div class="personal-space-logo-hint">Your profile picture is used as the logo for your personal space. <a href="/confluence/users/profile/editmyprofilepicture.action" target="_blank">Change your profile picture</a>.</div></script></div></div><div class="space-tools-section"><div id="space-tools-menu-additional-items" class="hidden"><div data-label="Browse pages" data-class="" data-href="/confluence/pages/reorderpages.action?key=HTTPD">Browse pages</div></div><button id="space-tools-menu-trigger" class=" aui-dropdown2-trigger aui-button aui-button-subtle tipsy-enabled aui-dropdown2-trigger-arrowless " aria-controls="space-tools-menu" aria-haspopup="true" role="button" data-aui-trigger><span class="aui-icon aui-icon-small aui-iconfont-configure">Configure</span><span class="aui-button-label">Space tools</span><span class="aui-icon "></span></button><div id="space-tools-menu" class="aui-dropdown2 aui-style-default space-tools-dropdown" role="menu" hidden data-aui-alignment="top left"></div><a href="#" role="button" class="expand-collapse-trigger aui-icon aui-icon-small aui-iconfont-chevron-double-left" aria-expanded="true"></a></div> </div> </div> <!-- \#header --> <main role="main" id="main" class=" aui-page-panel"> <div id="main-header"> <div id="navigation" class="content-navigation view" role="region" aria-label="Page tools"> <ul class="ajs-menu-bar"> <li class="normal ajs-menu-item"> <a id="action-menu-link" class="action aui-dropdown2-trigger-arrowless aui-button aui-button-subtle ajs-menu-title aui-dropdown2-trigger" href="#" aria-haspopup="true" aria-label="More options" aria-owns="action-menu" data-container="#navigation"> <span> <span class="aui-icon aui-icon-small aui-iconfont-more" aria-label="More options"></span> </span> </a> <div id="action-menu" class="aui-dropdown2 aui-style-default" aria-hidden="true"> <div class="aui-dropdown2-section"> <ul id="action-menu-primary" class="section-primary first"> <li> <a id="view-attachments-link" href="/confluence/pages/viewpageattachments.action?pageId=115522309" rel="nofollow" class="action-view-attachments" accessKey="t" title="View Attachments" > <span> A<u>t</u>tachments (0) </span> </a> </li> <li> <a id="action-view-history-link" href="/confluence/pages/viewpreviousversions.action?pageId=115522309" rel="nofollow" class="action-view-history" title="" > <span> Page History </span> </a> </li> </ul> </div> <div class="aui-dropdown2-section"> <ul id="action-menu-secondary" class="section-secondary"> <li> <a id="view-resolved-comments" href="/confluence" rel="nofollow" class="" title="" > <span> Resolved comments </span> </a> </li> <li> <a id="view-page-info-link" href="/confluence/pages/viewinfo.action?pageId=115522309" rel="nofollow" class="action-view-info" title="" > <span> Page Information </span> </a> </li> <li> <a id="view-in-hierarchy-link" href="/confluence/pages/reorderpages.action?key=HTTPD&openId=115522309#selectedPageInHierarchy" rel="nofollow" class="" title="" > <span> View in Hierarchy </span> </a> </li> <li> <a id="action-view-source-link" href="/confluence/plugins/viewsource/viewpagesrc.action?pageId=115522309" rel="nofollow" class="action-view-source popup-link" title="" > <span> View Source </span> </a> </li> <li> <a id="delete-all-comments-link-link" href="/confluence/plugins/aptis/deleteAllComments/ask-user.action?pageId=115522309" rel="nofollow" class="" title="" > <span> Delete comments </span> </a> </li> <li> <a id="action-export-pdf-link" href="/confluence/spaces/flyingpdf/pdfpageexport.action?pageId=115522309" rel="nofollow" class="" title="" > <span> Export to PDF </span> </a> </li> <li> <a id="action-export-word-link" href="/confluence/exportword?pageId=115522309" rel="nofollow" class="action-export-word" title="" > <span> Export to Word </span> </a> </li> </ul> </div> <div class="aui-dropdown2-section"> <ul id="action-menu-modify" class="section-modify"> <li> <a id="treecopy-action" href="/confluence/plugins/tree-copy/preparing-copying.action?pageId=115522309" rel="nofollow" class="" title="" > <span> Copy Page Tree </span> </a> </li> </ul> </div> </div> </li> </ul> </div> <div id="title-heading" class="pagetitle with-breadcrumbs"> <div id="breadcrumb-section"> <nav aria-label="Breadcrumbs"> <ol id="breadcrumbs"> <li class="first" > <span class=""><a href="/confluence/collector/pages.action?key=HTTPD">Pages</a></span> <li> <span class=""><a href="/confluence/display/HTTPD/HTTPD+Home">HTTPD Home</a></span> </ol> </nav> </div> <div id="page-metadata-banner"><ul class="banner"><li id="system-content-items" class="noprint"><a href="" title="Unrestricted" id="content-metadata-page-restrictions-hidden" class="hidden"></a></li><li class="page-metadata-item noprinthas-button" id="content-metadata-jira-wrapper"><a href="" title="" id="content-metadata-jira" class="aui-button aui-button-subtle content-metadata-jira tipsy-disabled hidden"><span>Jira links</span></a></li></ul></div> <h1 id="title-text" class="with-breadcrumbs"> <a href="/confluence/display/HTTPD/FAQ">FAQ</a> </h1> </div> </div><!-- \#main-header --> <div id="sidebar-container"> </div><!-- \#sidebar-container --> <div id="content" class="page view"> <div id="action-messages"> </div> <script type="text/x-template" title="searchResultsGrid"> <table class="aui"> <thead> <tr class="header"> <th class="search-result-title">Page Title</th> <th class="search-result-space">Space</th> <th class="search-result-date">Updated</th> </tr> </thead> </table> </script> <script type="text/x-template" title="searchResultsGridCount"> <p class="search-result-count">{0}</p> </script> <script type="text/x-template" title="searchResultsGridRow"> <tr class="search-result"> <td class="search-result-title"><a href="{1}" class="content-type-{2}"><span>{0}</span></a></td> <td class="search-result-space"><a class="space" href="/confluence/display/{4}/" title="{3}">{3}</a></td> <td class="search-result-date"><span class="date" title="{6}">{5}</span></td> </tr> </script> <div class="page-metadata"> <ul> <li class="page-metadata-modification-info"> Created by <span class='author'> <a href=" /confluence/display/~infrabot " aria-label="created by ASF Infrabot" class="url fn" >ASF Infrabot</a></span>, last modified on <a class='last-modified' aria-label='modified on May 22, 2019, select to show changes' title='Show changes' href='/confluence/pages/diffpagesbyversion.action?pageId=115522309&selectedPageVersions=5&selectedPageVersions=6'>May 22, 2019</a> </li> </ul> </div> <div id="main-content" class="wiki-content"> <p>Frequently Asked Questions</p> <p>These are questions that have been asked over the years, on IRC, mailing lists, and various other less official channels.</p> <div class="toc-macro client-side-toc-macro conf-macro output-block" data-hasbody="false" data-headerelements="H1,H2,H3,H4,H5,H6,H7" data-macro-name="toc"> </div> <h1 id="FAQ-Background">Background</h1> <h2 id="FAQ-WhatisApache?">What is Apache?</h2> <p>The Apache HTTP Server</p> <ul> <li>is a powerful, flexible, HTTP/1.1 compliant web server</li> <li>implements the latest protocols, including HTTP/1.1 (RFC2616)</li> <li>is highly configurable and extensible with third-party modules</li> <li>can be customised by writing 'modules' using the Apache module API</li> <li>provides full source code and comes with an unrestrictive license</li> <li>runs on Windows 2000, Netware 5.x and above, OS/2, and most versions of Unix, as well as several other operating systems</li> <li>is actively being developed</li> <li>encourages user feedback through new ideas, bug reports and patches</li> <li>implements many frequently requested features, including: <ul> <li>DBM databases as well, as relational databases and LDAP for authentication</li> <li>allows you to easily set up password-protected pages with enormous numbers of authorized users, without bogging down the server.</li> <li>Customized responses to errors and problems</li> <li>Allows you to set up files, or even CGI scripts, which are returned by the server in response to errors and problems, e.g. setup a script to intercept 500 Server Errors and perform on-the-fly diagnostics for both users and yourself.</li> <li>Multiple <a class="unresolved" href="#">DirectoryIndex</a> directives - Allows you to say <a class="unresolved" href="#">DirectoryIndex</a> index.html index.cgi, which instructs the server to either send back index.html or run index.cgi when a directory URL is requested, whichever it finds in the directory.</li> <li>Unlimited flexible URL rewriting and aliasing - Apache has no fixed limit on the numbers of Aliases and Redirects which may be declared in the config files. In addition, a powerful rewriting engine can be used to solve most URL manipulation problems.</li> <li>Content negotiation - i.e. the ability to automatically serve clients of varying sophistication and HTML level compliance, with documents which offer the best representation of information that the client is capable of accepting.</li> <li>Virtual Hosts - Allows the server to distinguish between requests made to different IP addresses or names (mapped to the same machine). Apache also offers dynamically configurable mass-virtual hosting.</li> <li>Configurable Reliable Piped Logs - You can configure Apache to generate logs in the format that you want. In addition, on most Unix architectures, Apache can send log files to a pipe, allowing for log rotation, hit filtering, real-time splitting of multiple vhosts into separate logs, and asynchronous DNS resolving on the fly. <br class="atl-forced-newline"/></li> </ul> </li> </ul> <h2 id="FAQ-HowandwhywasApacheHTTPServercreated?">How and why was Apache HTTP Server created?</h2> <p>The <a class="external-link" href="http://httpd.apache.org/ABOUT_APACHE.html" rel="nofollow">About Apache document</a> explains how the Apache project evolved from its beginnings as an outgrowth of the NCSA httpd project to its current status as one of the fastest, most efficient, and most functional web servers in existence.</p> <h2 id="FAQ-Whythename"Apache"?">Why the name "Apache"?</h2> <p>The name 'Apache' was chosen from respect for the Native American Indian tribe of Apache (Indé), well-known for their superior skills in warfare strategy and their inexhaustible endurance. For more information on the Apache Nation, we suggest searching Google, or <a class="unresolved" href="#">AllTheWeb</a>.</p> <p>Secondarily, and more popularly (though incorrectly) accepted, it's a considered cute name which stuck. Apache is "A PAtCHy server". It was based on some existing code and a series of "patch files".</p> <p>These days Apache as such means much more. It's first and foremost the Apache Software Foundation, under which there are dozens of projects.</p> <h2 id="FAQ-HowdoesApachehttpdperformancecomparetootherservers?">How does Apache httpd performance compare to other servers?</h2> <p>Benchmarks tend to be a measure of configuration competance, rather than of server quality. That is, if you're an expert in IIS, you can probably get it to run faster than you can get Apache to run. You can therefore find comparisions of various HTTP servers that prove that each is faster than all the others. We tend to take server performance benchmarks with a grain of salt.</p> <h2 id="FAQ-HowthoroughlytestedisApachehttpd?">How thoroughly tested is Apache httpd?</h2> <p>Apache is run on over 120 million Internet servers (as of April 2010) (Source, <a class="external-link" href="http://news.netcraft.com/archives/category/web-server-survey/" rel="nofollow">Netcraft</a>). It has been tested thoroughly by both developers and users. The Apache HTTP Server Project Management Committee maintains rigorous standards before releasing new versions of their server, and our server runs without a hitch on over one half of all WWW servers available on the Internet. When bugs do show up, we release patches and new versions as soon as they are available.</p> <h2 id="FAQ-WhatarethefutureplansforApachehttpd?">What are the future plans for Apache httpd?</h2> <ul> <li>to continue to be an "open source" no-charge-for-use HTTP server,</li> <li>to keep up with advances in HTTP protocol and web developments in general,</li> <li>to collect suggestions for fixes/improvements from its users,</li> <li>to respond to needs of large volume providers as well as occasional users. <br class="atl-forced-newline"/></li> </ul> <h2 id="FAQ-WhomdoIcontactforsupport?">Whom do I contact for support?</h2> <p>See <a class="external-link" href="http://httpd.apache.org/support.html" rel="nofollow">http://httpd.apache.org/support.html</a>.</p> <h2 id="FAQ-IsthereanymoreinformationavailableonApachehttpd?">Is there any more information available on Apache httpd?</h2> <p>Indeed there is. See the <a class="external-link" href="http://httpd.apache.org" rel="nofollow">main Apache web server site</a>. There are also many books about the Apache HTTP Server available.</p> <h2 id="FAQ-WherecanIgetApachehttpd?">Where can I get Apache httpd?</h2> <p>You can find out how to download the source for Apache at the <a class="external-link" href="http://httpd.apache.org" rel="nofollow">main Apache web server site</a>.</p> <h2 id="FAQ-Whyisn'tthereacurrentbinaryformyplatform?">Why isn't there a current binary for my platform?</h2> <p>The occasional availability of binaries for one platform or another at <a class="external-link" href="http://httpd.apache.org/dist/httpd/binaries/" rel="nofollow">http://httpd.apache.org/dist/httpd/binaries/</a> has been a source of confusion for the user community, particularly the large subset which uses the Windows platform and is not able to build httpd and prerequisites themselves.</p> <p>Producing binaries for general use is not part of the httpd release process. By policy the group does not formally release binaries and is in no position to ensure their consistent availability. (No mechanisms exist to review, test, and approve them – we can only formally release source).</p> <p>If you are unable to build a binary for your platform, consult the Users mailing list for recommendations.</p> <p>Some sources for Windows binaries are documented at <a class="external-link" href="http://httpd.apache.org/docs/current/platform/windows.html#down" rel="nofollow">Using Apache HTTP Server on Microsoft Windows</a>.</p> <h2 id="FAQ-MayIusetheApachelogoonmyproductorWebsite?">May I use the Apache logo on my product or Web site?</h2> <p>You may NOT use any original artwork from the Apache Software Foundation, nor make or use modified versions of such artwork, except under the conditions in the <a class="external-link" href="http://www.apache.org/foundation/marks/" rel="nofollow">Apache Trademark Policy</a> document.</p> <h1 id="FAQ-GeneralTechnicalQuestions">General Technical Questions</h1> <h2 id="FAQ-"Whycan'tI...?Whywon't...work?"Whattodoincaseofproblems">"Why can't I ...? Why won't ... work?" What to do in case of problems</h2> <p>If you are having trouble with your Apache server software, you should take the following steps:</p> <p> <strong>Check the errorlog!</strong></p> <div class="indent20 inline conf-macro output-inline" data-hasbody="true" data-macro-name="indent" style="margin-left: 20px;"><style type="text/css">div.inline p:first-child { display: inline; }</style>${renderedContent}</div> <p> <strong>Check the FAQ!</strong></p> <div class="indent20 inline conf-macro output-inline" data-hasbody="true" data-macro-name="indent" style="margin-left: 20px;"><style type="text/css">div.inline p:first-child { display: inline; }</style>${renderedContent}</div> <p> <strong>Check the Apache bug database</strong></p> <div class="indent20 inline conf-macro output-inline" data-hasbody="true" data-macro-name="indent" style="margin-left: 20px;"><style type="text/css">div.inline p:first-child { display: inline; }</style>${renderedContent}</div> <p> <strong>Ask in a user support group</strong></p> <div class="indent20 inline conf-macro output-inline" data-hasbody="true" data-macro-name="indent" style="margin-left: 20px;"><style type="text/css">div.inline p:first-child { display: inline; }</style>${renderedContent}</div> <p> <strong>If all else fails, report the problem in the bug database</strong></p> <div class="indent20 inline conf-macro output-inline" data-hasbody="true" data-macro-name="indent" style="margin-left: 20px;"><style type="text/css">div.inline p:first-child { display: inline; }</style>${renderedContent}</div> <p>If your problem involves the server crashing and generating a core dump, please include a backtrace (if possible). As an example,</p> <ul> <li><div class="preformatted panel conf-macro output-block" data-hasbody="true" data-macro-name="noformat" style="border-width: 1px;"><div class="preformattedContent panelContent"> <pre># cd ServerRoot # dbx httpd core (dbx) where </pre> </div></div> <br class="atl-forced-newline"/></li> </ul> <p>(Substitute the appropriate locations for your <a class="unresolved" href="#">ServerRoot</a> and your httpd and core files. You may have to use gdb instead of dbx.)</p> <h2 id="FAQ-HowdoIsubmitapatchtoApachehttpd?">How do I submit a patch to Apache httpd?</h2> <p>Detailed information for submitting bug reports and patches may be found in the <a class="external-link" href="http://httpd.apache.org/dev/" rel="nofollow">Apache HTTP Server developer documentation</a>.</p> <h2 id="FAQ-WhyhasApachestolenmyfavouritesite'sInternetaddress?">Why has Apache stolen my favourite site's Internet address?</h2> <p>The simple answer is: "It hasn't." This misconception is usually caused by the site in question having migrated to the Apache Web server software, but not having migrated the site's content yet. When Apache is installed, the default page that gets installed tells the Webmaster the installation was successful. The expectation is that this default page will be replaced with the site's real content. If it doesn't, complain to the Webmaster, not to the Apache project – we just make the software and aren't responsible for what people do (or don't do) with it.</p> <h2 id="FAQ-WhyamIgettingspammailfromtheApachesite?">Why am I getting spam mail from the Apache site?</h2> <p>The short answer is: "You aren't." Usually when someone thinks the Apache site is originating spam, it's because they've traced the spam to a Web site, and the Web site says it's using Apache. See the previous FAQ entry for more details on this phenomenon.</p> <p>No marketing spam originates from the Apache site. The only mail that comes from the site goes only to addresses that have been requested to receive the mail.</p> <h2 id="FAQ-MayIincludetheApachesoftwareonaCDorotherpackageI'mdistributing?">May I include the Apache software on a CD or other package I'm distributing?</h2> <p>The detailed answer to this question can be found in the Apache license, which is included in the Apache distribution in the file LICENSE. You can also find it on the Web at <a class="external-link" href="http://www.apache.org/licenses/" rel="nofollow">http://www.apache.org/licenses/</a>.</p> <h2 id="FAQ-What'sthebesthardware/operatingsystem/...HowdoIgetthemostoutofmyApacheWebserver?">What's the best hardware/operating system/... How do I get the most out of my Apache Web server?</h2> <p>Check out the <a class="external-link" href="http://httpd.apache.org/docs/current/misc/perf-tuning.html" rel="nofollow">performance tuning page</a>.</p> <h2 id="FAQ-Whatare"regularexpressions"?">What are "regular expressions"?</h2> <p>Regular expressions are a way of describing a pattern - for example, "all the words that begin with the letter A" or "every 10-digit phone number" or even "Every sentence with two commas in it, and no capital letter Q". Regular expressions (aka "regex"s) are useful in Apache because they let you apply certain attributes against collections of files or resources in very flexible ways - for example, all .gif and .jpg files under any "images" directory could be written as <code>/images/.*(jpg|gif)$</code>. Note that httpd doesn't need the delimiting <code>//</code> so as to avoid "toothpicks" when matching URIs or paths, like: <code>/\/foo\/bar\/?/</code></p> <p>The best overview around is probably the <a class="external-link" href="http://perldoc.perl.org/perlre.html" rel="nofollow">one which comes with Perl</a>. Apache's regular expressions use <a class="external-link" href="http://www.pcre.org/" rel="nofollow">PCRE - Perl Compatible Regular Expressions</a>.</p> <h1 id="FAQ-BuildingApachehttpd">Building Apache httpd</h1> <h2 id="FAQ-WhydoIgetanerroraboutanundefinedreferenceto"+inet_ntoa"orother+inet_*symbols?">Why do I get an error about an undefined reference to "+inet_ntoa" or other +inet_* symbols?</h2> <p>If you have installed BIND-8 then this is normally due to a conflict between your include files and your libraries. BIND-8 installs its include files and libraries /usr/local/include/ and /usr/local/lib/, while the resolver that comes with your system is probably installed in /usr/include/ and /usr/lib/. If your system uses the header files in /usr/local/include/ before those in /usr/include/ but you do not use the new resolver library, then the two versions will conflict.</p> <p>To resolve this, you can either make sure you use the include files and libraries that came with your system or make sure to use the new include files and libraries. Adding -lbind to the EXTRA_LDFLAGS line in your Configuration file, then re-running Configure, should resolve the problem. (Apache versions 1.2.* and earlier use EXTRA_LFLAGS instead.)</p> <p>Note:As of BIND 8.1.1, the bind libraries and files are installed under /usr/local/bind by default, so you should not run into this problem. Should you want to use the bind resolvers you'll have to add the following to the respective lines:</p> <p>EXTRA_CFLAGS=-I/usr/local/bind/include EXTRA_LDFLAGS=-L/usr/local/bind/lib EXTRA_LIBS=-lbind</p> <h2 id="FAQ-Igetanerrorabout"configurefailedforsrclib/apr"">I get an error about "configure failed for srclib/apr"</h2> <p><em>This only applies to Apache 2.4 and later</em></p> <p>If you are building with the --with-included-apr option, you also need to download the *-deps tarball that matches the main release that you are trying to build, and extract it into the same directory.</p> <h2 id="FAQ-Whywon'tApachecompilewithmysystem'scc?">Why won't Apache compile with my system's cc?</h2> <p>If the server won't compile on your system, it is probably due to one of the following causes:</p> <p> <strong>The Configure script doesn't recognize your system environment.</strong></p> <div class="indent20 inline conf-macro output-inline" data-hasbody="true" data-macro-name="indent" style="margin-left: 20px;"><style type="text/css">div.inline p:first-child { display: inline; }</style>${renderedContent}</div> <p> <strong>Your system's C compiler is garbage.</strong></p> <div class="indent20 inline conf-macro output-inline" data-hasbody="true" data-macro-name="indent" style="margin-left: 20px;"><style type="text/css">div.inline p:first-child { display: inline; }</style>${renderedContent}</div> <p> <strong>Your include files may be confused.</strong></p> <div class="indent20 inline conf-macro output-inline" data-hasbody="true" data-macro-name="indent" style="margin-left: 20px;"><style type="text/css">div.inline p:first-child { display: inline; }</style>${renderedContent}</div> <p> <strong>Your operating system or compiler may be out of revision.</strong></p> <div class="indent20 inline conf-macro output-inline" data-hasbody="true" data-macro-name="indent" style="margin-left: 20px;"><style type="text/css">div.inline p:first-child { display: inline; }</style>${renderedContent}</div> <p>The Apache Group tests the ability to build the server on many different platforms. Unfortunately, we can't test all of the OS platforms there are. If you have verified that none of the above issues is the cause of your problem, and it hasn't been reported before, please submit a problem report. Be sure to include complete details, such as the compiler & OS versions and exact error messages.</p> <h2 id="FAQ-WhydoIgetcomplaintsaboutredefinitionof"structiovec"whencompilingunderLinux?">Why do I get complaints about redefinition of "struct iovec" when compiling under Linux?</h2> <p>This is a conflict between your C library includes and your kernel includes. You need to make sure that the versions of both are matched properly. There are two workarounds, either one will solve the problem:</p> <p>Remove the definition of struct iovec from your C library includes. It is located in /usr/include/sys/uio.h. Or, Add -DNO_WRITEV to the EXTRA_CFLAGS line in your Configuration and reconfigure/rebuild. This hurts performance and should only be used as a last resort.</p> <h2 id="FAQ-I'musinggccandIgetsomecompilationerrors,whatiswrong?">I'm using gcc and I get some compilation errors, what is wrong?</h2> <p>GCC parses your system header files and produces a modified subset which it uses for compiling. This behavior ties GCC tightly to the version of your operating system. So, for example, if you were running IRIX 5.3 when you built GCC and then upgrade to IRIX 6.2 later, you will have to rebuild GCC. Similarly for Solaris 2.4, 2.5, or 2.5.1 when you upgrade to 2.6. Sometimes you can type "gcc -v" and it will tell you the version of the operating system it was built against.</p> <p>If you fail to do this, then it is very likely that Apache will fail to build. One of the most common errors is with readv, writev, or uio.h. This is not a bug with Apache. You will need to re-install GCC.</p> <h1 id="FAQ-ErrorLogMessagesandProblemsStartingApache">Error Log Messages and Problems Starting Apache</h1> <h2 id="FAQ-WhydoIget"setgid:Invalidargument"atstartup?">Why do I get "setgid: Invalid argument" at startup?</h2> <p>Your Group directive (probably in conf/httpd.conf) needs to name a group that actually exists in the /etc/group file (or your system's equivalent). This problem is also frequently seen when a negative number is used in the Group directive (e.g., "Group #-1"). Using a group name – not group number – found in your system's group database should solve this problem in all cases.</p> <h2 id="FAQ-WhyamIgetting"httpd:couldnotsetsocketoptionTCP_NODELAY"inmyerrorlog?">Why am I getting "httpd: could not set socket option TCP_NODELAY" in my error log?</h2> <p>This message almost always indicates that the client disconnected before Apache reached the point of calling setsockopt() for the connection. It shouldn't occur for more than about 1% of the requests your server handles, and it's advisory only in any case.</p> <h2 id="FAQ-WhyamIgetting"connectionresetbypeer"inmyerrorlog?">Why am I getting "connection reset by peer" in my error log?</h2> <p>This is a normal message and nothing about which to be alarmed. It simply means that the client canceled the connection before it had been completely set up - such as by the end-user pressing the "Stop" button. People's patience being what it is, sites with response-time problems or slow network links may experience this more than high capacity ones or those with large pipes to the network.</p> <h2 id="FAQ-TheerrorlogsaysApachedumpedcore,butwhere'sthedumpfile?">The errorlog says Apache dumped core, but where's the dump file?</h2> <p>The error log message about dumped core includes the directory where the dump file <em>should</em> be located. However, many Unixes do not allow a process that has called setuid() to dump core for security reasons ('Is this still a problem?'); the typical Apache setup has the server started as root to bind to port 80, after which it uses setuid() to change UIDs to a non-privileged user to serve requests.</p> <p>Dealing with this is extremely operating system-specific, and may require rebuilding your system kernel. Consult your operating system documentation or vendor for more information about whether your system does this and how to bypass it. If there is a documented way of bypassing it, it is recommended that you bypass it only for the httpd server process if possible.</p> <p>The canonical location for Apache's core-dump files is the <a class="unresolved" href="#">ServerRoot</a> directory. The location can be set via the <a class="unresolved" href="#">CoreDumpDirectory</a> directive to a different directory. Make sure that this directory is writable by the user the server runs as (as opposed to the user the server is started as).</p> <h2 id="FAQ-WhenIrunitunderLinuxIget"shmget:functionnotfound",whatshouldIdo?">When I run it under Linux I get "shmget: function not found", what should I do?</h2> <p>Your kernel has been built without SysV IPC support. You will have to rebuild the kernel with that support enabled (it's under the "General Setup" submenu). Documentation for kernel building is beyond the scope of this FAQ; you should consult the Kernel HOWTO, or the documentation provided with your distribution, or a Linux newsgroup/mailing list. As a last-resort workaround, you can comment out the #define USE_SHMGET_SCOREBOARD definition in the LINUX section of src/conf.h and rebuild the server (prior to 1.3b4, simply removing #define HAVE_SHMGET would have sufficed). This will produce a server which is slower and less reliable.</p> <h2 id="FAQ-Serverhangs,orfailstostart,and/orerrorlogfillswith"fcntl:F_SETLKW:Norecordlocksavailable"orsimilarmessages">Server hangs, or fails to start, and/or error log fills with "fcntl: F_SETLKW: No record locks available" or similar messages</h2> <p>These are symptoms of a file locking problem, which usually means that the server is trying to use a synchronization file on an NFS filesystem.</p> <p>Because of its parallel-operation model, the Apache Web server needs to provide some form of synchronization when accessing certain resources. One of these synchronization methods involves taking out locks on a file, which means that the filesystem whereon the lockfile resides must support locking. In many cases this means it can't be kept on an NFS-mounted filesystem.</p> <p>To cause the Web server to work around the NFS locking limitations, include a line such as the following in your server configuration files:</p> <div class="preformatted panel conf-macro output-block" data-hasbody="true" data-macro-name="noformat" style="border-width: 1px;"><div class="preformattedContent panelContent"> <pre>LockFile /var/run/apache-lock </pre> </div></div> <p>The directory should not be generally writable (e.g., don't use /var/tmp). See the <a class="unresolved" href="#">LockFile</a> documentation for more information.</p> <h2 id="FAQ-WhenItrytostartApachefromaDOSwindow,Igetamessagelike"Cannotdeterminehostname.Usedirectivetosetitmanually."Whatdoesthismean?">When I try to start Apache from a DOS window, I get a message like "Cannot determine host name. Use <a class="unresolved" href="#">ServerName</a> directive to set it manually." What does this mean?</h2> <p>It means what it says; the Apache software can't determine the hostname of your system. Edit your conf\httpd.conf file, look for the string "ServerName", and make sure there's an uncommented directive such as</p> <p><a class="unresolved" href="#">ServerName</a> localhost or</p> <p><a class="unresolved" href="#">ServerName</a> www.foo.com in the file. Correct it if there one there with wrong information, or add one if you don't already have one.</p> <p>Also, make sure that your Windows system has DNS enabled. See the TCP/IP setup component of the Networking or Internet Options control panel.</p> <p>After verifying that DNS is enabled and that you have a valid hostname in your <a class="unresolved" href="#">ServerName</a> directive, try to start the server again.</p> <h2 id="FAQ-WhenItrytostartApacheonWindows,Igetamessagelike"Systemerror1067hasoccurred.Theprocessterminatedunexpectedly."Whatdoesthismean?">When I try to start Apache on Windows, I get a message like "System error 1067 has occurred. The process terminated unexpectedly." What does this mean?</h2> <p>This message means that the Web server was unable to start correctly for one reason or another. To find out why, execute the following commands in a DOS window:</p> <ul> <li>c: cd "\Program Files\Apache Group\Apache" apache <br class="atl-forced-newline"/></li> </ul> <p>(If you don't get the prompt back, hit Control-C to cause Apache to exit.)</p> <p>The error you see will probably be one of those preceding this question in the FAQ.</p> <p>First check the Windows NT Event Log for Application errors using the Windows NT/2000 Event Viewer program. Any errors that occur prior to opening the Apache error log will be stored here, if Apache is run as a Service on NT or 2000. As with any error, also check your Apache error log.</p> <h2 id="FAQ-OnaSuSELinuxsystem,Itryandconfigureaccesscontrolusingbasicauthentication.AlthoughIfollowtheexampleexactly,authenticationfails,andanerrormessage"admin:notavalidFDN:...."islogged.">On a SuSE Linux system, I try and configure access control using basic authentication. Although I follow the example exactly, authentication fails, and an error message "admin: not a valid FDN: ...." is logged.</h2> <p>In the SuSE distribution, additional 3rd party authentication modules have been added and activated by default. These modules interfere with the Apache standard modules and cause Basic authentication to fail. Our recommendation is to comment all those modules in /etc/httpd/suse_addmodule.conf and /etc/httpd/suse_loadmodule.conf which are not actually required for running your server.</p> <h2 id="FAQ-WhyamIgettingserverrestartmessagesperiodically,whenIdidnotrestarttheserver?">Why am I getting server restart messages periodically, when I did not restart the server?</h2> <p>Problem: You are noticing restart messages in your error log, periodically, when you know you did not restart the server yourself:</p> <div class="preformatted panel conf-macro output-block" data-hasbody="true" data-macro-name="noformat" style="border-width: 1px;"><div class="preformattedContent panelContent"> <pre> [Thu Jun 6 04:02:01 2002] [notice] SIGHUP received. Attempting to restart [Thu Jun 6 04:02:02 2002] [notice] Apache configured -- resuming normal operations </pre> </div></div> <p>Check your cron jobs to see when/if your server logs are being rotated. Compare the time of rotation to the error message time. If they are the same, you can somewhat safely assume that the restart is due to your server logs being rotated.</p> <h2 id="FAQ-WhyamIgetting"modulemodule-nameisnotcompatiblewiththisversionofApache"messagesinmyerrorlog?">Why am I getting "module module-name is not compatible with this version of Apache" messages in my error log?</h2> <p>Module Magic Number (MMN) is a constant defined in Apache source that is associated with binary compatibility of modules. It is changed when internal Apache structures, function calls and other significant parts of API change in such a way that binary compatibility cannot be guaranteed any more. On MMN change, all third party modules have to be at least recompiled, sometimes even slightly changed in order to work with the new version of Apache.</p> <p>If you're getting the above error messages, contact the vendor of the module for the new binary, or compile it if you have access to the source code.</p> <h2 id="FAQ-I'vedownloadedamodulefromasourceItrust,butmylineisasyntaxerror?">I've downloaded a module from a source I trust, but my <a class="unresolved" href="#">LoadModule</a> line is a syntax error?</h2> <p>Have you checked for simple errors like a typo, or an incorrect path to the module?</p> <p>Another reason you may be unable to load a module is if it relies on libraries (Unix-family .so or Windows .dll) that are not loaded into the server. Such libraries can be loaded using the <strong>LoadFile</strong> directive, which must appear <strong>before</strong> your <a class="unresolved" href="#">LoadModule</a> line in the configuration. The module's provider should document any such dependencies.</p> <p>There's a particular Gotcha on Windows:</p> <ul> <li><div class="preformatted panel conf-macro output-block" data-hasbody="true" data-macro-name="noformat" style="border-width: 1px;"><div class="preformattedContent panelContent"> <pre>httpd: Syntax error on line nn of C:/IBM/HTTP/conf/httpd.conf: Cannot load C:/IBM/HTTP/modules/mod_foo.so into server: The specified module could not be found. </pre> </div></div> <br class="atl-forced-newline"/></li> </ul> <p>Googling the error message tells us there's a missing library, but there doesn't appear to be, and the identical configuration works on one computer but fails with this message on another. What gives?</p> <p>This error may happen because you need to install the Windows C Runtime Libraries on the target machine. Note that this doesn't mean you need to load them explicitly into HTTPD, just install them on the host machine! This is likely to affect users of IBM's httpd trying to load modules not supplied by IBM, and might arise in other circumstances where the server and the module are compiled using different build options.</p> <h1 id="FAQ-ConfigurationQuestions">Configuration Questions</h1> <h2 id="FAQ-Whycan'tIrunmorethan<n>virtualhosts?">Why can't I run more than <n> virtual hosts?</h2> <p>You are probably running into resource limitations in your operating system. The most common limitation is the per-process limit on file descriptors, which is almost always the cause of problems seen when adding virtual hosts. Apache often does not give an intuitive error message because it is normally some library routine (such as gethostbyname()) which needs file descriptors and doesn't complain intelligibly when it can't get them.</p> <p>Each log file requires a file descriptor, which means that if you are using separate access and error logs for each virtual host, each virtual host needs two file descriptors. Each Listen directive also needs a file descriptor.</p> <p>Typical values for <n> that we've seen are in the neighborhood of 1024 or 2048. When the server bumps into the file descriptor limit, it may dump core with a SIGSEGV, it might just hang, or it may limp along and you'll see (possibly meaningful) errors in the error log. One common problem that occurs when you run into a file descriptor limit is that CGI scripts stop being executed properly.</p> <p>As to what you can do about this:</p> <p> <strong>Reduce the number of Listen directives</strong></p> <div class="indent20 inline conf-macro output-inline" data-hasbody="true" data-macro-name="indent" style="margin-left: 20px;"><style type="text/css">div.inline p:first-child { display: inline; }</style>${renderedContent}</div> <p> <strong>Reduce the number of log files</strong></p> <div class="indent20 inline conf-macro output-inline" data-hasbody="true" data-macro-name="indent" style="margin-left: 20px;"><style type="text/css">div.inline p:first-child { display: inline; }</style>${renderedContent}</div> <p> <strong>Increase the number of file descriptors available to the server</strong></p> <div class="indent20 inline conf-macro output-inline" data-hasbody="true" data-macro-name="indent" style="margin-left: 20px;"><style type="text/css">div.inline p:first-child { display: inline; }</style>${renderedContent}</div> <p> <strong>"Don't do that" - try to run with fewer virtual hosts</strong></p> <div class="indent20 inline conf-macro output-inline" data-hasbody="false" data-macro-name="indent" style="margin-left: 20px;"><style type="text/css">div.inline p:first-child { display: inline; }</style>${renderedContent}</div> <p>Spread your operation across multiple server processes (using Listen for example, but see the first point) and/or ports. Since this is an operating-system limitation, there's not much else available in the way of solutions.</p> <h2 id="FAQ-Whydoesn'tmy401work?">Why doesn't my <a class="unresolved" href="#">ErrorDocument</a> 401 work?</h2> <p>You need to use it with a URL in the form "/foo/bar" and not one with a method and hostname such as "http://host/foo/bar". See the <a class="unresolved" href="#">ErrorDocument</a> documentation for details. This was incorrectly documented in the past.</p> <h2 id="FAQ-WhydoesApachesendacookieoneveryresponse?">Why does Apache send a cookie on every response?</h2> <p>Apache does not automatically send a cookie on every response, unless you have re-compiled it with the mod_usertrack module, and specifically enabled it with the <a class="unresolved" href="#">CookieTracking</a> directive. This module may help track users, and uses cookies to do this. If you are not using the data generated by mod_usertrack, do not compile it into Apache.</p> <h2 id="FAQ-Whydon'tmycookieswork?">Why don't my cookies work?</h2> <p>Apache httpd passes on your Set-Cookie header, like any other header. If cookies do not work it will be because your script does not work properly or your browser does not use cookies or is not set-up to accept them.</p> <h2 id="FAQ-HowdoIaddbrowsersandreferrerstomylogs?">How do I add browsers and referrers to my logs?</h2> <p>Apache provides a couple of different ways of doing this. The recommended method is to compile the mod_log_config module into your configuration and use the <a class="unresolved" href="#">CustomLog</a> directive.</p> <p>You can either log the additional information in files other than your normal transfer log, or you can add them to the records already being written. For example:</p> <p><a class="unresolved" href="#">CustomLog</a> logs/access_log "%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\""</p> <p>This will add the values of the User-agent: and Referer: headers, which indicate the client and the referring page, respectively, to the end of each line in the access log.</p> <p>You may want to check out the Apache Week article entitled: <a class="external-link" href="http://www.apacheweek.com/features/logfiles" rel="nofollow">"Gathering Visitor Information: Customizing Your Logfiles"</a>.</p> <h2 id="FAQ-WhydoesaccessingdirectoriesonlyworkwhenIincludethetrailing"/"(e.g.,http://foo.domain.com/~user/)butnotwhenIomitit(e.g.,http://foo.domain.com/~user)?">Why does accessing directories only work when I include the trailing "/" (e.g., <a class="external-link" href="http://foo.domain.com/~user/" rel="nofollow">http://foo.domain.com/~user/</a>) but not when I omit it (e.g., <a class="external-link" href="http://foo.domain.com/~user)?" rel="nofollow">http://foo.domain.com/~user)?</a></h2> <p>When you access a directory without a trailing "/", Apache needs to send what is called a redirect to the client to tell it to add the trailing slash. If it did not do so, relative URLs would not work properly. When it sends the redirect, it needs to know the name of the server so that it can include it in the redirect. There are two ways for Apache to find this out; either it can guess, or you can tell it. If your DNS is configured correctly, it can normally guess without any problems. If it is not, however, then you need to tell it.</p> <p>Add a <a class="unresolved" href="#">ServerName</a> directive to the config file to tell it what the domain name of the server is.</p> <p>The other thing that can occasionally cause this symptom is a misunderstanding of the Alias directive, resulting in an alias working with a trailing slash, and not without one. The Alias directive is very literal, and aliases what you tell it to. Consider the following example:</p> <ul> <li>Alias /example/ /home/www/example/ <br class="atl-forced-newline"/></li> </ul> <p>The above directive creates an alias for URLs starting with /example/, but does not alias URLs starting with /example. That is to say, a URL such as <a class="external-link" href="http://servername.com/example/" rel="nofollow">http://servername.com/example/</a> will get the desired content, but a URL such as <a class="external-link" href="http://servername.com/example" rel="nofollow">http://servername.com/example</a> will result in a "file not found" error.</p> <p>The following Alias, on the other hand, will work for both cases:</p> <ul> <li>Alias /example /home/www/example <br class="atl-forced-newline"/></li> </ul> <h2 id="FAQ-Whydoesn'tmod_infolistanydirectives?">Why doesn't mod_info list any directives?</h2> <p>The mod_info module allows you to use a Web browser to see how your server is configured. Among the information it displays is the list of modules and their configuration directives. The "current" values for the directives are not necessarily those of the running server; they are extracted from the configuration files themselves at the time of the request. If the files have been changed since the server was last reloaded, the display will not match the values actively in use. If the files and the path to the files are not readable by the user as which the server is running (see the User directive), then mod_info cannot read them in order to list their values. An entry will be made in the error log in this event, however.</p> <h2 id="FAQ-My.htaccessfilesarebeingignored.">My .htaccess files are being ignored.</h2> <p>This is almost always due to your <a class="unresolved" href="#">AllowOverride</a> directive being set incorrectly for the directory in question. If it is set to None then .htaccess files will not even be looked for. That is a good thing. If you have access to edit the httpd.conf, you should not use .htaccess files, ever. If your customers do need support for .htaccess, make sure that <a class="unresolved" href="#">AllowOverride</a> is set to something sensible (i.e.: Not All). Be certain it covers the directory you are trying to use the .htaccess file in. This is normally accomplished by ensuring it is inside the proper Directory container.</p> <p>You can tell if this is your problem by adding nonsense text to your .htaccess file and reloading the page. If you <em>do not</em> get a server error, then Apache httpd is not reading your .htaccess file.</p> <h2 id="FAQ-WhydoIgeta"Forbidden"messagewheneverItrytoaccessaparticulardirectory?">Why do I get a "Forbidden" message whenever I try to access a particular directory?</h2> <p>This message is generally caused because either</p> <ul> <li>The underlying file system permissions do not allow the User/Group under which Apache is running to access the necessary files; or</li> <li>The Apache configuration has some access restrictions in place which forbid access to the files. <br class="atl-forced-newline"/></li> </ul> <p>You can determine which case applies to your situation by checking the error log.</p> <p>In the case where file system permission are at fault, see <a href="/confluence/display/HTTPD/13PermissionDenied">(13) Permission Denied</a> for more info.</p> <h2 id="FAQ-WhydomyfilesappearcorrectlyinInternetExplorer,butshowupassourceortriggerasavewindowwithNetscape;or,Whydoesn'tInternetExplorerrendermytext/plaindocumentcorrectly?">Why do my files appear correctly in Internet Explorer, but show up as source or trigger a save window with Netscape; or, Why doesn't Internet Explorer render my text/plain document correctly?</h2> <p>MS Internet Explorer (MSIE) and Netscape handle mime type detection in different ways, and therefore will display the document differently. In particular, IE sometimes relies on the file extension or the contents of the file to determine the mime type. This can happen when the server specifies a mime type of application/octet-stream or text/plain. This behavior violates the the HTTP standard and makes it impossible to deliver plain text documents to MSIE clients in some cases. More details are available on MSIE's mime type detection behavior in an MSDN article and a note by Alan J. Flavell.</p> <p>The best you can do as a server administrator is to accurately configure the mime type of your documents by editing the mime.types file or using an <a class="unresolved" href="#">AddType</a> directive in the Apache configuration files. In some cases, you may be able to fool MSIE into rendering text/plain documents correctly by assuring they have a .txt filename extension, but this will not work if MSIE thinks the content looks like another file type.</p> <h2 id="FAQ-Mysiteisaccessibleundermanydifferenthostnames;howdoIredirectclientssothattheyseeonlyasinglename?">My site is accessible under many different hostnames; how do I redirect clients so that they see only a single name?</h2> <p>Many sites map a variety of hostnames to the same content. For example, www.example.com, example.com and www.example.net may all refer to the same site. It is best to make sure that, regardless of the name clients use to access the site, they will be redirected to a single, canonical hostname. This makes the site easier to maintain and assures that there will be only one version of the site in proxy caches and search engines.</p> <p>There are two techniques to implement canonical hostnames:</p> <h3 id="FAQ-Usemod_rewriteasdescribedinthe"CanonicalHostnames"sectionoftheURLRewritingGuide.">Use mod_rewrite as described in the "Canonical Hostnames" section of the URL Rewriting Guide.</h3> <p>See <a class="external-link" href="http://httpd.apache.org/docs/current/rewrite/remapping.html#canonicalhost" rel="nofollow">http://httpd.apache.org/docs/current/rewrite/remapping.html#canonicalhost</a> .</p> <h3 id="FAQ-Usename-basedvirtualhosting:">Use name-based virtual hosting:</h3> <ul> <li><div class="preformatted panel conf-macro output-block" data-hasbody="true" data-macro-name="noformat" style="border-width: 1px;"><div class="preformattedContent panelContent"> <pre>NameVirtualHost *:80 <VirtualHost *:80> ServerName www.example.net ServerAlias example.com Redirect permanent / http://www.example.com/ </VirtualHost> <VirtualHost *:80> ServerName www.example.com DocumentRoot /usr/local/apache/htdocs </VirtualHost> </pre> </div></div> <br class="atl-forced-newline"/></li> </ul> <h2 id="FAQ-WhycanIaccessmywebsitefromtheserverorfrommylocalnetwork,butIcan'taccessitfromelsewhereontheInternet?">Why can I access my website from the server or from my local network, but I can't access it from elsewhere on the Internet?</h2> <p>There are many possible reasons for this, and almost all of them are related to the configuration of your network, not the configuration of the Apache HTTP Server. One of the most common problems is that a firewall blocks access to the default HTTP port 80. In particular, many consumer ISPs block access to this port. You can see if this is the case by changing any Port and Listen directives in httpd.conf to use port 8000 and then request your site using <a class="external-link" href="http://yourhost.example.com:8000/" rel="nofollow">http://yourhost.example.com:8000/</a>. (Of course, a very restrictive firewall may block this port as well.)</p> <h2 id="FAQ-HowdoIturnautomaticdirectorylistingsonoroff?">How do I turn automatic directory listings on or off?</h2> <p>If a client requests a URL that designates a directory and the directory does not contain a filename that matches the <a class="unresolved" href="#">DirectoryIndex</a> directive, then mod_autoindex can be configured to present a listing of the directory contents.</p> <p>To turn on automatic directory indexing, find the Options directive that applies to the directory and add the Indexes keyword. For example:</p> <ul> <li><div class="preformatted panel conf-macro output-block" data-hasbody="true" data-macro-name="noformat" style="border-width: 1px;"><div class="preformattedContent panelContent"> <pre><Directory /path/to/directory> Options +Indexes </Directory> </pre> </div></div> <br class="atl-forced-newline"/></li> </ul> <p>To turn off automatic directory indexing, remove the Indexes keyword from the appropriate Options line. To turn off directory listing for a particular subdirectory, you can use Options -Indexes. For example:</p> <ul> <li><div class="preformatted panel conf-macro output-block" data-hasbody="true" data-macro-name="noformat" style="border-width: 1px;"><div class="preformattedContent panelContent"> <pre><Directory /path/to/directory> Options -Indexes </Directory> </pre> </div></div> <br class="atl-forced-newline"/></li> </ul> <h2 id="FAQ-WhydomyOptionsdirectivesnothavethedesiredeffect?">Why do my Options directives not have the desired effect?</h2> <p>Directives placed in the configuration files are applied in a very particular order, as described by <a class="external-link" href="http://httpd.apache.org/docs/current/sections.html" rel="nofollow">How Directory, Location, and Files sections work</a>. In addition, each Options directive has the effect of resetting the options to none before adding the specified options (unless only "+" and "-" options are used). The consequence is that Options set in the main server or virtual host context (outside any directory, location, or files section) will usually have no effect, because they are overridden by more specific Options directives. For example, in the following</p> <div class="preformatted panel conf-macro output-block" data-hasbody="true" data-macro-name="noformat" style="border-width: 1px;"><div class="preformattedContent panelContent"> <pre><Directory /usr/local/apache/htdocs> Options Indexes </Directory> Options Includes ExecCGI </pre> </div></div> <p>Includes and ExecCGI will be off in the /usr/local/apache/htdocs directory.</p> <p>You can usually avoid problems by either finding the Options directive that already applies to a specific directory and changing it, or by putting your Options directive inside the most specific possible <Directory> section.</p> <h2 id="FAQ-HowcanIchangetheinformationthatApachereturnsaboutitselfintheheaders?">How can I change the information that Apache returns about itself in the headers?</h2> <p>When a client connects to Apache, part of the information returned in the headers is the name "Apache" Additional information that can be sent is the version number, such as "2.2.17", the operating system, and a list of non-standard modules you have installed.</p> <p>For example:</p> <p>Server: Apache/2.2.17 (Unix) mod_perl/1.26 Frequently, people want to remove this information, under the mistaken understanding that this will make the system more secure. This is probably not the case, as the same exploits will likely be attempted regardless of the header information you provide.</p> <p>There are, however, two answers to this question: the correct answer, and the answer that you are probably looking for.</p> <p>The correct answer to this question is that you should use the <a class="unresolved" href="#">ServerTokens</a> directive to alter the quantity of information which is passed in the headers. Setting this directive to Prod will pass the least possible amount of information:</p> <p>Server: Apache The answer you are probably looking for is how to make Apache lie about what what it is, ie send something like:</p> <p>Server: Bob's Happy HTTPd Server In order to do this, you will need to modify the Apache source code and rebuild Apache. This is not advised, as it is almost certain not to provide you with the added security you think that you are gaining. The exact method of doing this is left as an exercise for the reader, as we are not keen on helping you do something that is intrinsically a bad idea.</p> <h2 id="FAQ-WhydoIseerequestsforothersitesappearinginmylogfiles?">Why do I see requests for other sites appearing in my log files?</h2> <p>An access_log entry showing this situation could look like this:</p> <p /><p /><p /><p /><p /><p><p class="conf-macro output-block" data-hasbody="true" data-macro-name="unmigrated-wiki-markup">63.251.56.142 - - [25/Jul/2002:12:48:04 -0700] "GET <span class="nobr"><a href="http://www.yahoo.com/" class="external-link" rel="nofollow">http://www.yahoo.com/<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0" /></sup></a></span> HTTP/1.0" 200 1456 The question is: why did a request for www.yahoo.com come to your server instead of Yahoo's server? And why does the response have a status code of 200 (success)?</p></p><p /><p /><p /><p /><p /> <p>This is usually the result of malicious clients trying to exploit open proxy servers to access a website without revealing their true location. If you find entries like this in your log, the first thing to do is to make sure you have properly configured your server not to proxy for unknown clients. If you don't need to provide a proxy server at all, you should simply assure that the <a class="unresolved" href="#">ProxyRequests</a> directive is not set on. If you do need to run a proxy server, then you must ensure that you secure your server properly so that only authorized clients can use it.</p> <p>If your server is configured properly, then the attempt to proxy through your server will fail. If you see a status code of 404 (file not found) in the log, then you know that the request failed. If you see a status code of 200 (success), that does not necessarily mean that the attempt to proxy succeeded. RFC2616 section 5.1.2 mandates that Apache must accept requests with absolute URLs in the request-URI, even for non-proxy requests. Since Apache has no way to know all the different names that your server may be known under, it cannot simply reject hostnames it does not recognize. Instead, it will serve requests for unknown sites locally by stripping off the hostname and using the default server or virtual host. Therefore you can compare the size of the file (1456 in the above example) to the size of the corresponding file in your default server. If they are the same, then the proxy attempt failed, since a document from your server was delivered, not a document from www.yahoo.com.</p> <p>If you wish to prevent this type of request entirely, then you need to let Apache know what hostnames to accept and what hostnames to reject. You do this by configuring name-virtual hosts, where the first listed host is the default host that will catch and reject unknown hostnames. For example:</p> <div class="preformatted panel conf-macro output-block" data-hasbody="true" data-macro-name="noformat" style="border-width: 1px;"><div class="preformattedContent panelContent"> <pre>NameVirtualHost *:80 <VirtualHost *:80> ServerName default.only <Location /> Order allow,deny Deny from all </Location> </VirtualHost> <VirtualHost *:80> ServerName realhost1.example.com ServerAlias alias1.example.com alias2.example.com DocumentRoot /path/to/site1 </VirtualHost> ... </pre> </div></div> <h1 id="FAQ-DynamicContent(CGIandSSI)">Dynamic Content (CGI and SSI)</h1> <h2 id="FAQ-HowdoIenableCGIexecutionindirectoriesotherthanthe?">How do I enable CGI execution in directories other than the <a class="unresolved" href="#">ScriptAlias</a>?</h2> <p>Apache recognizes all files in a directory named as a <a class="unresolved" href="#">ScriptAlias</a> as being eligible for execution rather than processing as normal documents. This applies regardless of the file name, so scripts in a <a class="unresolved" href="#">ScriptAlias</a> directory don't need to be named "*.cgi" or "*.pl" or whatever. In other words, all files in a <a class="unresolved" href="#">ScriptAlias</a> directory are scripts, as far as Apache is concerned.</p> <p>To persuade Apache to execute scripts in other locations, such as in directories where normal documents may also live, you must tell it how to recognize them - and also that it's okay to execute them. For this, you need to use something like the <a class="unresolved" href="#">AddHandler</a> directive.</p> <p>In an appropriate section of your server configuration files, add a line such as <a class="unresolved" href="#">AddHandler</a> cgi-script .cgi The server will then recognize that all files in that location (and its logical descendants) that end in ".cgi" are script files, not documents.</p> <p>Make sure that the directory location is covered by an Options declaration that includes the ExecCGI option. In some situations, you might not want to actually allow all files named "*.cgi" to be executable. Perhaps all you want is to enable a particular file in a normal directory to be executable. This can be alternatively accomplished via mod_rewrite and the following steps:</p> <p>Locally add to the corresponding .htaccess file a ruleset similar to this one:</p> <div class="preformatted panel conf-macro output-block" data-hasbody="true" data-macro-name="noformat" style="border-width: 1px;"><div class="preformattedContent panelContent"> <pre>RewriteEngine on RewriteBase /~foo/bar/ RewriteRule ^quux\.cgi$ - [T=application/x-httpd-cgi] </pre> </div></div> <p>Make sure that the directory location is covered by an Options declaration that includes the ExecCGI and <a class="unresolved" href="#">FollowSymLinks</a> option.</p> <h2 id="FAQ-WhatdoesitmeanwhenmyCGIsfailwith"Prematureendofscriptheaders"?">What does it mean when my CGIs fail with "Premature end of script headers"?</h2> <p>It means just what it says: the server was expecting a complete set of HTTP headers (one or more followed by a blank line), and didn't get them.</p> <p>The most common cause of this problem is the script dying before sending the complete set of headers, or possibly any at all, to the server. To see if this is the case, try running the script standalone from an interactive session, rather than as a script under the server. If you get error messages, this is almost certainly the cause of the "premature end of script headers" message. Even if the CGI runs fine from the command line, remember that the environment and permissions may be different when running under the web server. The CGI can only access resources allowed for the User and Group specified in your Apache configuration. In addition, the environment will not be the same as the one provided on the command line, but it can be adjusted using the directives provided by mod_env.</p> <p>The second most common cause of this (aside from people not outputting the required headers at all) is a result of an interaction with Perl's output buffering. To make Perl flush its buffers after each output statement, insert the following statements around the print or write statements that send your HTTP headers:</p> <p>{{{#!perl<br/> {<br/> my $current_file_handle = select (STDOUT);<br/> local $| = 1;<br/> #<br/> # print your HTTP headers here<br/> #<br/> select ($current_file_handle);<br/> }<br/> }}}<br/> This is generally only necessary when you are calling external programs from your script that send output to stdout, or if there will be a long delay between the time the headers are sent and the actual content starts being emitted. To maximize performance, you should turn buffer-flushing back off (with $| = 0 or the equivalent) after the statements that send the headers, as displayed above.</p> <p>If your script isn't written in Perl, do the equivalent thing for whatever language you are using (e.g., for C, call fflush() after writing the headers).</p> <p>Another cause for the "premature end of script headers" message are the RLimitCPU and RLimitMEM directives. You may get the message if the CGI script was killed due to a resource limit.</p> <p>In addition, a configuration problem in suEXEC, mod_perl, or another third party module can often interfere with the execution of your CGI and cause the "premature end of script headers" message.</p> <h2 id="FAQ-WhydoIkeepgetting"MethodNotAllowed"forformPOSTrequests?">Why do I keep getting "Method Not Allowed" for form POST requests?</h2> <p>This is almost always due to Apache not being configured to treat the file you are trying to POST to as a CGI script. You can not POST to a normal HTML file; the operation has no meaning. See the FAQ entry on CGIs outside <a class="unresolved" href="#">ScriptAliased</a> directories for details on how to configure Apache to treat the file in question as a CGI.</p> <h2 id="FAQ-HowdoIenableSSI(parsedHTML)?">How do I enable SSI (parsed HTML)?</h2> <p>SSI (an acronym for Server-Side Include) directives allow static HTML documents to be enhanced at run-time (e.g., when delivered to a client by Apache). The format of SSI directives is covered in the mod_include manual; suffice it to say that Apache supports not only SSI but xSSI (eXtended SSI) directives.</p> <p>Processing a document at run-time is called parsing it; hence the term "parsed HTML" sometimes used for documents that contain SSI instructions. Parsing tends to be resource-consumptive compared to serving static files, and is not enabled by default. It can also interfere with the cachability of your documents, which can put a further load on your server. (See the next question for more information about this.)</p> <p>To enable SSI processing, you need to</p> <ul> <li>Build your server with the mod_include module. This is normally compiled in by default.</li> <li>Make sure your server configuration files have an Options directive which permits Includes.</li> <li>Make sure that the directory where you want the SSI documents to live is covered by the "INCLUDEES" content filter, either explicitly or in some ancestral location. That can be done with the following directives: <br class="atl-forced-newline"/></li> </ul> <div class="preformatted panel conf-macro output-block" data-hasbody="true" data-macro-name="noformat" style="border-width: 1px;"><div class="preformattedContent panelContent"> <pre>AddType text/html .shtml AddOutputFilter INCLUDES .shtml </pre> </div></div> <p>This indicates that all files ending in ".shtml" in that location (or its descendants) should be parsed. Note that using ".html" will cause all normal HTML files to be parsed, which may put an inordinate load on your server.</p> <p>For additional information, see the <a class="external-link" href="http://httpd.apache.org/docs/current/mod/mod_include.html" rel="nofollow">mod_include documentation</a>.</p> <h2 id="FAQ-Whydon'tmyparsedfilesgetcached?">Why don't my parsed files get cached?</h2> <p>Since the server is performing run-time processing of your SSI directives, which may change the content shipped to the client, it can't know at the time it starts parsing what the final size of the result will be, or whether the parsed result will always be the same. This means that it can't generate Content-Length or Last-Modified headers. Caches commonly work by comparing the Last-Modified of what's in the cache with that being delivered by the server. Since the server isn't sending that header for a parsed document, whatever's doing the caching can't tell whether the document has changed or not - and so fetches it again to be on the safe side.</p> <p>You can work around this in some cases by causing an Expires header to be generated. (See the mod_expires documentation for more details.) Another possibility is to use the XBitHack Full mechanism, which tells Apache to send (under certain circumstances detailed in the XBitHack directive description) a Last-Modified header based upon the last modification time of the file being parsed. Note that this may actually be lying to the client if the parsed file doesn't change but the SSI-inserted content does; if the included content changes often, this can result in stale copies being cached.</p> <h2 id="FAQ-HowcanIhavemyscriptoutputparsed?">How can I have my script output parsed?</h2> <p>So you want to include SSI directives in the output from your CGI script, but can't figure out how to do it? The short answer is "you can't." This is potentially a security liability and, more importantly, it can not be cleanly implemented under the current server API. The best workaround is for your script itself to do what the SSIs would be doing. After all, it's generating the rest of the content.</p> <h2 id="FAQ-SSIsdon'tworkforand/oruserhomedirectories.">SSIs don't work for <a class="unresolved" href="#">VirtualHosts</a> and/or user home directories.</h2> <p>This is almost always due to having some setting in your config file that sets "Options Includes" or some other setting for your <a class="unresolved" href="#">DocumentRoot</a> but not for other directories. If you set it inside a Directory section, then that setting will only apply to that directory.</p> <h2 id="FAQ-WhyistheenvironmentvariableREMOTE_USERnotset?">Why is the environment variable REMOTE_USER not set?</h2> <p>This variable is set and thus available in SSI or CGI scripts if and only if the requested document was protected by access authentication. For an explanation on how to implement these restrictions, see <a class="external-link" href="http://www.apacheweek.com/features/userauth" rel="nofollow">Apache Week's articles on Using User Authentication or DBM User Authentication</a>.</p> <p>Hint: When using a CGI script to receive the data of a HTML FORM, notice that protecting the document containing the FORM is not sufficient to provide REMOTE_USER to the CGI script. You have to protect the CGI script, too. Or alternatively only the CGI script (then authentication happens only after filling out the form).</p> <h2 id="FAQ-HowdoIalloweachofmyuserdirectoriestohaveacgi-bindirectory?">How do I allow each of my user directories to have a cgi-bin directory?</h2> <p>Remember that CGI execution does not need to be restricted only to cgi-bin directories. You can allow CGI script execution in arbitrary parts of your filesystem.</p> <p>There are many ways to give each user directory a cgi-bin directory such that anything requested as <a class="external-link" href="http://example.com/~user/cgi-bin/program" rel="nofollow">http://example.com/~user/cgi-bin/program</a> will be executed as a CGI script. Two alternatives are:</p> <p>Place the cgi-bin directory next to the public_html directory:</p> <div class="preformatted panel conf-macro output-block" data-hasbody="true" data-macro-name="noformat" style="border-width: 1px;"><div class="preformattedContent panelContent"> <pre>ScriptAliasMatch ^/~([^/]*)/cgi-bin/(.*) /home/$1/cgi-bin/$2 Place the cgi-bin directory underneath the public_html directory: <Directory /home/*/public_html/cgi-bin> Options ExecCGI SetHandler cgi-script </Directory> </pre> </div></div> <p>If you are using suexec, the first technique will not work because CGI scripts must be stored under the public_html directory.</p> <h1 id="FAQ-AuthenticationandAccessRestrictions">Authentication and Access Restrictions</h1> <h2 id="FAQ-Whyisn'trestrictingaccessbyhostordomainnameworkingcorrectly?">Why isn't restricting access by host or domain name working correctly?</h2> <p>Two of the most common causes of this are:</p> <p> <strong>An error, inconsistency, or unexpected mapping in the DNS registration</strong></p> <div class="indent20 inline conf-macro output-inline" data-hasbody="false" data-macro-name="indent" style="margin-left: 20px;"><style type="text/css">div.inline p:first-child { display: inline; }</style>${renderedContent}</div> <p>This happens frequently: your configuration restricts access to Host.FooBar.Com, but you can't get in from that host. The usual reason for this is that Host.FooBar.Com is actually an alias for another name, and when Apache performs the address-to-name lookup it's getting the real name, not Host.FooBar.Com. You can verify this by checking the reverse lookup yourself. The easiest way to work around it is to specify the correct host name in your configuration.</p> <p> <strong>Inadequate checking and verification in your configuration of Apache</strong></p> <div class="indent20 inline conf-macro output-inline" data-hasbody="false" data-macro-name="indent" style="margin-left: 20px;"><style type="text/css">div.inline p:first-child { display: inline; }</style>${renderedContent}</div> <p>If you intend to perform access checking and restriction based upon the client's host or domain name, you really need to configure Apache to double-check the origin information it's supplied. You do this by adding this to your configuration:</p> <div class="preformatted panel conf-macro output-block" data-hasbody="true" data-macro-name="noformat" style="border-width: 1px;"><div class="preformattedContent panelContent"> <pre>HostnameLookups Double </pre> </div></div> <p>This will cause Apache to be very paranoid about making sure a particular host address is really assigned to the name it claims to be. Note that this can incur a significant performance penalty, however, because of all the name resolution requests being sent to a nameserver.</p> <h2 id="FAQ-HowdoIsetupApachetorequireausernameandpasswordtoaccesscertaindocuments?">How do I set up Apache to require a username and password to access certain documents?</h2> <p>There are several ways to do this; some of the more popular ones are to use the <a class="external-link" href="http://httpd.apache.org/docs/current/mod/mod_authn_file.html" rel="nofollow">mod_authn_file</a>, <a class="external-link" href="http://httpd.apache.org/docs/current/mod/mod_authn_dbd.html" rel="nofollow">mod_authn_dbd</a>, or <a class="external-link" href="http://httpd.apache.org/docs/current/mod/mod_authnz_ldap.html" rel="nofollow">mod_authnz_ldap</a> modules.</p> <p>For an explanation on how to implement these restrictions, see <a class="external-link" href="http://httpd.apache.org/docs/current/howto/auth.html" rel="nofollow">the authentication tutorial in the Apache HTTP Server documentation</a>.</p> <h2 id="FAQ-HowdoIsetupApachetoallowaccesstocertaindocumentsonlyifasiteiseitheralocalsiteortheusersuppliesapasswordandusername?">How do I set up Apache to allow access to certain documents only if a site is either a local site or the user supplies a password and username?</h2> <p>Use the Satisfy directive, in particular the Satisfy Any directive, to require that only one of the access restrictions be met. For example, adding the following configuration to a .htaccess or server configuration file would restrict access to people who either are accessing the site from a host under domain.com or who can supply a valid username and password:</p> <div class="preformatted panel conf-macro output-block" data-hasbody="true" data-macro-name="noformat" style="border-width: 1px;"><div class="preformattedContent panelContent"> <pre>Deny from all Allow from .domain.com AuthType Basic AuthUserFile /usr/local/apache/conf/htpasswd.users AuthName "special directory" Require valid-user Satisfy any </pre> </div></div> <p>See the user authentication question and the <a class="external-link" href="http://httpd.apache.org/docs/current/mod/mod_authz_host.html" rel="nofollow">mod_authnz_host module</a> for details on how the above directives work.</p> <h2 id="FAQ-Whydoesmyauthenticationgivemeaservererror?">Why does my authentication give me a server error?</h2> <p>Under normal circumstances, the Apache access control modules will pass unrecognized user IDs on to the next access control module in line. Only if the user ID is recognized and the password is validated (or not) will it give the usual success or "authentication failed" messages.</p> <p>However, if the last access module in line 'declines' the validation request (because it has never heard of the user ID or because it is not configured), the http_request handler will give one of the following, confusing, errors:</p> <ul> <li>check access</li> <li>check user. No user file?</li> <li>check access. No groups file? <br class="atl-forced-newline"/></li> </ul> <p>This does not mean that you have to add an 'AuthUserFile /dev/null' line as some magazines suggest!</p> <p>The solution is to ensure that at least the last module is authoritative and CONFIGURED. By default, mod_auth is authoritative and will give an OK/Denied, but only if it is configured with the proper <a class="unresolved" href="#">AuthUserFile</a>. Likewise, if a valid group is required. (Remember that the modules are processed in the reverse order from that in which they appear in your compile-time Configuration file.)</p> <p>A typical situation for this error is when you are using the mod_auth_dbm, mod_auth_msql, mod_auth_mysql, mod_auth_anon or mod_auth_cookie modules on their own. These are by default not authoritative, and this will pass the buck on to the (non-existent) next authentication module when the user ID is not in their respective database. Just add the appropriate 'XXXAuthoritative yes' line to the configuration.</p> <p>In general it is a good idea (though not terribly efficient) to have the file-based mod_auth a module of last resort. This allows you to access the web server with a few special passwords even if the databases are down or corrupted. This does cost a file open/seek/close for each request in a protected area.</p> <h2 id="FAQ-DoIhavetokeepthe(SQL)authenticationinformationonthesamemachine?">Do I have to keep the (SQL) authentication information on the same machine?</h2> <p>Some organizations feel very strongly about keeping the authentication information on a different machine than the webserver. With the mod_auth_msql, mod_auth_mysql, and other SQL modules connecting to (R)DBMses this is quite possible. Just configure an explicit host to contact.</p> <p>Be aware that with mSQL and Oracle, opening and closing these database connections is very expensive and time consuming. You might want to look at the code in the auth_* modules and play with the compile time flags to alleviate this somewhat, if your RDBMS licences allow for it.</p> <h2 id="FAQ-CanIusemy/etc/passwdfileforWebpageauthentication?">Can I use my /etc/passwd file for Web page authentication?</h2> <p>Yes, you can - but it's a very bad idea. Here are some of the reasons:</p> <ul> <li>The Web technology provides no governors on how often or how rapidly password (authentication failure) retries can be made. That means that someone can hammer away at your system's root password using the Web, using a dictionary or similar mass attack, just as fast as the wire and your server can handle the requests. Most operating systems these days include attack detection (such as n failed passwords for the same account within m seconds) and evasion (breaking the connection, disabling the account under attack, disabling all logins from that source, et cetera), but the Web does not.</li> <li>An account under attack isn't notified (unless the server is heavily modified); there's no "You have 19483 login failures" message when the legitimate owner logs in.</li> <li>Without an exhaustive and error-prone examination of the server logs, you can't tell whether an account has been compromised. Detecting that an attack has occurred, or is in progress, is fairly obvious, though - if you look at the logs.</li> <li>Web authentication passwords (at least for Basic authentication) generally fly across the wire, and through intermediate proxy systems, in what amounts to plain text. "O'er the net we go/Caching all the way;/O what fun it is to surf/Giving my password away!"</li> <li>Since HTTP is stateless, information about the authentication is transmitted each and every time a request is made to the server. Essentially, the client caches it after the first successful access, and transmits it without asking for all subsequent requests to the same server.</li> <li>It's relatively trivial for someone on your system to put up a page that will steal the cached password from a client's cache without them knowing. Can you say "password grabber"? <br class="atl-forced-newline"/></li> </ul> <p>If you still want to do this in light of the above disadvantages, the method is left as an exercise for the reader. It'll void your Apache warranty, though, and you'll lose all accumulated UNIX guru points.</p> <h2 id="FAQ-WhydoesApacheaskformypasswordtwicebeforeservingafile?">Why does Apache ask for my password twice before serving a file?</h2> <p>If the hostname under which you are accessing the server is different than the hostname specified in the <a class="unresolved" href="#">ServerName</a> directive, then depending on the setting of the <a class="unresolved" href="#">UseCanonicalName</a> directive, Apache will redirect you to a new hostname when constructing self-referential URLs. This happens, for example, in the case where you request a directory without including the trailing slash.</p> <p>When this happens, Apache will ask for authentication once under the original hostname, perform the redirect, and then ask again under the new hostname. For security reasons, the browser must prompt again for the password when the host name changes.</p> <p>To eliminate this problem you should</p> <ul> <li>Always use the trailing slash when requesting directories;</li> <li>Change the <a class="unresolved" href="#">ServerName</a> to match the name you are using in the URL;</li> <li>and/or Set <a class="unresolved" href="#">UseCanonicalName</a> off. <br class="atl-forced-newline"/></li> </ul> <h2 id="FAQ-HowcanIpreventpeoplefrom"stealing"theimagesfrommywebsite?">How can I prevent people from "stealing" the images from my web site?</h2> <p>The goal here is to prevent people from inlining your images directly from their web site, but accessing them only if they appear inline in your pages.</p> <p>This can be accomplished with a combination of <a class="unresolved" href="#">SetEnvIf</a> and the Deny and Allow directives. However, it is important to understand that any access restriction based on the REFERER header is intrinsically problematic due to the fact that browsers can send an incorrect REFERER, either because they want to circumvent your restriction or simply because they don't send the right thing (or anything at all).</p> <p>The following configuration will produce the desired effect if the browser passes correct REFERER headers.</p> <div class="preformatted panel conf-macro output-block" data-hasbody="true" data-macro-name="noformat" style="border-width: 1px;"><div class="preformattedContent panelContent"> <pre>SetEnvIf REFERER "www\.mydomain\.com" linked_from_here SetEnvIf REFERER "^$" linked_from_here <Directory /www/images> Order deny,allow Deny from all Allow from env=linked_from_here </Directory> </pre> </div></div> <p>Further examples can be found in the Environment Variables documentation.</p> <h1 id="FAQ-URLRewriting">URL Rewriting</h1> <h2 id="FAQ-WherecanIfindmod_rewriterulesetswhichalreadysolveparticularURL-relatedproblems?">Where can I find mod_rewrite rulesets which already solve particular URL-related problems?</h2> <p>There is a collection of practical solutions that can be found in the <a class="external-link" href="http://httpd.apache.org/docs/current/rewrite/" rel="nofollow">URL Rewriting Guide</a>. If you have more interesting rulesets which solve particular problems not currently covered in this document, open a doc suggestion in bugzilla to add it. The other webmasters will thank you for avoiding the reinvention of the wheel.</p> <h2 id="FAQ-WherecanIfindanypublishedinformationaboutURL-manipulationsandmod_rewrite?">Where can I find any published information about URL-manipulations and mod_rewrite?</h2> <p>There is an article from Ralf S. Engelschall about URL-manipulations based on mod_rewrite in the "iX Multiuser Multitasking Magazin" issue #12/96. The German (original) version can be read online at <<a class="external-link" href="http://www.heise.de/ix/artikel/1996/12/149/" rel="nofollow">http://www.heise.de/ix/artikel/1996/12/149/</a>>, the English (translated) version can be found at <<a class="external-link" href="http://www.heise.de/ix/artikel/E/1996/12/149/" rel="nofollow">http://www.heise.de/ix/artikel/E/1996/12/149/</a>>.</p> <h2 id="FAQ-Whyismod_rewritesodifficulttolearnandseemssocomplicated?">Why is mod_rewrite so difficult to learn and seems so complicated?</h2> <p>Hmmm... there are a lot of reasons. First, mod_rewrite itself is a powerful module which can help you in really all aspects of URL rewriting, so it can be no trivial module per definition. To accomplish its hard job it uses software leverage and makes use of a powerful regular expression library by Henry Spencer. And regular expressions itself can be difficult to newbies, while providing the most flexible power to the advanced hacker.</p> <p>On the other hand mod_rewrite has to work inside the Apache API environment and needs to do some tricks to fit there. For instance the Apache API really was not designed for URL rewriting at the .htaccess level of processing. Or the problem of multiple rewrites in sequence, which is also not handled by the API per design. To provide this features mod_rewrite has to do some special (but API compliant!) handling which leads to difficult processing inside the Apache kernel. While the user usually doesn't see anything of this processing, it can be difficult to find problems when some of your <a class="unresolved" href="#">RewriteRules</a> seem not to work.</p> <h2 id="FAQ-WhatcanIdoifmydon'tworkasexpected?">What can I do if my <a class="unresolved" href="#">RewriteRules</a> don't work as expected?</h2> <p>Use "RewriteLog somefile" and "RewriteLogLevel 9" and have a precise look at the steps the rewriting engine performs. This is really the only one and best way to debug your rewriting configuration.</p> <h2 id="FAQ-Whydon'tsomeofmyURLsgetprefixedwithwhenusingmod_rewrite?">Why don't some of my URLs get prefixed with <a class="unresolved" href="#">DocumentRoot</a> when using mod_rewrite?</h2> <p>If the rule starts with /somedir/... make sure that really no /somedir exists on the filesystem if you don't want to lead the URL to match this directory, i.e., there must be no root directory named somedir on the filesystem. Because if there is such a directory, the URL will not get prefixed with <a class="unresolved" href="#">DocumentRoot</a>. This behavior looks ugly, but is really important for some other aspects of URL rewriting.</p> <h2 id="FAQ-HowcanImakeallmyURLscase-insensitivewithmod_rewrite?">How can I make all my URLs case-insensitive with mod_rewrite?</h2> <p>You can't! The reasons are: first, that, case translations for arbitrary length URLs cannot be done via regex patterns and corresponding substitutions. One needs a per-character pattern like the sed/Perl tr|..|..| feature. Second, just making URLs always upper or lower case does not solve the whole problem of case-INSENSITIVE URLs, because URLs actually have to be rewritten to the correct case-variant for the file residing on the filesystem in order to allow Apache to access the file. And the Unix filesystem is always case-SENSITIVE.</p> <p>But there is a module named mod_speling.c in the Apache distribution. Try this module to help correct people who use mis-cased URLs.</p> <h2 id="FAQ-Whyareinmypartsignored?">Why are <a class="unresolved" href="#">RewriteRules</a> in my <a class="unresolved" href="#">VirtualHost</a> parts ignored?</h2> <p>Because you have to enable the engine for every virtual host explicitly due to security concerns. Just add a "RewriteEngine on" to your virtual host configuration parts.</p> <h2 id="FAQ-HowcanIusestringswithwhitespacesin'sENVflag?">How can I use strings with whitespaces in <a href="/confluence/display/HTTPD/RewriteRule">RewriteRule</a>'s ENV flag?</h2> <p /><p /><p /><p /><p /><p><p class="conf-macro output-block" data-hasbody="true" data-macro-name="unmigrated-wiki-markup">There is only one ugly solution: You have to surround the complete flag argument by quotation marks ("[E=...]"). Notice: The argument to quote here is not the argument to the E-flag, it is the argument of the Apache config file parser, i.e., the third argument of the <a href="/confluence/display/HTTPD/RewriteRule" title="RewriteRule">RewriteRule</a> here. So you have to write "[E=any text with whitespaces]".</p></p><p /><p /><p /><p /><p /> <h1 id="FAQ-Features">Features</h1> <h2 id="FAQ-DoesorwillApacheactasaProxyserver?">Does or will Apache act as a Proxy server?</h2> <p><a class="external-link" href="http://httpd.apache.org/docs/current/mod/mod_proxy.html" rel="nofollow">mod_proxy</a> provides proxying functionality for a variety of protocols.</p> <h2 id="FAQ-Whatare"multiviews"?">What are "multiviews"?</h2> <p>"Multiviews" is the general name given to the Apache server's ability to provide language-specific document variants in response to a request. This is documented quite thoroughly in the content negotiation description page. In addition, Apache Week carried an article on this subject entitled <a class="external-link" href="http://www.apacheweek.com/features/negotiation" rel="nofollow">"Content Negotiation Explained"</a>.</p> <h2 id="FAQ-Whycan'tIpublishtomyApacheserverusingPUTonNetscapeGoldandotherprograms?">Why can't I publish to my Apache server using PUT on Netscape Gold and other programs?</h2> <p>Because you need to install and configure a script to handle the uploaded files. This script is often called a "PUT" handler. There are several available, but they may have security problems. Using FTP uploads may be easier and more secure, at least for now. For more information, see the <a class="external-link" href="http://www.apacheweek.com/features/put" rel="nofollow">Apache Week article Publishing Pages with PUT</a>.</p> <h2 id="FAQ-HowcanIattachafootertomydocumentswithoutusingSSI?">How can I attach a footer to my documents without using SSI?</h2> <p>You can make arbitrary changes to static documents by configuring an Action which launches a CGI script. The CGI is then responsible for setting a content-type and delivering the requested document (the location of which is passed in the PATH_TRANSLATED environment variable), along with whatever footer is needed.</p> <p>Busy sites may not want to run a CGI script on every request, and should consider using an Apache module to add the footer. There are several third party modules available through the Apache Module Registry which will add footers to documents. These include mod_trailer, PHP (php3_auto_append_file), mod_layout, and mod_perl (Apache::Sandwich).</p> <h2 id="FAQ-DoesApacheincludeasearchengine?">Does Apache include a search engine?</h2> <p>Apache does not include a search engine, but there are many good commercial and free search engines which can be used easily with Apache. Some of them are listed on the Web Site Search Tools page. Open source search engines that are often used with Apache include ht://Dig and SWISH-E.</p> <h2 id="FAQ-HowcanIrotatemylogfiles?">How can I rotate my log files?</h2> <p>The simple answer: by piping the transfer log into an appropriate log file rotation utility.</p> <p>The longer answer: In the src/support/ directory, you will find a utility called rotatelogs which can be used like this:</p> <div class="preformatted panel conf-macro output-block" data-hasbody="true" data-macro-name="noformat" style="border-width: 1px;"><div class="preformattedContent panelContent"> <pre> TransferLog "|/path/to/rotatelogs /path/to/logs/access_log 86400 </pre> </div></div> <p>to enable daily rotation of the log files. A more sophisticated solution of a logfile rotation utility is available under the name cronolog from Andrew Ford's site at <a class="external-link" href="http://www.cronolog.org/" rel="nofollow">http://www.cronolog.org/</a>. It can automatically create logfile subdirectories based on time and date, and can have a constant symlink point to the rotating logfiles. (As of version 1.6.1, cronolog is available under the Apache License). Use it like this:</p> <div class="preformatted panel conf-macro output-block" data-hasbody="true" data-macro-name="noformat" style="border-width: 1px;"><div class="preformattedContent panelContent"> <pre> CustomLog "|/path/to/cronolog --symlink=/usr/local/apache/logs/access_log /usr/local/apache/logs/%Y/%m/access_log" combined </pre> </div></div> <h2 id="FAQ-HowdoIkeepcertainrequestsfromappearinginmylogs?">How do I keep certain requests from appearing in my logs?</h2> <p>The maximum flexibility for removing unwanted information from log files is obtained by post-processing the logs, or using piped-logs to feed the logs through a program which does whatever you want. However, Apache does offer the ability to prevent requests from ever appearing in the log files. You can do this by using the <a class="unresolved" href="#">SetEnvIf</a> directive to set an environment variable for certain requests and then using the conditional <a class="unresolved" href="#">CustomLog</a> syntax to prevent logging when the environment variable is set.</p> <h2 id="FAQ-DoesApachesupportanysortofdatabaseintegration?">Does Apache support any sort of database integration?</h2> <p>No. Apache is a Web (HTTP) server, not an application server. The base package does not include any such functionality. See the PHP project and the mod_perl project for examples of modules that allow you to work with databases from within the Apache environment.</p> <h2 id="FAQ-CanIuseActiveServerPages(ASP)withApache?">Can I use Active Server Pages (ASP) with Apache?</h2> <p>The base Apache Web Server package does not include ASP support. However, a number of projects provide ASP or ASP-like functionality for Apache. Some of these are:</p> <ul> <li>Apache::ASP</li> <li>mod_mono <br class="atl-forced-newline"/></li> </ul> <p>See also the related projects page to find out more.</p> <h2 id="FAQ-DoesApachecomewithJavasupport?">Does Apache come with Java support?</h2> <p>The base Apache Web server package does not include support for Java, Java Server Pages, Enterprise Java Beans, or Java servlets. Those features are available as add-ons from other Apache projects such as <a class="external-link" href="http://projects.apache.org/projects/geronimo.html" rel="nofollow">Geronimo</a> and <a class="external-link" href="http://tomcat.apache.org/" rel="nofollow">Tomcat</a>.</p> </div> <div id="labels-section" class="pageSection group"> <div class="labels-section-content content-column" entityid="115522309" entitytype="page"> <div class="labels-content"> <ul class="label-list label-list-right "> <li class="no-labels-message"> No labels </li> </ul> </div> </div> </div> <div id="comments-section" class="pageSection group"> </div> </div> <div id="space-tools-web-items" class="hidden"> <div data-label="Overview" data-href="/confluence/spaces/viewspacesummary.action?key=HTTPD">Overview</div> <div data-label="Content Tools" data-href="/confluence/pages/reorderpages.action?key=HTTPD">Content Tools</div> <div data-label="Apps" data-href="/confluence/spaces/snippeterrors.action?key=HTTPD">Apps</div> </div> </main><!-- \#main --> <div id="footer" role="contentinfo"> <section class="footer-body"> <p class="license license-opensource"> Powered by a free <b>Atlassian Confluence Open Source Project License</b> granted to Apache Software Foundation. <a href="https://www.atlassian.com/software/views/opensource-community-additional-license-offer">Evaluate Confluence today</a>.<br> </p> <ul id="poweredby"> <li class="noprint">Powered by <a href="https://www.atlassian.com/software/confluence" class="hover-footer-link" rel="nofollow">Atlassian Confluence</a> <span id='footer-build-information'>7.19.28</span></li> <li class="print-only">Printed by Atlassian Confluence 7.19.28</li> <li class="noprint"><a href="https://support.atlassian.com/confluence-server/" class="hover-footer-link" rel="nofollow">Report a bug</a></li> <li class="noprint"><a href="https://www.atlassian.com/company" class="hover-footer-link" rel="nofollow">Atlassian News</a></li> </ul> <div id="footer-logo"><a href="https://www.atlassian.com/" rel="nofollow">Atlassian</a></div> </section> </div> </div> </div><!-- \#full-height-container --> </div><!-- \#page --> <span style="display:none;" id="confluence-server-performance">{"serverDuration": 219, "requestCorrelationId": "59bbd4f9e2f9c43a"}</span> </body> </html>