Create a custom download site (auto-indexing)!

Index is an index

Real machine changes to the hosts file: hosts file is located (C disk windows, system32, drivers, etc in)

File content changes are as follows:

192.168.200.115 www.source.com

-----------------------------------------------------------------------------------------------------------

[root @ localhost ~] # cd / usr / local / nginx / HTML /
[root @ localhost HTML] # mkdir roomc                 // create a directory of roomc

[root@localhost html]# cd roomc/

[root @ localhost roomc] # mkdir {3..7}. {1..9}          // Create a file ------- 3.1 7.9
[root @ localhost roomc] # LS
3.1 3.4 3.7 4.1 4.4 4.7 5.1 5.4 5.7 6.1 6.4 6.7 7.1 7.4 7.7
3.2 3.5 3.8 4.2 4.5 4.8 5.2 5.5 5.8 6.2 6.5 6.8 7.2 7.5 7.8
3.3 3.6 3.9 4.3 4.6 4.9 5.3 5.6 5.9 6.3 6.6 6.9 7.3 7.6 7.9

[root @ localhost roomc] # cd 7.9
[root @ localhost 7.9] # Touch CentOS7.9.iso          // create a mirror image of CentOs7.9.iso

[root@localhost 7.9]# cd ../../../

[root@localhost nginx]# cd conf

Modify the configuration file:

[root@localhost conf]# vim nginx.conf

Create a LOCATION 

LOCATION / roomc { autoindex ON; // open automatically indexed }

Click CentOs7.9.iso also download

 

Guess you like

Origin www.cnblogs.com/cxm123123form/p/11526390.html