<span id="mktg5"></span>

<i id="mktg5"><meter id="mktg5"></meter></i>

        <label id="mktg5"><meter id="mktg5"></meter></label>
        最新文章專題視頻專題問答1問答10問答100問答1000問答2000關(guān)鍵字專題1關(guān)鍵字專題50關(guān)鍵字專題500關(guān)鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關(guān)鍵字專題關(guān)鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
        問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
        當前位置: 首頁 - 科技 - 知識百科 - 正文

        ApacheHTTP服務(wù)器2.2文檔

        來源:懂視網(wǎng) 責編:小采 時間:2020-11-09 15:42:09
        文檔

        ApacheHTTP服務(wù)器2.2文檔

        ApacheHTTP服務(wù)器2.2文檔:MappingURLstoFilesystemLocations 從 URL 映射到文件系統(tǒng) DocumentRoot 文檔根目錄 Indecidingwhatfiletoserveforagivenrequest,Apache'sdefaultbehavioristotake theURL-Pathfortherequest(theparto
        推薦度:
        導讀ApacheHTTP服務(wù)器2.2文檔:MappingURLstoFilesystemLocations 從 URL 映射到文件系統(tǒng) DocumentRoot 文檔根目錄 Indecidingwhatfiletoserveforagivenrequest,Apache'sdefaultbehavioristotake theURL-Pathfortherequest(theparto

        MappingURLstoFilesystemLocations 從 URL 映射到文件系統(tǒng) DocumentRoot 文檔根目錄 Indecidingwhatfiletoserveforagivenrequest,Apache'sdefaultbehavioristotake theURL-Pathfortherequest(thepartoftheURLfollowingthehostnameandport)andaddittotheendof

        Mapping URLs to Filesystem Locations

        從 URL 映射到文件系統(tǒng)

        DocumentRoot

        文檔根目錄

        In deciding what file to serve for a given request, Apache's default behavior is to take

        the URL-Path for the request (the part of the URL following the hostname and port) and add it to the end of the DocumentRoot specified in your configuration files.

        在決定用什么文件響應(yīng)一個已經(jīng)到達的請求時,Apache的默認行為是用url路徑來響應(yīng)請求(這一部分的url地址是跟隨在主機名和端口號之后的),并且將它添加到在你的配置文件中確定的文檔根目錄的結(jié)尾。

        Therefore, the files and directories underneath the DocumentRoot make up the basic document tree which will be visible from the web.

        因此,在根目錄下的文件和目錄將會使服務(wù)器的目錄結(jié)構(gòu)對于互聯(lián)網(wǎng)變得可見。

        For example, if DocumentRoot were set to /var/www/html then a request for http://www.example.com/fish/guppies.html would result in the file /var/www/html/fish/guppies.html being served to the requesting client.

        例如,如果根目錄被設(shè)置為/var/www/html,之后一個http://www.example.com/fish/guppies.html的網(wǎng)頁請求將使文件/var/www/html/fish/guppies.html被送達給請求客戶端。

        Apache is also capable of Virtual Hosting, where the server receives requests for more than one host.

        Apache也可能是虛擬的主機,此時服務(wù)器為超過一個主機接收服務(wù)請求。

        In this case, a different DocumentRoot can be specified for each virtual host, or alternatively, the directives provided by the module mod_vhost_alias can be used to dynamically determine the appropriate place from which to serve content based on the requested IP address or hostname.

        在這種情況,可以為每一個不同的虛擬主機設(shè)置不同的根目錄,或者采用另一種方法,由模塊mod_vhost_alias提供的命令可以用于動態(tài)確定服務(wù)內(nèi)容(基于ip地址或者主機名請求)所在的位置。

        The DocumentRoot directive is set in your main server configuration file (httpd.conf) and, possibly, once per additional Virtual Host you create.

        每當你新建一個額外的虛擬主機的時候,文檔根目錄指令將會在你的主服務(wù)器配置文件(httpd.conf) 里被設(shè)置。

        Files Outside the DocumentRoot

        在文檔根目錄之外的文件

        There are frequently circumstances where it is necessary to allow web access to parts of the filesystem that are not strictly underneath the DocumentRoot.

        經(jīng)常有一些情況,有必要允許網(wǎng)頁連接到一些不嚴格位于根目錄之下的文件系統(tǒng)。

        Apache offers several different ways to accomplish this.

        Apache 提供了幾種完成這種工作的方法。

        On Unix systems, symbolic links can bring other parts of the filesystem under the DocumentRoot.

        在unix系統(tǒng)中,符號鏈接可以使其他部分的文件系統(tǒng)位于文檔根目錄之下。

        For security reasons, Apache will follow symbolic links only if the Options setting for the relevant directory includes FollowSymLinks or SymLinksIfOwnerMatch.

        出于安全的原因,Apache只有在相關(guān)目錄FollowSymLinks或者SymLinksIfOwnerMatch被設(shè)置的情況下,才會使符號鏈接有效。

        Alternatively, the Alias directive will map any part of the filesystem into the web space. For example, with

        Alias /docs /var/web

        the URL http://www.example.com/docs/dir/file.html will be served from /var/web/dir/file.html.

        另一種方法,把Alias目錄被映射到其他部分的文件系統(tǒng)。例如,

        Alias /docs /var/web

        url地址為http://www.example.com/docs/dir/file.html 的頁面請求將用/var/web/dir/file.html頁面來響應(yīng)請求。

        The ScriptAlias directive works the same way, with the additional effect that all content located at the target path is treated as CGI scripts.

        Alias腳本命令以同樣的方式運行。使用附加的效果:所有位于目標路徑的內(nèi)容被當作CGI腳本

        For situations where you require additional flexibility, you can use the AliasMatch and ScriptAliasMatch directives to do powerful regular expression based matching and substitution. For example,

        在你需要更靈活的情況下,AliasMatch 和 ScriptAliasMatch命令可以讓你使用基于匹配和替換的正則表達式。例如,

        ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+) /home/$1/cgi-bin/$2

        will map a request to http://example.com/~user/cgi-bin/script.cgi to the path /home/user/cgi-bin/script.cgi and will treat the resulting file as a CGI script.

        將會映射http://example.com/~user/cgi-bin/script.cgi的頁面請求為/home/user/cgi-bin/script.cgi,并且將最后的文件視為一個CGI 腳本。

        User Directories

        用戶目錄

        Traditionally on Unix systems, the home directory of a particular user can be referred to as ~user/. The module mod_userdir extends this idea to the web by allowing files under each user's home directory to be accessed using URLs such as the following.

        一般來說,在unix系統(tǒng)上,一個用戶的主目錄可以以~user/來引用。模塊mod_userdir 拓展這個思想到了網(wǎng)絡(luò),它允許通過url地址來訪問位于用戶主目錄下的文件。如下:

        http://www.example.com/~user/file.html

        For security reasons, it is inappropriate to give direct access to a user's home directory from the web. Therefore, the UserDir directive specifies a directory underneath the user's home directory where web files are located. Using the default setting of Userdir public_html, the above URL maps to a file at a directory like

        /home/user/public_html/file.html where /home/user/ is the user's home directory as specified in /etc/passwd.

        出于安全方面的考慮,從網(wǎng)絡(luò)上直接可以訪問用戶主目錄是不合適的。因此,UserDir命令指定一個位于用戶主目錄之下的目錄用于存放網(wǎng)頁文件。使用默認的Userdir public_html設(shè)置,上述的url將被映射到某個文件夾下某個的文件,例如:

        /home/user/public_html/file.html 。/home/user/是用戶的主目錄,在/etc/passwd.中被指定。

        聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

        文檔

        ApacheHTTP服務(wù)器2.2文檔

        ApacheHTTP服務(wù)器2.2文檔:MappingURLstoFilesystemLocations 從 URL 映射到文件系統(tǒng) DocumentRoot 文檔根目錄 Indecidingwhatfiletoserveforagivenrequest,Apache'sdefaultbehavioristotake theURL-Pathfortherequest(theparto
        推薦度:
        • 熱門焦點

        最新推薦

        猜你喜歡

        熱門推薦

        專題
        Top
        主站蜘蛛池模板: 四虎成年永久免费网站| 一区二区三区观看免费中文视频在线播放 | 91精品国产免费久久久久久青草| 亚洲一区二区三区影院| 国产午夜无码片免费| 2022中文字字幕久亚洲| jizz在线免费观看| 亚洲日韩精品一区二区三区| 在线观看人成视频免费无遮挡| 亚洲无线码在线一区观看| 在线看片免费人成视频福利| 亚洲精品少妇30p| 99精品视频在线观看免费播放| 亚洲天堂男人天堂| 91情侣在线精品国产免费| 亚洲国产精品嫩草影院| 亚洲AV无码一区二区三区在线观看| 国产国产人免费人成成免视频| 亚洲色爱图小说专区| 亚洲综合免费视频| 亚洲乱码av中文一区二区| 五月天婷亚洲天综合网精品偷| 三年片免费高清版| 67pao强力打造67194在线午夜亚洲| 久久受www免费人成_看片中文| 亚洲乱码av中文一区二区| 国产亚洲精品精品国产亚洲综合| 美女视频黄a视频全免费网站色窝| 老汉色老汉首页a亚洲| 成年大片免费视频| 一级毛片试看60分钟免费播放 | 亚洲国产日韩一区高清在线| 在线观看H网址免费入口| 色天使色婷婷在线影院亚洲| 国产亚洲日韩在线三区| 亚洲网站免费观看| h在线看免费视频网站男男| 亚洲一级毛片在线观| 亚洲高清视频一视频二视频三| 无码中文字幕av免费放dvd| 亚洲AV永久无码精品一福利|