Archive for cPanel 教程

cpanel users to create multiple websites

Use a user multiple Web sites to give you first assign domain user rights:

Create packages package

resource allocation,Then ADD.

Multi-user editing


After entering a user selected,Or select a plurality of users. Pulled the bottom:
Distributed packages package
First, we close some dns detection function NS,DNS server can not be prevented without the use of additional domain name.

Finished modifying the above,Then into cpanel sub users,That is https://ip:2083port.

Add new domains
The above is a demo,Replace your own domain name.
After completion of the above,Get details.

Then we try to upload a file,Open File Manager.

Add the domain name path

Comments off

php

DSO

It is also known as mod_php.  It is the fastest way to serve the PHP requests. It runs PHP directly from the Apache without working like a separate service. The PHP scripts will run as the Apache user, which by default is the user ‘nobody’. In this case the PHP scripts all are owned & executed by the Apaches’s ‘nobody’ user. Therefore, we cannot track each individual user since they all run from one web server.  Security is another concern in DSO mode. It is vulnerable to malicious attacks that could modify your PHP scripts or modify the files outside of that user’s directory that had the PHP script that were exploitable. The benefit of the DSO handler is that it provides PHP opcode caching along with DSO to speed up the PHP requests. Also, we can set PHP directives directly via .htaccess files to control certain functionality of PHP.

You might choose DSO as your PHP handler if you only have one user and your primary concern is speed and performance.

CGI

CGI handler will run PHP as a CGI module as opposed to an Apache module. The CGI method is intended as a fallback handler for when DSO is not available. This method is neither fast nor secure. That is regardless of whether or not suEXEC is enabled. Nowadays, CGI handlers are used less frequently because of other handler benefits. Similar to suPHP and FastCGI, the CGI handler can use suEXEC. Instead, PHP executions are run by the file owner of a PHP script rather than the Apache “nobody” user. The usage of CGI handlers provides ease of configuration and support using suEXEC for reducing permission related issue. The main disadvantage of the CGI handler is that it is one of the slowest handler. The CGI handler is the least popular for this reason leading it to be one of the less frequently used handlers

CGI is a recommended PHP handler if suPHP, DSO, or FastCGI was not available in your server.

suPHP

Technically it is a CGI module, but it is entirely different from the CGI handler. It is the most flexible and secure way of serving PHP requests. The main advantage with this handler is it runs the PHP script as the user calling them, instead the ‘nobody’ user. Also, it is quite easy to monitor the usage of PHP script executions, because for every PHP request that is being processed a separate PHP process will be generated. Another advantage is that suPHP handler isolates one of the user on the server from others. This is a precaution taken because if one user’s account is misused then the attacker would only be able to view or modify files owned by that particular users. These applications require permission to have the ability to write, modify, and create files on the server. Permission management is easy to configure because all of your files are owned by just one user.

The main disadvantage of suPHP is speed and CPU load. This handler is recommended for small reseller clients, because it possess the high load of running separate PHP process per request. Also, if the server receives high amount of PHP requests in small period of time, this can result in a heavy load on your server.

The selection of suPHP as your PHP handler is recommended if you have multiple users on your server. You do not want to worry about setting permissions, and you are not having any performance issues with the PHP scripts that is currently used.

Fast CGI

FastCGI PHP handler is a faster way to serve PHP requests than using suPHP, but typically not as fast as using DSO. FastCGI helps reduce CPU usage by increasing the server’s available RAM in order to cache PHP scripts in the memory. This method is use instead of starting up a separate PHP process for each and every PHP request.

The main benefit of using FastCGI is that you can you can use suEXEC just like in the suPHP. This allows the PHP scripts to be executed by the actual user of the PHP script instead of the Apache’s ‘nobody’ user. It also does not require a single PHP process execution per request like suPHP does, which enhances the speed and the CPU usage by keeping PHP scripts in the memory. Issue regarding the memory usage is the drawback of FastCGI.  Also regarding the PHP opcode cache, itt keeps PHP sessions opened in the background in memory for faster access

FastCGI is the best handler if you are looking for a faster PHP execution, provided that you the high availability of memory to spare on your server.

Comments off

Protected: cpanel whm

This content is password protected. To view it please enter your password below:

Enter your password to view comments.

! FAILED TO INSTALL CPAN PERL MODULE(S) CRYPT::PASSWDMD5 !! – EASY APACHE

Well to fix this issue just run following command to install Crypt::PasswdMD5

# /usr/local/cpanel/bin/cpanm -n Digest::SHA1 Crypt::PasswdMD5

Once you have run the above code in SSH try Easy Apache again.

Comments (1)

The perl module installation

install Digest::SHA1 Crypt::PasswdMD5

cpan> install Bundle::CPAN
cpan> reload cpan
cpan> install DateTime  cpan> install DBI  cpan> install DBD::mysql cpan> install Class::Autouse cpan> install Digest::MD5 cpan> install Digest::SHA1 cpan> install HTML::Template cpan> install Image::Size cpan> install MIME::Lite cpan> install MIME::Wordscpan> install Compress::Zlib cpan> install Net::DNS cpan> install URI::URL cpan> install HTML::tagset cpan> install HTML::Parser cpan> install LWP::Simple cpan> install LWP::UserAgentcpan> install GD cpan> install Mail::Address cpan> install Unicode::MapUTF8 cpan> install XML::Simple cpan> install IO::WrapTie cpan> install Unicode::CheckUTF8 cpan> install Captcha::reCAPTCHA cpan> install Digest::HMAC_SHA1

Read the rest of this entry »

Comments

Web hosting and domain names bound pseudo-static rule 301 Jump .htaccess 301 redirect

.htaccess apache This module is regarded as one called it expanded to show the template,To make it possible to run must RewriteEngine:Let's rewrite the following features on or off。on open;is closed off,Possible。

Redirect Old domain name .com to www. New domain name .com.

 

Code is as followsCopy the code

RewriteEngine On
RewriteCond %{HTTP_HOST} !Old domain name .com $ [NC]
RewriteRule ^(.*)$ http://www. new domain name .com / $ 1 [L,R=301]

Redirect Old domain name .com to the new domain name .com

Code is as followsCopy the code

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !Old domain name .com $ [NC]
RewriteRule ^(.*)$ http://The new domain name .com / $ 1 [L,R=301]

重定向domain.com/file/file.php 到 otherdomain.com/otherfile/other.php

Code is as followsCopy the code

RewriteCond %{HTTP_HOST} ^www.domain.com$
RewriteRule ^file/file.php$ http://www.otherdomain.com/otherfile/other.php [R = 301, L]

RewriteBase /news
RewriteCond %{HTTP_HOST} ^www.111cn.net [NC]
RewriteRule com(.*)$ http://www.111cn.net$1 [L,R=301]

#Not slash the requested address is /wwwroot/www.111cn.net/news/

Code is as followsCopy the code

RewriteCond %{HTTP_HOST} ^www.111cn.net [NC]
RewriteRule (.*)$ http://www.111cn.net/news/$1 [L,R=301]

RewriteCond %{HTTP_HOST} ^124.173.133.154 [NC]
RewriteRule com(.*)$ http://www.111cn.net$1 [L,R=301]

RewriteCond %{HTTP_HOST} ^124.173.133.154 [NC]
RewriteRule (.*)$ http://www.111cn.net/news/$1 [L,R=301]

# Modify the following statement / discuz address for your Groups directory,If the program is placed in the root directory,Please / discuz modify /
RewriteBase /

# Rewrite rules do not modify the system

Code is as followsCopy the code

RewriteCond %{HTTP_HOST} !^www.111cn.net$ [NC]
RewriteRule ^(.*)$ http://www.111cn.net/$1 [L,R=301]
RewriteRule ^archiver/((in|time)-[w-]+.html)$ archiver/index.php?$1
RewriteRule ^forum-([0-9]+)-([0-9]+).html $ forumdisplay.php?at $ 1 =&page=$2
RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+).html $ viewthread.php?Time = $ 1&extra=page=$3&page=$2
RewriteRule ^space-(username|uid)-(.+).html$ space.php?$1=$2
RewriteRule ^tag-(.+).html$ tag.php?name=$1

