您的位置:首页 > 运维架构 > Linux

WHM(Web Hosting Manager)/CPANEL 设置及linux 文件权限 经验

2012-11-02 11:54 218 查看
新买的独立主机使用方法:

1.开设空间

找到 Create a New Account



2.



3.下面就是我们得到的ftp账户



--------------------------------------------------------------------

如果在ftp的账户中添加新域名失败
使用带以下 IP 的命名服务器: 216.69.185.9,208.109.255.9 对不起,此域已经指向了一个 IP 地址,但是该地址好像使用了和本服务器没有关联的 DNS 服务器。 请将此域转向此服务器命名服务器,或者让管理员向 /etc/ips.remotedns 添加一个命名服务器,并在远程命名服务器上输入正确的项目。

Cpanel 添加域名,提示:There was a problem creating the addondomain. Show Details
Error from park wrapper: Sorry, cannot determine nameserver IPs. Please make sure that the domain is registered with a valid domain registrar.

解决方法:

Please access WebHost Manager (WHM) and review the Tweak Settings section labeled Domains:

WHM: Main >> Server Configuration >> Tweak Settings >> Domains


设置允许外面的域名添加
• Allow Remote Domains [?] Allow creation of parked/addon domains that resolve to other servers (e.g. domain transfers) This can be a major security problem. If you must have it enabled, be sure not to allow users to park common Internet domains.
• Allow unregistered domains [?] Allow creation of parked/addon domains that are not registered.
• Block common domain usage [?] Prevent users from parking/adding on common Internet domains. Recommended.

--------------------------------------------------------------------

Linux 权限问题

如果远程用linux界面copy文件,(把user1的文件复制给user2),

cp -R user1/www/文件名 user2/www/文件名


那么就存在一个文件所有者的问题

ftp - user1 所绑定的域名可以正常访问页面,包括php,但ftp - user2 所绑定的域名不能正常访问复制过来的文件程序

因为用root用户把 user1文件copy 给user2后, 文件的所有者是 root,此时如果权限不是 777,那么ftp-user2 的文件,use2无法修改,需要更改文件拥有者

将目前目录下的所有档案与子目录的拥有者皆设为 users 群组的使用者 lamport :

chown -R lamport:users *


这样修改完后,user2才能修改 ftp-user2里面的文件

但或许还不能访问成功,提示 500错误:

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@pureisle.net and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

日志错误显示:

Sat Jul 10 01:04:31 2010] [error] [client 71.229.226.14] SoftException in Application.cpp:601: Directory "/home/wwxin/public_html/idiy" is writeable by group

说父路径权限错误,

意思是这样的:

文件夹权限要设置为755或者更低,文件权限要设置为644或者更低.

因为如果权限为777的话mod 安全规则会阻止这个请求。所以无法访问页面,提示内部服务器错误

但我自己设置的时候,由于文件太多了,要把权限都设置成644的话,工作量太大了,所以我的文件的权限还是755,还是能正常访问

--------------------------------------------------------------------

--------------------------------------------------------------------

Apache 重启

Apache : /usr/local/apache/conf/httpd.conf

关键是找到httpd这个文件。
[root@test bin]# httpd restart
-bash: httpd: command not found
明显是bash在path所指的目录下找不到httpd,试试找到它,然后用绝对路径。比如我们这里是
/home/service/apache/bin/httpd -k restart

--------------------------------------------------------------------
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: