手机看片精品高清国产日韩,色先锋资源综合网,国产哺乳奶水91在线播放,乱伦小说亚洲色图欧洲电影

Linux服務(wù)器下Apache的常見操作

2016-01-20 14:41:00 854

1.apache 主目錄
/usr/local/apache2

2.網(wǎng)站主目錄

/usr/local/apache2/htdocs
3.配置文件
/usr/local/apache2/etc/httpd.conf


4.應(yīng)用程序
/usr/local/apache2/bin/httpd


5.服務(wù)腳本
/usr/local/apache2/bin/apachectl


6.啟動(dòng)服務(wù)
/usr/local/apache2/bin/apachectl start
/usr/local/apache2/bin/apachectl restart


7.關(guān)閉服務(wù)
/usr/local/apache2/bin/apachectl stop


8.查看進(jìn)程
pstree |grep httpd


9.查看端口
netstat -tunpl |grep :80


10.開機(jī)啟動(dòng)
vi /etc/rc.d/rc.local
/usr/local/apache2/bin/apachectl restart &>/dev/null


apache  配置文件:

1.監(jiān)聽端口
Listen 800


2.加載 php 的動(dòng)態(tài)模塊
LoadModule php5_module modules/libphp5.so


3.apache 服務(wù)的進(jìn)程執(zhí)行者
User daemon


4.apache 的網(wǎng)站根目錄
DocumentRoot "/usr/local/apache2/htdocs"


5.apache 的網(wǎng)站根目錄的服務(wù)權(quán)限
<Directory "/usr/local/apache2//htdocs">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
#先允許,后拒絕
Allow from all
#允許所有人
#不拒絕任何人

</Directory>


6.apache 的默認(rèn)首頁
DirectoryIndex index.php index.html


7.apache 的錯(cuò)誤日志
ErrorLog "logs/error_log"


8.apache 的訪問日志
CustomLog "logs/access_log" common
實(shí)時(shí)查看文件中的最后十行的變化:
tail -f access_log


9.404 頁面不存在
ErrorDocument 404 /missing.html


10.包含外部配置文件
Include etc//extra/httpd-vhosts.conf


提交成功!非常感謝您的反饋,我們會(huì)繼續(xù)努力做到更好!

這條文檔是否有幫助解決問題?

非常抱歉未能幫助到您。為了給您提供更好的服務(wù),我們很需要您進(jìn)一步的反饋信息:

在文檔使用中是否遇到以下問題: