美文网首页
Use Apache to set a file server

Use Apache to set a file server

作者: yingshaoxo | 来源:发表于2018-02-17 00:22 被阅读15次
    <VirtualHost>
            ServerName file.yingshaoxo.xyz
    
            DocumentRoot "/var/www/html"
                                                               
            <Directory "/var/www">                                                                 
                Options Indexes FollowSymLinks MultiViews                                        
                AllowOverride None                                                               
                Order allow,deny                                                                 
                allow from all                                                                   
            </Directory>
    </VirtualHost>
    
    systemctl restart apache2
    

    When you finished doing this, you could remove /var/www/html/index.html, then add some folder or file into /var/www/html/

    In the end, you will find your file right in file.yingshaoxo.xyz

    相关文章

      网友评论

          本文标题:Use Apache to set a file server

          本文链接:https://www.haomeiwen.com/subject/ephmtftx.html