The easiest installation file server under CentOS

install httpd

yum install httpd -y

Modify the configuration file of httpd

vim /etc/httpd/conf/httpd.conf

Enter the apache configuration file httpd.conf and find:
the code is as follows 

Options FollowSymLinks
modified to:
Options Indexes FollowSymLinks

Indexes means that if there is no index.html in the current directory, the directory structure will be displayed

 

start httpd

service httpd restart

Enter the default dynamic file directory.

cd /var/www/html/

Create any directory, here is an example of creating a dist directory

mkdir dist

Put the file into . /var/www/html/dist

 

Then the browser accesses ip/dist to access the file list.

httpd can access the file list because of the existence of the autoindex_module module.

See details

 

Guess you like

Origin blog.csdn.net/kanyun123/article/details/117371335