首頁 後端開發 php教程 ApacheReferenceManual4_PHP教程

ApacheReferenceManual4_PHP教程

Jul 13, 2016 pm 05:28 PM
config context server syntax

Syntax: ... Context: server config, virtual host Status: Core. Compatibility: Available in Apache 1.3 and later and are used to enclose a group of directives which will apply only to the named directory and sub-directories of that directory, the same as . However, it takes as an argument a regular expression. For example: would match directories in /www/ that consisted of three numbers. See Also: for a description of how regular expressions are mixed in with normal s. See also: How Directory, Location and Files sections work for an explanation of how these different sections are combined when a request is received -------------------------------------------------------------------------------- DocumentRoot directive Syntax: DocumentRoot directory-filename Default: DocumentRoot /usr/local/apache/htdocs Context: server config, virtual host Status: core This directive sets the directory from which httpd will serve files. Unless matched by a directive like Alias, the server appends the path from the requested URL to the document root to make the path to the document. Example: DocumentRoot /usr/web then an access to http://www.my.host.com/index.html refers to /usr/web/index.html. There appears to be a bug in mod_dir which causes problems when the DocumentRoot has a trailing slash (i.e., "DocumentRoot /usr/web/") so please avoid that. -------------------------------------------------------------------------------- ErrorDocument directive Syntax: ErrorDocument error-code document Context: server config, virtual host, directory, .htaccess Status: core Override: FileInfo Compatibility: The directory and .htaccess contexts are only available in Apache 1.1 and later. In the event of a problem or error, Apache can be configured to do one of four things, output a simple hardcoded error message output a customized message redirect to a local URL to handle the problem/error redirect to an external URL to handle the problem/error The first option is the default, while options 2-4 are configured using the ErrorDocument directive, which is followed by the HTTP response code and a message or URL. Messages in this context begin with a single quote ("), which does not form part of the message itself. Apache will sometimes offer additional information regarding the problem/error. URLs can begin with a slash (/) for local URLs, or be a full URL which the client can resolve. Examples: ErrorDocument 500 http://foo.example.com/cgi-bin/tester ErrorDocument 404 /cgi-bin/bad_urls.pl ErrorDocument 401 /subscription_info.html ErrorDocument 403 "Sorry cant allow you access today Note that when you specify an ErrorDocument that points to a remote URL (ie. anything with a method such as "http" in front of it) Apache will send a redirect to the client to tell it where to find the document, even if the document ends up being on the same server.. This has several implications, the most important being that if you use an "ErrorDocument 401" directive then it must refer to a local document. This results from the nature of the HTTP basic authentication scheme. See Also: documentation of customizable responses. -------------------------------------------------------------------------------- ErrorLog directive Syntax: ErrorLog filename|syslog[:facility] Default: ErrorLog logs/error_log (Unix) Default: ErrorLog logs/error.log (Windows and OS/2) Context: server config, virtual host Status: core The error log directive sets the name of the file to which the server will log any errors it encounters. If the filename does not begin with a slash (/) then it is assumed to be relative to the ServerRoot. If the filename begins with a pipe (|) then it is assumed to be a command to spawn to handle the error log. Apache 1.3 and above: Using syslog instead of a filename enables logging via syslogd(8) if the system supports it. The default is to use syslog facility local7, but you can override this by using the syslog:facility syntax where facility can be one of the names usually documented in syslog(1). SECURITY: See the security tips document for details on why your security could be compromised if the directory where logfiles are stored is writable by anyone other than the user that starts the server. See also: LogLevel -------------------------------------------------------------------------------- directive Syntax: ... Context: server config, virtual host, .htaccess Status: core Compatibility: only available in Apache 1.2 and above. The directive provides for access control by filename. It is comparable to the directive and directives. It should be matched with a directive. The directives given within this section will be applied to any object with a basename (last component of filename) matching the specified filename. sections are processed in the order they appear in the configuration file, after the sections and .htaccess files are read, but before sections. Note that can be nested inside sections to restrict the portion of the filesystem they apply to. The filename argument should include a filename, or a wild-card string, where `? matches any single character, and `* matches any sequences of characters. Extended regular expressions can also be used, with the addition of the ~ character. For example: would match most common Internet graphics formats. In Apache 1.3 and later, is preferred, however. Note that unlike and sections, sections can be used inside .htaccess files. This allows users to control access to their own files, at a file-by-file level. See also: How Directory, Location and Files sections work for an explanation of how these different sections are combined when a request is received ------------------------------------------------

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/531747.htmlTechArticleSyntax: ... Context: server config, virtual host Status: Core. Compatibility: Available in Apache 1.3 and later and are used to enclose a group of directives which will apply only...
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

Video Face Swap

Video Face Swap

使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

<🎜>:泡泡膠模擬器無窮大 - 如何獲取和使用皇家鑰匙
3 週前 By 尊渡假赌尊渡假赌尊渡假赌
北端:融合系統,解釋
3 週前 By 尊渡假赌尊渡假赌尊渡假赌

熱工具

