Upload ISO files into XenServer 5.5-6.0

1) SCP the ISO files into the folder called /ISO or any folders that you like
2) symbol link it
#cd /var/opt/xen/iso_import ln -s /opt/xensource/packages/iso/CentOS-5.3-i386-bin-DVD.iso
3) rescan the ISO files folder.in order to have it appear under the XenServer Client Console
#xe sr-create name-label=ISOs type=iso device-config:location=/var/opt/xen/iso_import device-config:legacy_mode=true content-type=isoDone

ติดตั้ง Nginx แยกจาก Directadmin Centos 5

#yum update -y

#yum install -y gcc gcc-c++ wget nano pcre-devel zlib-devel make libxml2 libxml2-devel libxslt libxslt-devel bzip2 bzip2-devel curl curl-devel libjpeg libjpeg-devel libpng libpng-devel gd gd-devel mysql mysql-devel mysql-server net-snmp net-snmp-devel freetype-devel libtool-ltdl-devel ncurses ncurses-devel libevent-devel

#rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
#yum install nginx

และแก้ /etc/nginx/nginx.conf

user apache apache;

worker_processes 4; # Set it according to what your CPU have. 4 Cores = 4
worker_rlimit_nofile 8192;

pid /var/run/nginx.pid;

events {
worker_connections 1024;

http {
include mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

server_tokens off;
access_log /var/log/nginx/access.log main;
error_log  /var/log/nginx/error.log crit;

server_names_hash_bucket_size 64;
sendfile on;
tcp_nopush on;
tcp_nodelay off;
keepalive_timeout 30;
gzip on;
gzip_comp_level 9;
gzip_proxied any;

proxy_buffering on;
proxy_cache_path /etc/nginx/proxy_temp levels=1:2 keys_zone=one:15m inactive=7d max_size=1000m;
proxy_buffer_size 16k;
proxy_buffers 100 8k;
proxy_connect_timeout 60;
proxy_send_timeout 60;
proxy_read_timeout 60;

server {
listen IP-ADDRESS:85 default rcvbuf=8192 sndbuf=16384 backlog=32000; # Real IP here
server_name domain.name _ ; # "_" is for handle all hosts that are not described by server_name
charset off;
access_log  off;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://IP-ADDRESS; # Real IP here และไม่มี / ปิดท้าย
client_max_body_size 16m;
client_body_buffer_size 128k;
proxy_buffering on;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 120;
proxy_buffer_size 16k;
proxy_buffers 32 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;

location ~* ^/(phpmyadmin|webmail|squirrelmail|uebimiau|roundcube)/.+\.(jpg|jpeg|gif|png|ico|css|zip|tar|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|js|wmv|avi|cur|swf|mp3|wma|htc|cur)$ {
root /var/www/html/;
expires 30d;
access_log off;

location ~* ^/(stats)/.+\.(jpg|jpeg|gif|png|html|htm)$ {
root /var/www/html/;
access_log off;

location ~* ^/(mrtg|imrtg)/.+\.(jpg|jpeg|gif|png|html|htm)$ {
root /var/www/html/;
access_log off;

location /nginx_status {
stub_status on;
access_log off;
allow IP-ADDRESS; # Real IP here
deny all;
if ($http_host = "") {
return 444;

# เพื่อไว้สำหรับคนที่จะแยกค่า conf นะครับ. ไฟล์ตามด้านล่างของผมคือไฟล์ว่างเปล่า
include /etc/nginx/etc/*.conf;

Redirect Port CSF

Nginx สั่งให้ nginx ทำงานทันทีเมื่อ restart เครื่อง
/sbin/chkconfig nginx on

ติดตั้อง mod_rpaf ให้กับ apache เพื่อให้ log ตรง
# wget http://drupion.com/sites/default/files/mod_rpaf-0.6.tar_.gz
# tar xzf mod_rpaf-0.6.tar.gz
# cd mod_rpaf-0.6
# apxs -cia mod_rpaf-2.0.c


# vi /etc/httpd/conf/extra/httpd-includes.conf 


<IfModule mod_rpaf-2.0.c>
RPAFenable On
RPAFsethostname On
RPAFheader X-Forwarded-For

ที่เหลือก็ติดตั้งตามที่ต้องการตาม ลิงค์นี้ : www.thaihosttalk.com

[PHP] Protect web server with disable_functions

disable_functions = apache_child_terminate, apache_setenv, define_syslog_variables, escapeshellarg, escapeshellcmd,
exec, fp, fput, highlight_file, ini_alter, ini_get_all, ini_restore, inject_code, mysql_pconnect, openlog, passthru,phpAds_remoteInfo, phpAds_XmlRpc, phpAds_xmlrpcDecode, phpAds_xmlrpcEncode, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, posix_setuid, posix_uname,proc_open,proc_close, proc_get_status, proc_nice, proc_terminate, shell_exec, syslog, system, xmlrpc_entity_decode,curl_exec,curl_multi_exec,show_source,parse_ini_file,sleep,pcntl_exec,

add to php.ini

เปิดใช้ IPv6 ด้วย IPv4 บน server [LINUX: Centos/Fedora]

ก๊อบมาไว้อ่านเอง : ของท่าน ICEz

เชื่อว่าหลายๆ คนคงรอกันเก้อ เพราะ idc ไม่ยอมปล่อยมาซักที
ด้วยปัญหามันค่อนข้างเยอะครับ ทั้ง router firewall แล้วก็อุปกรณ์สารพัดจะ support ไม่หวาดไม่ไหว Continue reading “เปิดใช้ IPv6 ด้วย IPv4 บน server [LINUX: Centos/Fedora]”

DHCP: The MAC address filtering configuration

To add a MAC address to the DHCP allow list

  1. Click Start, point to Administrative Tools and then click DHCP.
  2. In the console tree, expand the applicable DHCP server, expand IPv4, and then expand Filters
  3. Click Allow, click New Filter…, type the Mac address and Description of the client to allow, and then click Add.

To remove a MAC address from the DHCP deny list

  1. Click Start, point to Administrative Tools and then click DHCP.
  2. In the console tree, expand the applicable DHCP server, expand IPv4, and then expand Filters
  3. Click Deny, right-click the MAC address of the client with the corresponding reservation, click Delete and then click Yes.