.... အားလံုးအတြက္ မဟုတ္ခဲ့ရင္ေတာင္ တစ္စံုတစ္ရာ တစ္စံုတစ္ေယာက္အတြက္ ေႏြးေထြးတဲ့ ေကာင္းကင္ငယ္ေလး ျဖစ္ပါရေစ ....

Tuesday, August 14, 2012

Apache http.config ဖိုင္အားျပင္ဆင္ၾကည့္ျခင္း


http.config
http apache ကိုစတင္ျပီအလုပ္လုပ္ေတာ့မယ္ဆိုရင္ 
/etc/init.d/httpd restart|start|stop|status

သူနဲ႔ပတ္သက္တဲ့ အဲယာေတြ လိုအပ္ခ်က္ေတြကိုၾကည့္မယ္ဆိုရင္
tail /var/log/http/error_log
tail /var/log/http/access_log

မိမိဘယ္အိုင္ပီကိုသံုးျပီး အြန္မလည္းဆိုတာကိုေျပာင္းရန္
Listen 80 သာထားရန္

ServerAdmin မိမိအက္ဒမင္လုပ္မည့္နာမည္ေျပာင္းရန္

ServerName  ေျပာင္းရန္
ServerName www.xxxxx.com.mm:80

မိမိဘယ္အရာကိုသံုးေနတယ္ဆိုတာကို မေဖၚျပနိုင္ေစရန္အတြက္
#ServerTAken OS
ServerTokens Prod
ServerSignature off

အမ်ားဆံုးလက္ခံနိုင္မည့္ ေတာင္းခံႏိုင္မူ
MaxKeepAliveRequests 100 Or 1000 (ၾကိဳက္ႏွစ္သက္ရာ)

http enter step ပတ္စ္၀ါဒ့္ခံထားရန္အတြက္
<Directory "/var/www/html"> ေအာက္တြင္ ေအာက္ပါအတိုင္းထည့္
Authtype Basic
AuthName "Authentication Required"
AuthUserFile "/var/www/.htpasswd"
Require valid-user
ျပီးရင္ /var/www ေအာက္မွာ touch htpasswd ဆိုျပီးေဆာက္ပါ.ျပီးရင္

htpasswd -c .htpasswd mod ဆိုျပိး ပတ္စ္အတြက္ ယူဆာအိုင္ဒီေပးလို္က္ပါက ပတ္စ္၀ါဒ္ထပ္ေတာင္းပါလိမ့္မည္
passwrod:
enter passwrd:
(user mod & pass : xxxx)
မူလစာမ်က္ႏွာကို index.php ကိုဖတ္တာၾကာေနရင္ ေအာက္ပါအတိုင္းအပ္ေပးရမယ္ (Loading x.x.x.x ဆိုျပီး ဆိုက္မတက္လာျခင္း)
<Directory "/var/www/html"> ေအာက္တြင္
DirectoryIndex index.php
ျပိးေတာ့
</Directory> ေအာက္တြင္
DirectoryIndex index.php index.html.var index.cgi

မိမိ Site တြင္ မရွိသည့္အေၾကာင္းအရာကို ရွာေဖြျပိး၀င္လာလွ်င္
့http://xxxx.com.mm/XXX
Not Found
The request UR/XXX was not found on this server
ဆိုျပိး မိမိဆိုက္တြင္ေပၚေစခ်င္လွ်င္
ErrorDocument မ်ားတြင္ ရွာေဖြျပီး ကြန္မန္႔ကိုျဖဳတ္ေပးရန္
#    ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
#    ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
#    ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
#    ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
#    ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
#    ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
#    ErrorDocument 410 /error/HTTP_GONE.html.var
#    ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
#    ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
#    ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
#    ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
#    ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
#    ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
#    ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var