記事本++7.3.1

記事本++7.3.1

好用且免費的程式碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

強大的PHP整合開發環境

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

SublimeText3 Mac版

SublimeText3 Mac版

神級程式碼編輯軟體(SublimeText3)

熱門話題

Java教學
1664
14
CakePHP 教程
1423
52
Laravel 教程
1319
25
PHP教程
1269
29
C# 教程
1248
24
如何修復 .NET 解析器傳回的錯誤 0xC00CE556 如何修復 .NET 解析器傳回的錯誤 0xC00CE556 Apr 25, 2023 am 08:34 AM

在安裝應用程式的新版本時,Windows可能會顯示此錯誤訊息「解析C:\\Windows\Microsoft.Net\Framework\v2.0.50727\Config\machine.configParser傳回錯誤0xC00CE556時發生錯誤」。當您的系統啟動時,這個問題也會出現。無論您在何種情況下遇到此問題,.NETFramework都是幕後真正的罪魁禍首。您可以使用一些非常簡單的修復程序來阻止此錯誤代碼再次出現。修復1–替換損壞的檔案您可以輕鬆地從原始目錄中替換損壞的ma

如何安裝、解除安裝、重設Windows伺服器備份 如何安裝、解除安裝、重設Windows伺服器備份 Mar 06, 2024 am 10:37 AM

WindowsServerBackup是WindowsServer作業系統自帶的功能,旨在協助使用者保護重要資料和系統配置,並為中小型和企業級企業提供完整的備份和復原解決方案。只有執行Server2022及更高版本的使用者才能使用此功能。在本文中,我們將介紹如何安裝、解除安裝或重設WindowsServerBackup。如何重置Windows伺服器備份如果您的伺服器備份遇到問題,備份所需時間過長,或無法存取已儲存的文件,那麼您可以考慮重新設定WindowsServer備份設定。要重設Windows

context是什麼意思 context是什麼意思 Aug 04, 2023 pm 05:27 PM

context是程式執行時的環境和狀態訊息,可以包括各種各樣的信息,例如變數的值、函數的呼叫堆疊、程式的執行位置等等,使得程式能夠根據不同的上下文環境做出對應的決策和執行相應的操作。

Go中如何使用context實作請求連結追蹤 Go中如何使用context實作請求連結追蹤 Jul 21, 2023 pm 05:57 PM

Go中如何使用context實作請求連結追蹤在微服務的架構中,請求連結追蹤是一種非常重要的技術,用於追蹤一個請求在多個微服務之間的傳遞和處理情況。在Go語言中,我們可以使用context套件來實現請求鏈路追踪,本文將介紹如何使用context進行請求鏈路追踪,並給出程式碼範例。首先,我們要先了解context套件的基本概念和用法。 context包提供了一種機制

Go中如何使用context實作請求快取 Go中如何使用context實作請求快取 Jul 22, 2023 pm 10:51 PM

Go中如何使用context實作請求快取引言:在建立Web應用程式時,我們經常需要對請求進行快取以提高效能。在Go語言中,我們可以使用context包來實現請求快取的功能。本文將介紹如何使用context包來實現請求緩存,並提供程式碼範例來幫助讀者更好地理解。什麼是context? :在Go語言中,context套件提供了一種方式來在多個goroutine之間傳遞

php如何使用ThinkPHP\Config進行組態管理? php如何使用ThinkPHP\Config進行組態管理? May 31, 2023 pm 02:31 PM

隨著PHP語言的不斷發展,做為PHP後端框架中廣泛使用的ThinkPHP也在不斷改進。隨著業務場景的逐漸複雜,ThinkPHP中對於組態管理的需求也越來越大。在這種背景下,ThinkPHP提供了豐富的組態管理功能,今天我們就來介紹如何透過ThinkPHPConfig實現組態管理。一、ThinkPHPConfig的介紹ThinkPHPConfig是Thin

如何在Go中使用context實作請求逾時控制 如何在Go中使用context實作請求逾時控制 Jul 21, 2023 pm 12:18 PM

如何在Go中使用context實作請求逾時控制引言:當我們進行網路請求時,經常會遇到請求逾時的問題。一個長時間沒有回應的網路請求,不僅會浪費伺服器資源,還會影響整體效能。為了解決這個問題,Go語言引入了context包,可以用來實現請求的逾時控制。本文將介紹如何在Go中使用context套件來實現請求逾時控制,並附上對應的程式碼範例。一、了解context包co

怎麼修改Nginx版本名稱偽裝任意web server 怎麼修改Nginx版本名稱偽裝任意web server May 14, 2023 pm 09:19 PM

如何修改nginx預設的名稱,可以稍微的偽裝一下,也可以裝x一般來說修改3個位置,一個是nginx.h、另一個是ngx_http_header_filter_module.c、還有一個ngx_http_special_response.c。提示:一般修改都是在nginx編譯之前修改,修改完了之後需要重新編譯程式碼如下:scr/core/nginx.conf#definenginx_version"1.4.7"#definenginx_ver"nginx/"n

See all articles