[NC]:no case of abbreviations。Means ignore case,a-z and A-Z is no difference。
[NC,OR]:OR=AND。It meant to be followed under a grammatical sentence。
[R = 301, L]:R=301:redirect Abbreviation。It means using the 301 permanent steering (when the URL in the list above,Automatically redirected to the URL you specify);L:Last Abbreviation,Meaning that the last sentence。

Comments

Varnish HTTP accellerator and Cpanel

cd /usr/local/src
wget http://stderr.net/apache/rpaf/downlo…on F-0.6.tar.gz
tar -xzf mod_rpaf-0.6.tar.gz
CD mod_rpaf- *
apxs -i -c -n mod_rpaf-2.0.so mod_rpaf-2.0.c

2. Once installed, we need to load the module into Apache configuration. Since cPanel already has Include Editor for Apache, we will use that functions. Login to WHM > Service Configuration > Apache Configuration > Include Editor > Pre Main Include > All Versions and paste following text:

LoadModule rpaf_module modules/mod_rpaf-2.0.so
RPAFenable On
RPAFproxy_ips 127.0.0.1 123.124.125.88 # replace the value with your server IP
RPAFsethostname On
RPAFheader X-Real-IP

Comments

For cPanel nginx automatically install script

1.Complete directory password protection — The original author of the package inside,And can not do,The reason is that no judge status code 401.
2.Pseudo-static function — Whether you are ending or in html”/” The end of the URL address,The existence of the file / directory nginx will determine in advance the file system,If there is no,It will match the apache backend. The backend settings apache .htaccess file in accordance with,On display pages,Nginx front-end to get the content after compression,Visitors then passed to the browser.
3.Access log records accurate — The installation package author,Is nginx and apache share the same log file records .nginx recording static pages of information access,apache record dynamic page access information,Theoretically feasible, but in actual use,I found the problem. The problem is that a breach of the match when the suffix .html,At the same query front-end and back-end nginx apache. This resulted in duplicate log. Another is the number does not match any suffix,Only the front end of the process and records the visitor's request,It will initiate a request to query the back-end, but not because of the large file transfer is completed soon,So even set keepalive not help. In my installation package,I will be back-end user configuration Africa encryption port journaling canceled,Nginx entirely recorded by the distal end.
4.Log cutting issues — The problem from the front said the first 3:00 modifications,If you just modify the first 3:00 without performing this step,You will encounter a problem:When performing user access logs and cut into statistics page displayed to the user to see,The system will automatically delete the user's log,Cause the log access to the information after it lost nginx until the next reboot. After tracking log statistics cpanel process,Find / usr / local / cpanel / bin / safeapacherestart line. This line of action is to allow apache log after cutting can be safely restarted. The solution is to change a way of restarting nginx,I will be adding information to restart apache nginx restart command,After apache only need to perform command operations on it.
5.Pan-domain name resolution — cpanel support pan-domain name resolution,But also in terms of business as the host,Pan is also a feature of the domain name,We need to use it, but the author's version and my version before modifying,And no support for this conduct,Once the client has a pan-binding domain,We will not start the nginx,All users of the site affected. So this update contains this feature.
6.Proxy_cache based caching system — This is what I added,An optional feature. Delete cached method can follow squidclient manner. Unbuffered installed version http://icodex.org/public_nocache.tar

Also note,Netizens mentioned that string is a prompt to restart nginx after. This is a warning message prompts you to name the host for errors,It does not affect the use of.

Installation method and the same as the original author, please do the following installation!

cd /usr/local/src
wget http://icodex.org/public.tar
tar xf public.tar
cd publicnginx
./nginxinstaller install

After installing,Restart nginx,Excuting an order:/etc / init.d / nginx restart.Nginx configuration files are in / etc / nginx among,Each user binding domain(Additional fields,Subdomains etc.)They are in the / etc / nginx / vhosts

Uninstall:

After entering publicnginx execution ./nginxinstaller uninstall directory.

Comments

cpanel online file compression method

File Manager (File Manager) can extract the files,You can also compress files。Flexible operation,Easy to use。

