Warning: include(/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php): failed to open stream: No such file or directory in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: include(/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php): failed to open stream: No such file or directory in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: include(): Failed opening '/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php' for inclusion (include_path='.:/opt/cpanel/ea-php70/root/usr/share/pear') in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24
CPanel developer’s note – unethost無限空間虛擬主機 技術分享部落格

CPanel developer’s note

想不到最近還是有寫程式的機會,XD
目標是:修改httpd.conf , 根據cpanel的user package,來設置cband的quota limit
algorithms:
(1) 由cpanel的api—listaccts
去抓出package ( 看是A, B, C .. )
(2) 對於每一個user
建立資料夾 mkdir -p /usr/local/apache/conf/userdata/std/2/$user
(3) 由每一個user 的package, A —> a.conf
B —> b.conf
將對應的 $package.conf 拷貝到
/usr/local/apache/conf/userdata/std/2/$user/$package.conf
(4) 重新generate /usr/local/apache/conf/httpd.conf
下command /usr/local/cpanel/bin/build_apache_conf