


Ubuntu下安裝和設(shè)置Apache2
在Ubuntu中安裝apache
安裝指令:sudo apt-get install apache2
安裝結(jié)束后:
產(chǎn)生的啟動和停止文件是:/etc/init.d/apache2
啟動:sudo apache2ctl -k start
停止:sudo apache2ctl -k stop
重新啟動:sudo apache2ctl -k restart
配置文件保存在:/etc/apache2
需要說明的是,普通的apache發(fā)行版本配置文件是:
httpd.conf
Ubuntu發(fā)行版本的主配置文件是:
apache2.conf
在apache2.conf引用到了以下文件:
# 包含動態(tài)模塊的配置:
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
# 包含用戶自己的配置:
Include /etc/apache2/httpd.conf
# 包含端口監(jiān)聽的配置:
Include /etc/apache2/ports.conf
# 包含一般性的配置語句片斷:
Include /etc/apache2/conf.d/
# 包含虛擬主機的配置指令:
Include /etc/apache2/sites-enabled/
修改httpd.conf
增加以下內(nèi)容:
ServerName 127.0.0.1:80
進一步的配置和使用,就可以查閱APACHE的手冊了
關(guān)鍵字:Ubuntu、Apache、端口
新文章:
- CentOS7下圖形配置網(wǎng)絡(luò)的方法
- CentOS 7如何添加刪除用戶
- 如何解決centos7雙系統(tǒng)后丟失windows啟動項
- CentOS單網(wǎng)卡如何批量添加不同IP段
- CentOS下iconv命令的介紹
- Centos7 SSH密鑰登陸及密碼密鑰雙重驗證詳解
- CentOS 7.1添加刪除用戶的方法
- CentOS查找/掃描局域網(wǎng)打印機IP講解
- CentOS7使用hostapd實現(xiàn)無AP模式的詳解
- su命令不能切換root的解決方法
- 解決VMware下CentOS7網(wǎng)絡(luò)重啟出錯
- 解決Centos7雙系統(tǒng)后丟失windows啟動項
- CentOS下如何避免文件覆蓋
- CentOS7和CentOS6系統(tǒng)有什么不同呢
- Centos 6.6默認iptable規(guī)則詳解