The use of compressed files online:
Backup download site、File transfer and other operations。

cpanel online file compression method:

1、Login cpanel background,Click the File Manager (File Manager),As shown below:

2、 Select the directory you want to open,Click the "go" button,As shown below:

3、Into the appropriate folder,To select the compressed file or folder,Click on the top right corner of the "compression" button,As shown below:
(Hold down the ALT key on the keyboard does not let go,You can select multiple files with a mouse click button.)

4、Select compression format(Usually with zip)、Storage path and file name(Generally do not modify,default),Click "Compress Files",As shown below:

After completion of compression,You can see the compressed package. The results confirm that the correct and close the window.

Comments

cPanel decompress files online(Detailed、Graphic tutorial)

Online file decompression functions cPanel effective solution to the problems in the US space ftp upload speed is slow,Archive via ftp upload,Speed ​​quickly。

note:
cPanel only supports zip、tar、gzip and bzip2 four compressed file format!
So when we upload files via ftp tool,To advance the site's files into a zip format。

(Unzip the file format is not supported rar,.rar format so you can not upload the file and use Cpanel decompression.)

Here's a file manager (File Manager) to detail the cPanel-extracting file online method steps:
1、Log cpanel control panel,Click on "File Manager (File Manager)",As shown below:

2、Select the directory you want to open,Click on "go" as shown below:

3、To find the extracted files,And click on the file,Then find the "unzip" button in the upper right corner of the page,And click。If as shown in the FIG.:

4、As shown below,Click "Extract Files" button (decompression button)

Unzip,Turn off window。

Finally, do not forget to upload their own zip archive deleted to free up space。

Comments

How to set up additional domain cpanel(addon domain)(A space to do more than one site)

This article describes additional fields provided cpanel(addon domain)To achieve a space to do more than one website method。

Additional fields(addon domain)

effect:It can be achieved through a space to put a number of different sites。Which it is able to bind subdirectory。

E.g:I applied for a domain name cpanel space with yourdomain.org,If I have another domain cpanel123.com ,Then,I do not need to buy a new space,The direct use of additional domain(addon domain)Features,You can add a new website in space。

cpanel to set up a space in multiple sites of methods:

1,First, log in to Cpanel control panel。Click Additional Domain(addon domain)。FIG follows:

2,Enter the domain name in the input box,For example cpanel123.com etc.(Note that do not fill www),
In the second input box click the left mouse button,then,Input box will automatically fill in the username cpanel123
The third input box will automatically fill in directory /public_html/cpanel123.com
enter password,
Enter the password again
Finally, click "Add Domain" (Add) button。FIG follows:

Then,The domain is set success。

A note on the example of:

Cpanel123.com system will automatically create a folder in the root directory of your site (public_html),cpanel123.com folder is the root of this new site,Directly to the website upload files to the directory /public_html/cpanel123.com/。

prompt:
cpanel123.com into your domain name when the actual operation。

Precautions:

If you are prompted an error tied to the domain name,Modify the domain name analytic NS,NS used to ensure that the domain name is provided by the host NS,Rather than your own meter's NS,Otherwise it is not tied on!(Host ns,Contact hosting provider can obtain a copy)

Comments

How to set up the secondary domain name cpanel(Subdomains)

This article describes how to set up the secondary domain name cpanel(Subdomains):Make your website visible, such as:bbs.yourdomain.com form。

1,Subdomain(Subdomains)

Subdomain is set up top-level domain of second level domain。
such as:Your domain name is yourdomain.com,You can set the secondary domain name of the form
bbs.yourdomain.com,blog.yourdomain.com 等。

Now start adding Subdomains(Subdomain)

1,First, log in to Cpanel control panel。Click Subdomains(Subdomain),Enter the sub-domain maintenance (Sub Domain Maintenance) page。FIG follows:

2,Enter the subdomain prefix in the input box,For example, bbs etc.,
Then select from a list of domain name suffixes in the back,For example cpanel123.com etc.,
In the second input box click the left mouse button,then,Input box will automatically fill in the directory / public_html / bbs
Finally, click "Add" (Add) button。FIG follows:

