Ubuntu安装Apache服务器
来源:互联网 发布:java获取星期几 编辑:程序博客网 时间:2024/05/18 03:21
安装apache,在命令行终端中输入一下命令:
$ sudo apt-get install apache2
安装完成后,重启apache服务,在命令行终端中输入一下命令:
$ sudo /etc/init.d/apache2 restart
可能会出现的问题1: NameVirtualHost *:80 has no VirtualHosts,如下截图
出现上述问题的原因:定义了多个NameVirtualHost,故将/etc/apache2/ports.conf中的NameVirtualHost *:80注释掉即可。
或者将80端口换成其他端口如:5000
可能会出现的问题2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
错误信息:
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
原因:
根据提示,无法可靠的确定服务器的有效域名,使用127.0.1.1作为服务器域名。应此,在下面的测试中,应该使用127.0.1.1,而不是127.0.0.1!
解决方法:
sudo gedit /etc/apache2/apache2.conf
在文件后面加上:
#Server Name
ServerName 127.0.0.1
错误信息:
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
0 0
- Ubuntu安装Apache服务器
- ubuntu下安装apache服务器
- Ubuntu 16.04 安装Apache 服务器
- ubuntu下使用源码安装apache 服务器
- Ubuntu下安装配置Svn+Apache服务器
- ubuntu下使用源码安装apache 服务器
- ubuntu 安装apache和httpd服务器
- Ubuntu下安装 apache+php+mysql文本服务器!
- UBUNTU下安装 APACHE+PHP+MYSQL文本服务器
- Ubuntu 14.04 安装LAMP(Linux, Apache, MySQL, PHP)服务器
- Ubuntu 14.04 Web服务器--Apache的安装和配置
- Ubuntu 14.04 Web服务器--Apache的安装和配置
- Ubuntu 14.04 手动编译安装apache httpd 服务器
- Ubuntu 14.04 Web服务器--Apache的安装和配置
- Ubuntu 14.04 Web服务器,Apache的安装和配置
- Ubuntu 14.04 Web服务器--Apache的安装和配置
- Ubuntu 14.04 Web服务器--Apache的安装和配置
- 在Ubuntu中安装Apache服务器(使用oracle java)
- poj 1016 Prime Ring Problem -- 回溯
- Spring基础知识(4)
- IP聚合-2016"百度之星" - 测试赛(热身,陈题)
- 奋斗吧,程序员——第三十五章 莫愁前路无知己,天下谁人不识君
- 获取屏幕宽高
- Ubuntu安装Apache服务器
- more effective C++的读书笔记 ——不要重载&&和||
- 进击的RecyclerView之入门
- 调试基础知识0(串口调试助手对比 丁丁 大傻 友善)
- 常用工具类
- 字节流与字符流的区别详解
- Char 转int JAVA
- 用 Python 和 OpenCV 检测图片上的条形码Detecting Barcodes in Images with Python and OpenCV
- c++第五次实验--多继承