美文网首页
Ubuntu 17.10安装Apache

Ubuntu 17.10安装Apache

作者: atdoking | 来源:发表于2019-12-13 23:26 被阅读0次

1.在终端输入更新检查命令,sudo apt-get update

2. 在更新完成后(如果不想检查更新,也可直接输入此步)输入:sudo apt-get install apache2

3.完成后,在浏览器输入https://localhost 或者服务器地址或者本地机器地址,如果顺利跳出Apache版本网页,即代表安装成功

一般默认是80端口

4.停止服务:sudo /etc/init.d/apache2 stop

5.启动服务:sudo /etc/init.d/apache2 start

如果改了配置文件,并希望配置文件生效就必须重新启动Apache服务器

6  Apache的默认文档根目录是在Ubuntu上的/var/www目录 ,配置文件是/ etc/apache2/apache2.conf。配置存储在的子目录在/etc/apache2目录。

7.默认访问的是/var/www/html 目录下的文件,所以要想将你的网站应用发布,就直接发布到这个目录进行访问即可

相关文章

网友评论

      本文标题:Ubuntu 17.10安装Apache

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