Then,Two domain names is set up successfully。

A note:Bbs system will automatically create a folder in the root directory of your site (public_html),bbs directory is the root directory of the secondary domain name,Directly upload files to secondary domain name of the website / public_html / bbs / directory。

Comments

How to set suspend domain cpanel(parked domain)(A site has multiple domain names)

This article describes how to set suspend the domain cpanel(parked domain),Has set up a website to achieve multiple domain names。

Suspended Domain、Alternate domain name(parked domain)

effect:Multiple domains bind to the same site。That,Have multiple domain names with a website,If the other domain can also bind to this space。

For example, you have the following three domain:yourdomain.com、yourdomain.net、yourdomain.org,
You can use the parked domain function,Put a few are bound to the domain name space,Let these domain names point to the same website。
(Ie, the same site can have several different domain names)。

cpanel add a pause domain method:

1,First, log in to Cpanel control panel。Click Pause domain(parked domain)。FIG follows:

2,Enter the new domain name in the input box,Then click "Add Domain" button,FIG follows:

After the success tips,We can use the new domain name visit this site。

Precautions:

If you are prompted an error tied to the domain name,Modify the domain name analytic NS,Make sure you use the meter NS is provided by the host NS,Rather than your own meter's NS,Otherwise it is not tied on!(Host ns,Contact hosting provider can obtain a copy)

Comments

Methods cpanel panel binding domain

This article describes the role of cpanel Spatial variations in binding domain,It allows you to select the appropriate domain name binding, according to their actual situation。

One of the advantages is that foreign cpanel space:Binding domain more convenient。
We used three kinds of ways binding domain:
1,Subdomain(Subdomains)
2,Suspended Domain、Alternate domain name(parked domain)
3,Additional fields(addon domain)。

1,Subdomain(Subdomains)

Second-level domain is the subdomain you bind on a host of top-level domain。
such as:Your domain name is yourdomain.com,You can set the secondary domain name of the form
bbs.yourdomain.com,blog.yourdomain.com 等。

2,Suspended Domain、Alternate domain name(parked domain)

effect:Multiple domains bind to the same site。

For example, you have the following three domain:yourdomain.com、yourdomain.net、yourdomain.org,
You can use the parked domain function,Put a few are bound to the domain name space,Let these domain names point to the same website。
(Ie, the same site can have several different domain names)。

3,Additional fields(addon domain)

effect:It can be achieved through a space to put a number of different sites。Which it is able to bind subdirectory。

Comments

cpanel add a database approach(Establish mysql)

cpanel control panel is easy to set up、delete、Database Management。

Create a new MySQL database requires only three steps:
1,build database,
2,Create a user name and password;
3,Adding users and permissions to the database。

Specific steps are as follows:

First login cpanel background,Locate the database area,Then click on the icon to enter the database mysql "database operation page",As shown below:

1,First, a new database;
In the input box, enter the name you plan to use the database,For example cpdb,Then click on the background of the "Add Database" button,As shown below:

After a successful database creation,Click "Back" button,

2,Then establish a database user name and password;
As shown below,Sequentially inputted
username;
password;
confirm password;
Then click on the "Create" button.

3,Assign permissions to the database and add users,So that the database user has permission to use the database just created。
As shown below,Choose a username and database name,Then click the Add button,Assign access rights page,

As shown below,Check the "all rights"。Click the "Change" button。ok

At this time we have successfully created a new database,And added user permissions for this database。

A few additional points:
1,In the cPanel,Prefix created database with cPanel account,such as:Suppose you Cpanel user name cpanel12, database name you enter is cpdb,Then the name of the database cpanel12_cpdb

2,Database user name and the same as above。

3,Examples of the information database built:
Database name cpanel12_cpdb (front to fill out the database name,I remember prefix,)
Database user name cpanel12_cpanel1 (fill in front of their username,I remember prefix)
Database Password **** (Fill in your own password)
Server localhost
4,When you add a "privilege" for the database user,Usually check the "all rights"。Of course, you can also assign separate permissions for certain users。

Comments

« Previous entries Next Page » Next Page »