美文网首页我爱编程
Ubuntu#Apache搭建web服务器

Ubuntu#Apache搭建web服务器

作者: KailLau | 来源:发表于2017-12-20 21:54 被阅读0次

    1.安装Apache

    终端输入:sudo apt-get install apache2

    2.Apache安装完成

    Apache的默认安装目录为/var
    默认的网站根目录为/var/www/html

    3.配置Apache

    打开apache2.conf配置文件
    sudo gedit /etc/apache2/apache2.conf
    在打开的apache2.conf文件末尾添加如下信息:
    #ServerName
    ServerName 127.0.0.1

    4.重启Apache

    sudo /etc/init.d/apache2 restart

    相关文章

      网友评论

        本文标题:Ubuntu#Apache搭建web服务器

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