存档

‘WHM/Cpanel’ 分类的存档

whmcs根据English.txt的标签,根据别人的已有翻译,生成新的翻译文件

2010年8月30日 没有评论
<?php
header('Content-type: text/plain;charset=utf-8');
eval(file_get_contents('English.txt'));
eval(file_get_contents('Chinese.txt'));
 
$lang='';
foreach($_LANG as $key=>$value){
	$q=strstr($value,'"')?"'":'"';
	$lang.='$_LANG[\''.$key.'\'] = '.$q.$value.$q.";\r\n";
}
file_put_contents('Chinese.txt',$lang);
?>
分类: WHM/Cpanel 标签:

cpanel创建新用户提示符为bash-3.2$

2010年8月28日 没有评论

首先这个提示符是由/etc/profile设置的,默认创建linux用户都会有~/.bash_profile,该文件会调用/etc/profile

这里问题是创建新用户,没有~/.bash_profile ~/bashrc ~/bash_logout文件
linux新建用户,会拷贝/etc/skel下的文件,经检查/etc/skel下有这些文件,然后手动useradd验证linux下添加用户正常,所以问题应该出在cpanel那边

经搜索cpanel论坛,从

http://forums.cpanel.net/f5/ssh-help-145681.html

找到,cpanel创建用户会拷贝的文件在/root/cpanel3-skel/目录
检查/root/cpanel3-skel/下确实没有~/.bash_profile ~/bashrc ~/bash_logout文件

拷贝过去,cp /etc/skel/.bash* /root/cpanel3-skel/

下面bash可以修复,不过usr.list要自己创建

#!/bin/bash
 
# fix cpanel bash prompt
 
for usr in `cat usr.list`;do
	if [ -d /home/$usr/ ];then
		cp -f /etc/skel/.bash* /home/$usr/
		chown $usr:$usr /home/$usr/.bash*
	fi
done
分类: WHM/Cpanel 标签:

Nginx For Cpanel and Apache

2010年6月12日 没有评论

http://www.silentstreet.net/sq/archives/nginx-for-cpanel-and-apache/

http://icodex.org/2010/02/nginx%E8%87%AA%E5%8A%A8%E5%AE%89%E8%A3%85%E8%84%9A%E6%9C%AC-for-cpanel/

分类: WHM/Cpanel 标签:

Cpanel 自定义php.ini

2009年1月30日 没有评论

经过查资料,类似Lunarpages的自定义php.ini是需要运行在suPHP的

以suPHP运行时,每个目录下都可以自定义php.ini,也可以用在public_html/.htaccess内写如下语句

suPHP_ConfigPath /home/user/public_html/

来使所有目录包括子目录都应用这个public_html/php.ini,其中user是Cpanel用户名

 

分类: WHM/Cpanel 标签: