Since there are alot of people asking for it, here is my HowTo about mod_ruid2 This is based on my Debian server with Apache 2.x. Installing this module its no longer needed to chmod config files to 666 or upload/attachments directories to 777. Since with this module enabled everything @ HTTP will run under the user itself and not 'apache' anymore. ** If you are using mod_ruid instead of mod_ruid2, first of all remove the mod_ruid line from '/etc/httpd/conf/httpd.conf' First, we are going to install libcap-devel For CentOS: yum -y install libcap-devel For Debian: aptitude install libcap2-dev After this is done we are going to download and install mod_ruid2 wget http://dave.t0xic.nl/tars/mod_ruid2-0.9.3.tar.bz2 tar xjf mod_ruid2-0.9.3.tar.bz2 cd mod_ruid2-0.9.3 apxs -a -i -l cap -c mod_ruid2.c Now, if you didn't get any errors mod_ruid2 should be installed and added to the '/etc/httpd/conf/httpd.conf ...
ขั้นตอนการทำให้ Directadim ของเราทำตามแนวคิดที่ว่ามานี้ ก่อนอื่นเรามาเพิ่มประสิทธิภาพของ Apache กับ PHP ด้วย Fcgi กันก่อน ไปที่ blog คุณ Icez ตาม link นี้ http://www.icez.net/...gid-php-fastcgi (หากไม่ใช้ fcgi ก็ไม่ต้องติดตั้งก็ได้ครับ) เอาหละถ้าใครทำเสร็จแล้วเราก็มาต่อกันเลย (อันนี้ผมทำใน Debian นะครับพอดีผมไม่ได้เล่น centos ใครใช้ centos วิธีการคงไม่ต่างกันมาก) ก่อนอื่นสั่งติดตั้ง NGINX ก่อนด้วย Code: aptitude install nginx centos ใช้ Code: yum install nginx จากนั้นแก้ไขไฟล์ config nano /etc/nginx/nginx.conf user apache apache; worker_processes 4; worker_rlimit_nofile 150000; error_log /var/log/nginx/error_log; pid /var/run/nginx/nginx.pid; events { worker_connections 25000; } ...
aptitude install nginx
yum install nginx
ก่อนอื่น copy & paste ตามสูตร cd /usr/local/src wget http://mirrors.issp.co.th/apache/httpd/mod_fcgid/mod_fcgid-2.3.5.tar.bz2 tar jxf mod_fcgid-2.3.5.tar.bz2 cd mod_fcgid-2.3.5 APXS=/usr/sbin/apxs ./configure.apxs && make && make install chmod 755 -R /var/lib/httpd mkdir /fcgi ไปที่ /usr/local/directadmin/custombuild/ เปิดไฟล์ options.conf แก้ php5_cgi=yes ส่วน php อันอื่น no ให้หมด แล้วสั่ง ./build php จนเสร็จ แล้วเปิดไฟล์ /etc/httpd/conf/extra/httpd-info.conf เพิ่มไอ้นี่ต่อท้าย LoadModule fcgid_module /usr/lib/apache/mod_fcgid.so SharememPath /var/run/fcgid_shm SocketPath /var/lib/httpd/fcgid/sock IdleTimeout 3600 ProcessLifeTime 7200 MaxProcessCount 128 DefaultMaxClassProcessCount 4 IPCConnectTimeout 60 IPCCommTimeout 90 DefaultInitEnv RAILS_ENV production # DefaultInitEnv PHP_FCGI_CHILDREN ...