詳解fedora 開啟 apache 并 開啟目錄瀏覽模式
在內(nèi)網(wǎng)中 暫時需要一臺 文件 服務(wù)器,所以準(zhǔn)備安裝一臺 http服務(wù)器并開啟目錄訪問權(quán)限。這次使用 apache 在 fedora 28 機(jī)器上:
因?yàn)?fedora 28 已經(jīng)包含 httpd 軟件,使用systemctl start httpd 就能進(jìn)行啟動。
啟動時 默認(rèn)開啟 目錄訪問權(quán)限,但是首次訪問網(wǎng)站根目錄的時候,會顯示test page.
進(jìn)入如下文件夾:
[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>
進(jìn)行注釋上述文件:
[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
這個配置表明為 開啟目錄權(quán)限
結(jié)束后,你會看到如下所示畫面:
總結(jié)
以上所述是小編給大家介紹的fedora 開啟 apache 并 開啟目錄瀏覽模式,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復(fù)大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!
相關(guān)文章
一文詳解Linux三種網(wǎng)絡(luò)設(shè)置方式
我們在使用虛擬機(jī)搭建linux系統(tǒng)后,常常需要設(shè)置系統(tǒng)網(wǎng)絡(luò)連接,以方便系統(tǒng)進(jìn)行上網(wǎng)或其他系統(tǒng)連接系統(tǒng)進(jìn)行操作,在linux中網(wǎng)絡(luò)連接分了三類:橋接模式,僅主機(jī)模式,NAT模式,本文我們將對這三種模式進(jìn)行講解,感興趣的同學(xué)可以參考閱讀2023-06-06查看linux ssh服務(wù)信息及運(yùn)行狀態(tài)方法
今天小編就為大家分享一篇查看linux ssh服務(wù)信息及運(yùn)行狀態(tài)方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2019-07-07Linux系統(tǒng)下 centos7下搭建ElasticSearch中間件及常用接口演示
ElasticSearch是一個基于Lucene的搜索服務(wù)器。它提供了一個分布式多用戶能力的全文搜索引擎,基于RESTful web接口。這篇文章主要介紹了Linux系統(tǒng)下 centos7下搭建ElasticSearch中間件及常用接口演示 ,需要的朋友可以參考下2019-07-07教大家?guī)追N在Linux系統(tǒng)中查看時區(qū)的方法
Linux 包含多種可用的時間管理工具,比如 date 或 timedatectlcommands,你可以用它們來獲取當(dāng)前系統(tǒng)時區(qū),也可以將系統(tǒng)時間與 NTP 服務(wù)器同步,來自動地、更精確地進(jìn)行時間管理。下面通過這篇文章來一起看看在Linux系統(tǒng)中查看時區(qū)的幾種不同方法。2017-01-01Apache 配置多端口 多虛擬主機(jī) 局域網(wǎng)訪問示例
這篇文章主要介紹了Apache如何配置多端口 多虛擬主機(jī) 局域網(wǎng)訪問,需要的朋友可以參考下2014-05-05