Fedora opens Apache and opens directory browsing mode

Source: Internet
Author: User

A file server is temporarily required in the intranet, so you are ready to install an HTTP server and open Directory access. This time using Apache on the Fedora 28 machine:

Because Fedora 28 already contains httpd software, use

systemctl start httpd can be started.

Directory access is turned on by default on startup, but the test page is displayed the first time you visit the root directory of the Web site.

Enter the following folder:

[Email protected]--pwd/etc/httpd/conf.d
[[Email protected] $- theconf.d]#Catwelcome.conf## This configurationfileEnables the default"Welcome"Pageifthere# is no default index page present forThe root URL. To disable the# Welcome page, comment out all the lines below.## Note:ifThisfileis removed, it 'll be restored on upgrades.#<locationmatch"^/+$">Options-Indexes errordocument403/. noindex.html</LocationMatch><Directory/usr/share/httpd/noindex>allowoverride None Require all granted</Directory>

To annotate the above file:

[[Email protected] $- theconf.d]#Catwelcome.conf## This configurationfileEnables the default"Welcome"Pageifthere# is no default index page present forThe root URL. To disable the# Welcome page, comment out all the lines below.## Note:ifThisfileis removed, it 'll be restored on upgrades.##<locationmatch"^/+$"># Options-indexes# errordocument403/. noindex.html#</LocationMatch>#<Directory/usr/share/httpd/noindex># allowoverride none# Require all granted#</Directory>#Alias/.noindex.html/usr/share/httpd/noindex/index.html

The httpd file configuration is as follows:

<directory"/var/www/html"># # Possible Values forThe 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  Moreinformation. # Options Indexes FollowSymLinks # # AllowOverride Controls what directives could be placedinch. htaccess files. # It can be" All","None", or any combination of the keywords: # Options FileInfo authconfig Limit # allowoverride None # # Co NtrolsW.H.O.can get stuff from the this server. # Require All granted</Directory>
Options  Indexes FollowSymLinks
This configuration indicates that directory permissions are enabled
When you are finished, you will see the following screen:

Complete!

I wish you to use pleasant, small technology to facilitate your life.

Keep the update, reprint please indicate the source.

Fedora opens Apache and opens directory browsing mode

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.