国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 服務器 > Web服務器 > 正文

詳解fedora 開啟 apache 并 開啟目錄瀏覽模式

2024-09-01 13:55:21
字體:
來源:轉載
供稿:網友

在內網中 暫時需要一臺 文件 服務器,所以準備安裝一臺 http服務器并開啟目錄訪問權限。這次使用 apache 在 fedora 28 機器上:

因為 fedora 28 已經包含 httpd 軟件,使用systemctl start httpd 就能進行啟動。

啟動時 默認開啟 目錄訪問權限,但是首次訪問網站根目錄的時候,會顯示test page.

進入如下文件夾:

[root@dhcp-65-15 conf.d]# pwd/etc/httpd/conf.d
[root@dhcp-65-15 conf.d]# cat welcome.conf## This configuration file enables the default "Welcome" page if there# is no default index page present for the root URL. To disable the# Welcome page, comment out all the lines below.## NOTE: if this file is removed, it will be restored on upgrades.#<LocationMatch "^/+$">  Options -Indexes  ErrorDocument 403 /.noindex.html</LocationMatch><Directory /usr/share/httpd/noindex>  AllowOverride None  Require all granted</Directory>

進行注釋上述文件:

[root@dhcp-65-15 conf.d]# cat welcome.conf## This configuration file enables the default "Welcome" page if there# is no default index page present for the root URL. To disable the# Welcome page, comment out all the lines below.## NOTE: if this file is removed, it will be restored on upgrades.##<LocationMatch "^/+$">#  Options -Indexes#  ErrorDocument 403 /.noindex.html#</LocationMatch>#<Directory /usr/share/httpd/noindex>#  AllowOverride None#  Require all granted#</Directory>#Alias /.noindex.html /usr/share/httpd/noindex/index.html

httpd 文件配置如下所示:

<Directory "/var/www/html">  #  # Possible values for the Options directive are "None", "All",  # or any combination of:  #  Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews  #  # Note that "MultiViews" must be named *explicitly* --- "Options All"  # doesn't give it to you.  #  # The Options directive is both complicated and important. Please see  # http://httpd.apache.org/docs/2.4/mod/core.html#options  # for more information.  #  Options indexes FollowSymLinks  #  # AllowOverride controls what directives may be placed in .htaccess files.  # It can be "All", "None", or any combination of the keywords:  #  Options FileInfo AuthConfig Limit  #  AllowOverride None  #  # Controls who can get stuff from this server.  #  Require all granted</Directory>

Options  indexes FollowSymLinks

這個配置表明為 開啟目錄權限

結束后,你會看到如下所示畫面:

fedora,apache,目錄瀏覽模式

總結

以上所述是小編給大家介紹的fedora 開啟 apache 并 開啟目錄瀏覽模式,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對VEVB武林網網站的支持!


注:相關教程知識閱讀請移步到服務器教程頻道。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 独山县| 苏州市| 舟曲县| 武威市| SHOW| 青田县| 泰和县| 杂多县| 梓潼县| 顺昌县| 金堂县| 卢龙县| 涞源县| 盘锦市| 肇州县| 鄂伦春自治旗| 改则县| 徐水县| 隆尧县| 罗源县| 长宁县| 嫩江县| 安阳市| 民丰县| 荔浦县| 渑池县| 永仁县| 阜城县| 方城县| 邵阳县| 米脂县| 大邑县| 武山县| 江都市| 枣庄市| 曲沃县| 梁河县| 新和县| 中宁县| 土默特左旗| 广宗县|