apache的主配置文件是/etc/httpd/conf/httpd.conf;apache服務器的配置信息全部存儲在主配置文件httpd.conf中,這個文件中的內容非常多,用wc命令統計一共有1009行,其中大部分是以#開頭的注釋行。
[root@justin?~]#?wc?-l?/etc/httpd/conf/httpd.conf? 1009?/etc/httpd/conf/httpd.conf? [root@justin?~]#
配置文件包括三部分:
[root@justin?~]#?grep?'<section>'?/etc/httpd/conf/httpd.conf?-n? 33:###?Section?1:?Global?Environment? 245:###?Section?2:?'Main'?server?configuration? 973:###?Section?3:?Virtual?Hosts? [root@justin?~]#</section>
解析:
1)、Global Environment—全局環境配置,決定Apache服務器的全局參數
2)、Main server configuration—主服務配置,相當于是Apache中的默認Web站點,如果我們的服務器中只有一個站點,那么就只需在這里配置就可以了。
3)、Virtual Hosts—虛擬主機,虛擬主機不能與Main Server主服務器共存,當啟用了虛擬主機之后,Main Server就不能使用了
? 版權聲明
文章版權歸作者所有,未經允許請勿轉載。
THE END