zoukankan      html  css  js  c++  java
  • 1分钟Ubuntu下搭建http web server apache2

    1分钟搭建一种简单的windows 与ubuntu, ubuntu与ubuntu之间文件共享的方式!


    在服务器与本地电脑已经处于同一局域网下后,就可以搭建一个简单http web server apache2进行文件互传了,如不在同一局域网下,请参考Ubuntu下静态IP配置与DHCP服务搭建

    1.安装apache2服务
    sudo apt-get update && sudo apt-get install apache2

    2.看不懂? 可以全部默认~, 哈哈
    /etc/apache2/ports.conf  修改监听端口配置
    /etc/apache2/sites-available/000-default.conf  修改服务器域名,目录等

    3.重启服务
    sudo service apache2 restart 或 sudo /etc/init.d/apache2 restart

    4. 在本机浏览器打开http://<server_ip> 即可浏览服务器/var/www/html/ 目录下的所有文件(可以先删除index.html,就不会出现it works!),右击即可下载
    ln –s <target_name> <linkname> 创建软连接即可扩充你的文件夹目录
    还不满意? 你可以用wget或crul命令直接去下载http服务器的文件,写进脚本自动化操作吧!

    image

    FAQ
    1.遇到window子系统下的ubuntu搭建服务时 “Failed to enable APR_TCP_DEFER_ACCEPT”
    Fix: 在/etc/apache2/apache2.conf配置文件中添加 “AcceptFilter http none” 重启服务即可解决 





    Regards,
    Simon Fingers crossed
  • 相关阅读:
    Sum Root to Leaf Numbers 解答
    459. Repeated Substring Pattern
    71. Simplify Path
    89. Gray Code
    73. Set Matrix Zeroes
    297. Serialize and Deserialize Binary Tree
    449. Serialize and Deserialize BST
    451. Sort Characters By Frequency
    165. Compare Version Numbers
    447. Number of Boomerangs
  • 原文地址:https://www.cnblogs.com/jack-zhou/p/12857725.html
Copyright © 2011-2022 走看看