Friday, September 30, 2011

kloxo Assigning a Dedicated IP address to your Site

Other Useful Features

Kloxo has many other features that are very useful. Some of the more common and frequently used features are explained below and include assigning a site a dedicated IP address, setting up and SSL certificate, using the "Files" tab and a brief discussion of clients and resellers you can create on your VPS.
NOTE: Your VPS has one IP address assigned to it by default. This is the IP address referenced in your welcome e-mail. If your VPS plan includes more than one IP address you can request additional IP addresses through our ticket system: http://my.a2hosting.com
Please provide the reason for needing the additional IP address in your ticket. We keep documentation on all IP requests to prevent usage that is against our Terms of Service. If you have used all of your available IP you can request additional IP address through the ticket system. Current pricing is $3 per IP per month but is subject to change.

Assigning a Dedicated IP address to your Site

To assign a dedicated IP address to your site, log into Kloxo. From the Home screen click the "Ipaddresses" icon in the "Resources" box.

After clicking on the icon you will be taken to a screen that lists all IP addresses assigned to your VPS. Click on the IP address you wish to assign to a particular domain. You will then be taken to the options screen for that IP address.

Click the "Configure Domain" tab at the top of the page. You will then be presented with something like the following:

Use the drop-down menu to select the domain you wish to assign to the IP address listed in the box above then click "Update".
NOTE: If you have not yet updated DNS for your domain you will receive an error message like the following:
Alert: To map an IP to a domain, the domain must ping to the same IP, otherwise, the domain will stop working. The domain you are trying to map this IP to, doesn't resolve back to the IP, and so it cannot be set as the default domain for the IP.
If you would like to assign your site a dedicated IP BEFORE you update DNS you can do so by adding the following line to /etc/hosts
'192.168.1.1 domain.tld'
You can either edit the file directly or issue a command such as the following:
'echo "192.168.1.1 domain.tld" >> /etc/hosts'
(make sure you use two ">>" or you will overwrite the file.)
In both examples remove the single quotes around the outside and replace the '192.168.1.1' with the IP address you want to assign and "domain.tld" with your domain name.
After you have made this change you can go back and follow the steps for adding the dedicated IP address listed above and you should not receive the error. You cannot assign a dedicated IP address to more than one site. If you do not assign a site a dedicated IP address it will "share" the main IP address on the server by means of virtual hosts in your webserver software (apache/lighttpd). These will be configured automatically by Kloxo.

Installing an SSL Certificate

Through Kloxo you can install an SSL certificate you have already purchased, create a self- signed certificate for personal use or generate a "CSR" (certificate signing request) for ordering a new certificate.
NOTE: In order to install an SSL certificate on a domain it MUST have a dedicated IP address. Only one SSL certificate can be installed per IP address.
Log into Kloxo and go to the Home screen. In the "Resources" box click the SSL Certificates icon.

  1. Uploading a Current SSL Certificate
    1. If you already have an SSL certificate you would like to use click the "Add Upload File" tab. Give the SSL certificate a name; this can be anything you like. Click the "Browse" buttons and upload the Key, Certificate, and CA file (if applicable) then click "Add"
    2. Now click the "SSL Certificates" tab and you should see the SSL certificate you just uploaded in the list.
    3. Assign the domain you wish to configure a dedicated IP address (see instructions above)
    4. Click the "Home" tab then click the "Ipaddresses" icon in the 'Resources' box.
    5. Click the IP address you assigned to the domain you are installing the SSL certificate on then click the "SSL Configuration Home" tab.
    6. Using the drop-down menu select the name of the SSL certificate you uploaded previously then click "Update"
    7. Kloxo should restart Apache (or lighttpd) automatically but if https:// isn't working properly you may need to restart it manually.
  2. Generating a self-signed SSL certificate
    1. Log into Kloxo and go to the Home screen. In the "Resources" box click the SSL Certificates icon.
    2. Click the "Add SSL Certificate" tab
    3. Give the SSL certificate a name and fill in the appropriate information in the boxes. Please keep in mind that an ssl certificate for "www.domain.com" is different from just "domain.com" so be sure to specify version of your domain you want the SSL certificate on. Click the "Add" button once you have filled in the appropriate information.
    4. Assign the domain you wish to configure a dedicated IP address (see instructions above)
    5. Click the "Home" tab then click the "Ipaddresses" icon in the 'Resources' box.
    6. Click the IP address you assigned to the domain you are installing the SSL certificate on then click the "SSL Configuration Home" tab.
    7. Using the drop-down menu select the name of the SSL certificate you uploaded previously then click "Update"
    8. Kloxo should restart Apache (or lighttpd) automatically but if https:// isn't working properly you may need to restart it manually.
  3. Generating a CSR to order a new SSL certificate from a certificate authority
    1. You can purchase SSL certificates through A2 Hosting. To view current offerings please see http://www.a2hosting.com/services/ssl-hosting You can submit a ticket to our billing department to order an SSL certificate.
    2. If you just need a CSR for use with an outside provider, log into Kloxo and go to the Home screen. In the "Resources" box click the SSL Certificates icon.
    3. Click the "Add SSL Certificate" tab
    4. Give the SSL certificate a name and fill in the appropriate information in the boxes. Please keep in mind that an ssl certificate for "www.domain.com" is different from just "domain.com" so be sure to specify version of your domain you want the SSL certificate on. Click the "Add" button once you have filled in the appropriate information.
    5. Click on the "SSL Certificates" tab then click on the name of the SSL certificate you just created.
    6. The CSR will be listed in the middle of the screen. You can copy and paste the CSR (be sure to include the ----- BEGIN ----- and -----END----- lines) into your outside providers request form.

The "Files" Tab

You can use the "Files" tab as an alternative to FTP or SFTP to upload or download files to/from your site. You can also zip files or folders for smaller download, upload files from your home computer, a remote URL, or remote FTP server (the last 2 are great for transferring your data from your old hosting account).
The files tab does not require much explanation. Just click on the "Files" tab and use the File Manager tab to navigate your files then view/download current files or use the Upload tab to add files to your site. All uploaded files will be placed in "/home/admin"

Clients and Resellers

There are two types of clients; Resellers and customers. The main difference is Resellers can have customers under them. The smallest unit of authorization in Kloxo is a customer, who can have multiple domains under them.
In order to setup a Reseller or Client you will need to create a Resource Plan. A resource plan determines how many clients a reseller can have, how many domains can be hosted, traffic allowed, disk space allowed and much more.
If you are hosing multiple sites for different clients and wish to give them access to their content you can add a client login so they can modify their web content but no one else's.
The home directory of a customer is '/home/clientname', and his domain's document root is /home/clientname/domain.com'. He can also login through ftp using his clientname as the id and the password.

Tuesday, September 13, 2011

āļ§ิāļ˜ีāļāļēāļĢāđƒāļŠ้āļ‡āļēāļ™ date selector āļ”้āļ§āļĒ PopCalendarXP āđ€āļžื่āļ­āļĢāļ­āļ‡āļĢัāļšāļัāļšāļ§ัāļ™āļ—ี่ MySQL


PopCalendarXP āđ€āļ›็āļ™āļ‚āļ­āļ‡āļŸāļĢีāļ­ีāļāđāļĨ้āļ§āļ„āļĢัāļš āļœāļĄāđ€āļ­āļēāļĄāļēāđƒāļŠ้āļัāļšāđ‚āļ„้āļ” php āļ‹ึ่āļ‡āđ€āļ›āļĨี่āļĒāļ™āđƒāļŦ้āđ€āļ›็āļ™āļ āļēāļĐāļēāđ„āļ—āļĒāđ€āļĢีāļĒāļšāļĢ้āļ­āļĒāđāļĨ้āļ§ āđ€āļŦāļĨืāļ­āđāļ•่āļ›ีāļ—ี่āļĒัāļ‡āđ€āļ›็āļ™āļ„āļĢิāļŠāļĻัāļāļĢāļēāļŠ āļ­āļĒู่ āļ—āļģāđ€āļ›็āļ™āļ›ีāđ„āļ—āļĒāđ„āļĄ่āđ€āļ›็āļ™āđāļ•่āļ็āļžāļ­āđƒāļŠ้āļ‡āļēāļ™āđ„āļ”้āļ„āļĢัāļš āđƒāļ„āļĢāļŠāļ™āđƒāļˆāļĢāļēāļĒāļĨāļ°āđ€āļ­ีāļĒāļ”āđ€āļžิ่āļĄāđ€āļ•ิāļĄāļ็āđ€āļ§āļ›āļ™ี้āđ€āļĨāļĒ www.calendarxp.net/

āļ§ิāļ˜ีāđƒāļŠ้āļ™่āļ°āļ„āļĢัāļš
  • unzip āđ„āļŸāļĨ์āļ­āļ­āļāļĄāļēāđāļĨ้āļ§āđ„āļ›āļ§āļēāļ‡āđƒāļ™āđ€āļ§āļ›path āļ‚āļ­āļ‡ server āđ€āļŠ่āļ™ āļ‚āļ­āļ‡āļœāļĄāļ§āļēāļ‡āđ„āļ§้āļ—ี่
    C:\AppServ\www\date1\

  • āđƒāļ™ āđ‚āļŸāļĨāđ€āļ”āļ­āļĢ์ date1 āļœāļĄāļˆāļ°āļŠāļĢ้āļēāļ‡āđ„āļ§้ āļŠāļ­āļ‡āđ„āļŸāļĨ์āđ„āļ§้ test āļ™่āļ°āļ„āļĢัāļšāļ„ืāļ­ date01.php āđāļĨāļ° date02.php āļ‹ึ่āļ‡āļŠāļ­āļ‡āđ„āļŸāļĨ์āļ™ี้āļ็āđƒāļŠ้ dreamweaver āļŠāļĢ้āļēāļ‡āļĄāļēāļ„āļĢัāļšāļ‡่āļēāļĒāļ”ีāđāļĨāļ°āļˆāļ°āļĄีāđ‚āļŸāļĨāđ€āļ”āļ­āļĢ์ PopCalendarXP āļ‹ึ่āļ‡āđ€āļ›็āļ™āđ„āļŸāļĨ์āļ—ี่āļœāļĄāđ‚āļŦāļĨāļ”āļĄāļēāđāļĨāļ°āđāļ้āđ€āļ›็āļ™āļ āļēāļĐāļēāđ„āļ—āļĒāđ€āļĢีāļĒāļšāļĢ้āļ­āļĒāđāļĨ้āļ§
  • āļĨāļ­āļ‡āļĢัāļ™āļ•āļēāļĄāļ™ี้āļ™่āļ°āļ„āļĢัāļš http://localhost/date1/date01.php
  • āļ‹ึ่āļ‡āļ§ิāļ˜ีāļāļēāļĢ install āļœāļĄāļ‚āļ­āļŠāļĢุāļ›āļ„āļĢ่āļēāļ§āđ†āļ”ัāļ‡āļ™ี้āļ™่āļ°āļ„āļĢัāļš
  1. āļŠāļĢ้āļēāļ‡ form āļ‚ึ้āļ™āļĄāļēāđāļĨāļ°āļŠāļĄāļĄุāļ•ิāļ•ั้āļ‡āļŠื่āļ­ form āđ€āļ›็āļ™ testform
  2. āļŠāļĢ้āļēāļ‡ text field āļ‚ึ้āļ™āļĄāļēāđāļĨāļ°āļŠāļĄāļĄุāļ•ิāļ•ั้āļ‡āļŠื่āļ­āļ§่āļē dc
  3. āđƒāļŦ้āļ™āļģāđ‚āļ„้āļ”āļ™ี้āļ§āļēāļ‡āđ„āļ§้āļŦāļĨัāļ‡āļ„āļģāļŠั่āļ‡ text field
    <a href="javascript:void(0)" onclick="if(self.gfPop)gfPop.fPopCalendar(document.testform.dc);return false;" ><img class="PopcalTrigger" align="absmiddle" src="PopCalendarXP/calbtn.gif" width="34" height="22" border="0" alt=""></a> 
    
    

  4. āļŠัāļ‡āđ€āļāļ•āđƒāļ™āđ‚āļ„้āļ”āļ•āļĢāļ‡ (document.testform.dc) āļˆāļ°āđ€āļŦ็āļ™āļ§่āļē form_name.textfield_name āļˆāļ°āļ•้āļ­āļ‡āđ€āļŦāļĄืāļ­āļ™āļัāļ™āļัāļšāļ—ี่āđ€āļĢāļēāļ•ั้āļ‡āđ„āļ§้āļ™่āļ°āļ„āļĢัāļšāļ‹ึ่āļ‡āļŦāļēāļāđ€āļĢāļēāļ•้āļ­āļ‡āļāļēāļĢāđƒāļŠ้āļ‡āļēāļ™ selector āļŦāļĨāļēāļĒāļ•ัāļ§āđƒāļ™ form āđ€āļ”ีāļĒāļ§āļัāļ™āđ€āļĢāļēāļ็āđāļ„่āđ€āļ›āļĨี่āļĒāļ™āđ€āļ‰āļžāļēāļ°āļŠื่āļ­ text field āđƒāļŦ้āļ•่āļēāļ‡āļัāļ™āļ็āļžāļ­āļ„āļĢัāļšāļ‹ึ่āļ‡āđƒāļ™āđ‚āļ„้āļ” date01.php āļœāļĄāļˆāļ°āđƒāļŠ้āđ€āļ›็āļ™ (document.testform.dc)āđāļĨāļ° (document.testform.dc1)āđ€āļžื่āļ­āđƒāļŠ้āļ•ัāļ§ selector āļŠāļ­āļ‡āļ•ัāļ§
  5. āļĨืāļĄāļ‚ั้āļ™āļ•āļ­āļ™āļŠุāļ”āļ—้āļēāļĒāļ็āļ•้āļ­āļ‡āđ€āļ­āļēāđ‚āļ„้āļ”āļ‚้āļēāļ‡āļĨ่āļēāļ‡āļ™ี้āļ™่āļ°āļ„āļĢัāļšāđ„āļ›āļ§āļēāļ‡āđ„āļ§้āļ่āļ­āļ™tag </body> āļ™āļ°āļ„āļĢัāļš
    <!--  PopCalendar(tag name and id must match) Tags should not be enclosed in tags other than the html body tag. -->
    <iframe width=174 height=189 name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="PopCalendarXP/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;">
    </iframe>
    

āļ‹ึ่āļ‡āđ€āļ—่āļēāļ™ี้āđ€āļĢāļēāļ็āļˆāļ°āđ„āļ”้āļāļēāļĢāļŠ่āļ‡āļ„่āļēāļ§ัāļ™āļ—ี่āđ„āļ›āđ€āļ็āļšāļĨāļ‡āđƒāļ™āļāļēāļ™āļ‚้āļ­āļĄูāļĨāđāļšāļšdefault āļ‚āļ­āļ‡MySQL āđ€āļĢีāļĒāļšāļĢ้āļ­āļĒāļ„āļĢัāļš
āđ‚āļŦāļĨāļ”āđ‚āļ„้āļ”āļ—ั้āļ‡āļŦāļĄāļ”āđ„āļ”้āļ—ี่āļ™ี่āļ„āļĢัāļš date1.zip

Fusionchart+PHP+MySQL āđāļšāļšāļ—ีāļĨāļ° Step āļ„ัāļš

āļ§ิāļ˜ีāļāļēāļĢāđāļŠāļ”āļ‡āļāļĢāļēāļŸ Fusionchart v.3 āđ‚āļ”āļĒāļ”ึāļ‡āļ‚้āļ­āļĄูāļĨāļĄāļēāļˆāļēāļāļāļēāļ™āļ‚้āļ­āļĄูāļĨ MySQL āđ‚āļ”āļĒāđƒāļŠ้āļ āļēāļĐāļē PHP āļ„āļĢัāļš

step1. āđ€āļĢิ่āļĄāļˆāļēāļāļŠāļĢ้āļēāļ‡āļāļēāļ™āļ‚้āļ­āļĄูāļĨāļ—ี่āļŠื่āļ­ fusion-test [Download] āđāļĨāļ°āļŠāļĢ้āļēāļ‡āļ•āļēāļĢāļēāļ‡āļ—ี่āļŠื่āļ­ data1 āđāļĨāļ°āđ€āļžิ่āļĄāļ‚้āļ­āļĄูāļĨāļĨāļ‡āđ„āļ›āļ•āļēāļĄāļĢูāļ›āļ„āļĢัāļš


step2. āđ‚āļŦāļĨāļ”āļāļĢāļēāļŸ [download] āđāļĨāļ° unzip āđ„āļ§้āđƒāļ™āđ€āļ§āļ› root āđ‚āļ”āļĒāļ‚āļ­āļ‡āļœāļĄāļˆāļ°āđ€āļ็āļšāđ„āļ§้āļ—ี่āļ™ี่ C:\AppServ\www\FusionCharts_Evaluation\ āļˆāļēāļāļ™ั้āļ™āļ็āļĨāļ­āļ‡āđ€āļĢีāļĒāļāļ”ูāđ€āļĨāļĒāļ„āļĢัāļšāļ•āļēāļĄ path āļ™ี้
http://localhost/FusionCharts_Evaluation/Code/PHP/DBExample/Default.php
āļ–้āļēāļĢัāļ™āđ„āļ”้āđāļšāļšāļ™ี้āļ็āđ‚āļ­āđ€āļ„āđāļĨ้āļ§āļ„āļĢัāļš


āļŦāļĄāļēāļĒ āđ€āļŦāļ•ุ āļāļĢāļēāļŸāļ—ี่āļœāļĄāđƒāļŦ้āđ‚āļŦāļĨāļ”āđ€āļ›็āļ™āļ•ัāļ§āļ—ี่āļœāļĄāļ•ัāļ”āļšāļēāļ‡āļŠ่āļ§āļ™āļ­āļ­āļāđ€āļ­āļēāđ€āļ‰āļžāļēāļ°āđ„āļŸāļĨ์āļ—ี่āđ€āļี่āļĒāļ§āļ‚้āļ­āļ‡āđ€āļ—่āļē āļ™ั้āļ™āđāļĨāļ°āđāļ้āđ„āļ‚āđ€āļĢีāļĒāļšāļĢ้āļ­āļĒāđāļĨ้āļ§āļ™่āļ°āļ„āļĢัāļšāđ‚āļ”āļĒāđƒāļ„āļĢāļ­āļĒāļēāļāđ‚āļŦāļĨāļ”āđ€āļ­āļēāđ„āļŸāļĨ์āļ—ั้āļ‡āļŦāļĄāļ”āļ—ุāļāļ āļēāļĐāļē āļŠāļēāļĄāļēāļĢāļ–āđ‚āļŦāļĨāļ”āđ„āļ”้āļ—ี่āđ€āļ§āļ›āļ™ี้ www.fusioncharts.com

āđ‚āļ”āļĒāļāļĢāļēāļŸāļ—ี่āļœāļĄāļ•้āļ­āļ‡āļāļēāļĢāđāļŠāļ”āļ‡āļ„ืāļ­ āđāļŠāļ”āļ‡āļˆāļģāļ™āļ§āļ™āļ—ี่āđ€āļŦāļĨืāļ­āļ‚āļ­āļ‡āļŠิāļ™āļ„้āļēāđāļ•่āļĨāļ°āļ›āļĢāļ°āđ€āļ āļ—
āđ„āļŸāļĨ์āļ—ี่āļœāļĄāđāļ้āđ„āļ‚āļĄีāļ•āļēāļĄāļ™ี้āļ„āļĢัāļš
1.āđ„āļ›āļ—ี่ C:\AppServ\www\FusionCharts_Evaluation\Code\PHP\Includes āđāļ้āđ„āļŸāļĨ์ DBConn.php āļ•āļēāļĄāļ™ี้
$hostdb = 'localhost';   // MySQl host
    $userdb = 'root';    // MySQL username
    $passdb = 'Your-Password';    // MySQL password āļ–้āļēāđ„āļĄ่āļĄีāļ็āđƒāļŠ่ ''
    $namedb = 'fusion-test'; // MySQL database name


2.āđ„āļ›āļ—ี่ C:\AppServ\www\FusionCharts_Evaluation\Code\PHP\DBExample āđāļ้āđ„āļŸāļĨ์ Default.php āļ•āļēāļĄāļ™ี้
$strQuery = "select distinct(type) as type_name , sum(amount) as count_amt from data1 group by type_name";

            $strXML .= "<set label='" . $ors2['type_name'] . "' value='" . $ors2['count_amt'] . "' />";


āđāļĨāļ°āļŦāļēāļāļ•้āļ­āļ‡āļāļēāļĢāđ€āļ›āļĨี่āļĒāļ™āļāļĢāļēāļŸāđāļ—่āļ‡āļ็āđāļ„่āđāļ้āļ•āļĢāļ‡āļ„āļģāļŠั่āļ‡ āđ€āļ›āļĨี่āļĒāļ™āļˆāļēāļ Pie3D.swf āđ€āļ›็āļ™ Column3D.swf āļ•āļēāļĄāļ™ี้
echo renderChart("../../FusionCharts/Column3D.swf", "", $strXML, "FactorySum", 600, 300, false, false);



āļ—ี่āļ•้āļ­āļ‡āđāļ้āļŦāļĨัāļāđ†āļ็āļĄีāđāļ„่āļ™ี้āļ„āļĢัāļš āļ„ืāļ­ query āļ„āļģāļŠั่āļ‡āđƒāļŦāļĄ่ āđāļĨ้āļ§āļ็ set āļ„่āļē label āđ€āļžื่āļ­āļŠ่āļ‡āļ„่āļē xml āđƒāļŦ้āļ•āļĢāļ‡āļัāļš query āđ„āļ›āļĒัāļ‡āļ•ัāļ§āļāļĢāļēāļŸ
āđ€āļŠāļĢ็āļˆāđāļĨ้āļ§āļ„๊āļēāļš āļ‡่āļēāļĒāļ›่āļēāļ§ āļ­ิāļ­ิ

Kloxo error "Some of Horde's configuration files are missing or unreadable conf.php"

Kloxo error "Some of Horde's configuration files are missing or unreadable conf.php"

āļ§ัāļ™āļ™ี้āļ•ิāļ”āļ•ั้āļ‡ kloxo āđƒāļŦāļĄ่ āļ›āļĢāļēāļāļāļ§่āļē webmail āļ—ั้āļ‡ Horde āđāļĨāļ° RoundCube āđƒāļŠ้āđ„āļĄ่āđ„āļ”้ āļ‚ึ้āļ™ error āļ—ั้āļ‡āļ„ู่

Error āļ‚āļ­āļ‡ Horde
"Some of Horde's configuration files are missing or unreadable conf.php"

āļĨāļ­āļ‡āļ„้āļ™āļŦāļēāļ§ิāļ˜ีāđāļ้āđ„āļ‚āđƒāļ™ LxCenter āļžāļšāļ—āļēāļ‡āđāļ้āļ—ี่āđ„āļ”้āļœāļĨāļ„ืāļ­āđƒāļŠ้āļ„āļģāļŠั่āļ‡

chmod 644 /home/kloxo/httpd/webmail/horde/config/conf.php

āļ›ัāļāļŦāļēāļ„ืāļ­āđ„āļŸāļĨ์ conf.php āđ„āļ”้āđ€āļ›āļĨี่āļĒāļ™ Permission āđ€āļ›็āļ™ 600 āļ—āļģāđƒāļŦ้āđƒāļŠ้āļ‡āļēāļ™āđ„āļĄ่āđ„āļ”้

Error āļ‚āļ­āļ‡ RoundCube
Roundcube had "Configuration Error: db.inc.php"

āļ›ัāļāļŦāļēāđ€āļิāļ”āļ‚ึ้āļ™āļ­āļĒ่āļēāļ‡āđ€āļ”ีāļĒāļ§āļัāļ™āļ„ืāļ­ Permission āļ‚āļ­āļ‡ db.inc.php āđ€āļ›็āļ™ 600
āļ—āļēāļ‡āđāļ้āļ็āđƒāļŠ้ putty āđ€āļ‚้āļēāđ„āļ›āđƒāļŠ้āļ„āļģāļŠั่āļ‡

chmod 644 /home/kloxo/httpd/webmail/roundcube/config/db.inc.php

āļ§ิāļ˜ีāļ•ิāļ”āļ•ั้āļ‡ MTRG āļšāļ™ Kloxo

āđ€āļ›็āļ™āļŦāļ™ึ่āļ‡āđƒāļ™āđ€āļ—āļ„āļ™ิāļ„āļ—ี่āļœāļĄāļ™āļģāļĄāļēāđ€āļžิ่āļĄāļ„āļ§āļēāļĄāļŠāļēāļĄāļēāļĢāļ–āđƒāļŦ้āđāļ่ VPS(Linux) āļ—ี่āđƒāļŠ้ Control Panel Kloxo Lxadmin
āļ‹ึ่āļ‡ āļ–้āļē VPS āļ—ี่āđ€āļĢāļēāđ€āļŠ่āļēāļĄāļēāđ€āļ›็āļ™āđāļšāļšāđ„āļĄ่āļĄี Control Panel āļŠāļģāļŦāļĢัāļšāļ”ู Status āļ•่āļēāļ‡āđ†āļ‚āļ­āļ‡ VPS  āļĄัāļ™āļ็āđ€āļ›็āļ™āđ€āļĢื่āļ­āļ‡āļĨāļģāļšāļēāļāļžāļ­āļŠāļĄāļ„āļ§āļĢ āļ—ี่āđ€āļĢāļēāļˆāļ°āđ€āļŠ็āļ„āļ§่āļē VPS āļŦāļĢืāļ­ Server āļ‚āļ­āļ‡āđ€āļĢāļē āđƒāļŠ้āļ‡āļēāļ™ CPU, RAM, Traffic , Connections āđ„āļ›āļĄāļēāļāļ™้āļ­āļĒāđāļ„่āđ„āļŦāļ™

āļˆāļĢิāļ‡āđāļĨ้āļ§āđ† āļĄีāđ‚āļ›āļĢāđāļāļĢāļĄāļ­ื่āļ™āđ†āļ—ี่āļ™ิāļĒāļĄāđƒāļŠ้āļัāļ™āļ­ีāļāļ™āļ­āļāļˆāļēāļ MRTG āļ­āļĒ่āļēāļ‡ Munin āļ็āđāļŠāļ”āļ‡āļœāļĨāđ„āļ”้āļĨāļ°āđ€āļ­ีāļĒāļ”āļ”ีāđ€āļŦāļĄืāļ­āļ™āļัāļ™

āļ่āļ­āļ™āļ­ื่āļ™āļ็āđ€āļ‚้āļē Shell āļ่āļ­āļ™āļ™āļ°āļ„āļĢัāļš āđāļĨ้āļ§āļ๊āļ­āļšāļ„āļģāļŠั่āļ‡āđ„āļ›āđƒāļŠ้āļ‡āļēāļ™āđ„āļ”้āđ€āļĨāļĒāļ„āļĢัāļš

- āļ•ิāļ”āļ•ั้āļ‡ mrtg āļ่āļ­āļ™
yum -y install net-snmp net-snmp-utils mrtg
cd /etc/snmp/
mv snmpd.conf snmpd.conf.bak
nano snmpd.conf


- āđāļ้āđ„āļ‚ Config āđ‚āļ”āļĒāļāļēāļĢāļ๊āļ­āļšāļ‚้āļēāļ‡āļĨ่āļēāļ‡āđ„āļ›āļ§āļēāļ‡āđƒāļ™ text editor āđ€āļĨāļĒāļ„āļĢัāļš
syslocation  Thailand
syscontact  admin
sysservices 79
rocommunity  snmp 127.0.0.1
agentaddress  127.0.0.1


chkconfig snmpd on
/etc/init.d/snmpd start


- āļŠāļĢ้āļēāļ‡ Directory āļ—ี่āđƒāļŠ้āđƒāļ™āļāļēāļĢāļ—āļģāļ‡āļēāļ™āļ‚āļ­āļ‡ mrtg
mkdir -p /home/kloxo/httpd/default/mrtg
cd /etc/mrtg/


- āđāļ้āđ„āļ‚ Config āļ‚āļ­āļ‡ mrtg
mv mrtg.cfg mrtg.cfg.bak
nano mrtg.cfg


- āļ„āļģāđ‚āļ„้āļ”āđ„āļŸāļĨ์āļāļēāļĢāļ•ั้āļ‡āļ„่āļēāđ„āļ›āđƒāļŠ่āđƒāļ™ text editor
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt,/usr/share/snmp/mibs/TCP-MIB.txt,/usr/share/snmp/mibs/UDP-MIB.txt
WorkDir: /home/kloxo/httpd/default/mrtg
Options[_]: growright
EnableIPv6: no
Target[server.traffic]: 2:snmp@127.0.0.1:::::2
SetEnv[server.traffic]: MRTG_INT_IP="eth0" MRTG_INT_DESCR="eth0"
MaxBytes[server.traffic]: 125000000
Title[server.traffic]: Traffic Load
PageTop[server.traffic]: <h1>Traffic Load</h1>
Options[server.traffic]: growright, bits

#
# Memory Monitoring (Free with Buffer,/Cache/Total)
#
Target[server.memory]: memTotalSwap.0&memAvailReal.0:snmp@127.0.0.1 + PseudoZero&memBuffer.0:snmp@127.0.0.1 - memAvailSwap.0&PseudoZero:snmp@127.0.0.1
Title[server.memory]: Free Memory
PageTop[server.memory]: <H1>Free Memory</H1>
MaxBytes[server.memory]: 1044480000
ShortLegend[server.memory]: KBytes
YLegend[server.memory]: KBytes
LegendI[server.memory]: Swap inused
LegendO[server.memory]: Free Memory
Legend1[server.memory]: Swap inused
Legend2[server.memory]: Free memory inc Buffer
Options[server.memory]: growright,gauge,nopercent
#kMG[server.memory]: k,M,G

#
# CPU Monitoring
# (Scaled so that the sum of all three values doesn't exceed 100)
#
 
Target[server.cpu]: ssCpuRawUser.0&ssCpuUser.0:snmp@127.0.0.1 + ssCpuRawSystem.0&ssCpuSystem.0:snmp@127.0.0.1
Title[server.cpu]: Server CPU Load
PageTop[server.cpu]: <H1>CPU Utilization</H1>
MaxBytes[server.cpu]: 100
ShortLegend[server.cpu]: %
YLegend[server.cpu]: % CPU#Legend1[server.cpu]: Current CPU Idle
Legend1[server.cpu]: Accurate CPU Load
Legend2[server.cpu]: Current CPU Load
#LegendI[server.cpu]: Percentage CPU Idle
LegendI[server.cpu]: Accurate CPU Load
LegendO[server.cpu]: Current CPU Load
Options[server.cpu]: growright,nopercent,gaugeUnscaled[server.cpu]: ymwd
 #
# Load Average 1 & 15 min
# (Scaled so that the sum of all three values doesn't exceed 100)
#
Target[server.load]: laLoadInt.3&laLoadInt.1:snmp@127.0.0.1
Title[server.load]: Load Average at 15 and 1 Min
PageTop[server.load]: <H1>Load Average</H1>
MaxBytes[server.load]: 10000
ShortLegend[server.load]: #
YLegend[server.load]: #Load
Legend1[server.load]: Current CPU load (15 Mins)
Legend2[server.load]: Current CPU load (1 Mins)
LegendI[server.load]: Load 15 Mins
LegendO[server.load]: Load 1 Mins
Options[server.load]: growright,nopercent,gauge

#
# New TCP Connection Monitoring (per minute)
#
 
Target[server.newconns]: tcpPassiveOpens.0&tcpActiveOpens.0:snmp@127.0.0.1
Title[server.newconns]: Newly Created TCP Connections
PageTop[server.newconns]: <H1>New TCP Connections</H1>
MaxBytes[server.newconns]: 65536
ShortLegend[server.newconns]: c/sYLegend[server.newconns]: Conns / Min
LegendI[server.newconns]: In
LegendO[server.newconns]: Out
Legend1[server.newconns]: New inbound connectionsLegend2[server.newconns]: New outbound connectionsOptions[server.newconns]: growright,nopercent,perminute#Unscaled[server.newconns]: ymwd
#kMG[server.newconns]: k,M,G,T,P,X  
 #
# Established TCP Connections
#
 Target[server.estabcons]: tcpCurrEstab.0&tcpCurrEstab.0:snmp@127.0.0.1
Title[server.estabcons]: Currently Established TCP Connections
PageTop[server.estabcons]: <H1>Established TCP Connections</H1>
MaxBytes[server.estabcons]: 65536
ShortLegend[server.estabcons]: #
YLegend[server.estabcons]: Connections
LegendI[server.estabcons]: In/Out
LegendO[server.estabcons]: Legend1[server.estabcons]: Established connectionsLegend2[server.estabcons]: Options[server.estabcons]: growright,nopercent,gauge


- āļŠุāļ”āļ—้āļēāļĒ
indexmaker --columns=2 --output=/home/kloxo/httpd/default/mrtg/index.html /etc/mrtg/mrtg.cfg


āļāļēāļĢāđ€āļĢีāļĒāļāđƒāļŠ้āļ‡āļēāļ™ āđ€āļĢีāļĒāļāļœ่āļēāļ™ ip server/vps āļ‚āļ­āļ‡āļ„ุāļ“ http://xxx.xxx.xxx.xxx/mrtg

Posted Image


āļŦāļ§ัāļ‡āļ§่āļēāļ„āļ‡āđ€āļ›็āļ™āļ›āļĢāļ°āđ‚āļĒāļŠāļ™์āļ„āļĢัāļš

āļ›ัāļāļŦāļēāļāļĢāļēāļŸ apache āđ„āļĄ่āđāļŠāļ”āļ‡āļĢูāļ›

āļ•āļ­āļ™āļ™ี้āļ•ิāļ”āļ›ัāļāļŦāļēāļāļĢāļēāļŸ apache āđ„āļĄ่āđāļŠāļ”āļ‡āļĢูāļ›āđ€āļĨāļĒāļ­่āļ°āļ„่āļ°

āļ„่āļē /etc/httpd/conf/httpd.conf āļ็āđ„āļ›āļ—āļģāļĄāļēāđāļĨ้āļ§

āļ­้āļēāļ‡āļ–ึāļ‡
LoadModule status_module modules/mod_status.so


āļ­้āļēāļ‡āļ–ึāļ‡
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Change the ".example.com" to match your domain to enable.
#
<Location /server-status>
    SetHandler server-status
#    Order deny,allow
#    Deny from all
    Allow from all
</Location>


āļ­้āļēāļ‡āļ–ึāļ‡
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
ExtendedStatus On

Magic Quotes GPC āđƒāļ™ kloxo āļ„ืāļ­

āļ„ุāļ“āđ€āļ„āļĒāļŠāļ‡āļŠัāļĒāļŦāļĢืāļ­āđ„āļĄ่āļ§่āļē  Magic Quotes GPC  āļ„ืāļ­āļ­āļ°āđ„āļĢ? āđāļ้āđ„āļ‚āļ•āļĢāļ‡āđ„āļŦāļ™? āļˆāļģāđ€āļ›็āļ™āļŦāļĢืāļ­āđ„āļĄ่?
Magic Quotes GPC āļĄีāđ„āļ§้āđ€āļœื่āļ­āļŠ่āļ§āļĒāđƒāļŦ้āđ€āļĢāļēāļŠāļēāļĄāļēāļĢāļ–āļ™āļģāļ‚้āļ­āļĄูāļĨ āļŦāļĨัāļ‡āļˆāļēāļāļ—ี่āđ€āļĢāļē submit form āđ„āļ› query āđƒāļŠ่ database āđ„āļ”้āđ‚āļ”āļĒāđ„āļĄ่ error

āļ‹ึ่āļ‡āļāļēāļĢāļĢัāļšāļ‚้āļ­āļĄูāļĨāļˆāļēāļ form āļ•่āļēāļ‡āđ†  āļĄีāđ‚āļ­āļāļēāļŠāļ—ี่ user āļˆāļ°āļāļĢāļ­āļ Single quote (') āļŦāļĢืāļ­ Double quote (") āđ€āļ‚้āļēāļĄāļēāđƒāļ™āļŠ่āļ­āļ‡ input box āļ‚āļ­āļ‡āđ€āļĢāļēāđ„āļ”้
āļ”ัāļ‡āļ™ั้āļ™āļ–้āļēāđ€āļĢāļēāļ™āļģāļ‚้āļ­āļĄูāļĨāđ„āļ›āđƒāļŠ้āđ‚āļ”āļĒāļ•āļĢāļ‡āļ—āļģāđƒāļŦ้āļĄีāđ‚āļ­āļāļēāļŠ  query error āđ„āļ”้
āļ–้āļēāļŦāļēā  Magic Quotes GPC = On
āļˆāļ°āļĄีāļāļēāļĢāđ€āļ•ิāļĄ \ āđ€āļ‚้āļēāđ„āļ›āļ—ี่āļŦāļ™้āļē Single quote āļŦāļĢืāļ­ Double quote āđƒāļŦ้āļ­ัāļ•āđ‚āļ™āļĄัāļ•  āļ—āļģāđƒāļŦ้āļŠāļēāļĄāļēāļĢāļ–āļ™āļģāļ„่āļēāđ„āļ› query āđ„āļ”้āļ—ัāļ™āļ—ี
āļ”ัāļ‡āļ™ั้āļ™āļāļēāļĢ query āđ€āļĢāļēāļˆึāļ‡āļ•้āļ­āļ‡āđ€āļŠ็āļ„āļ”ัāļ‡āļ™ี้
01if (get_magic_quotes_gpc()) {
02    $name = stripslashes($_POST['name']);
03}
04else {
05    $name= $_POST['name'];
06}
07 
08$name= mysql_real_escape_string($name);
09 
10$sql = "INSERT INTO table_name (name) VALUES ('$name')";
āđāļ•่āļ–้āļēāļŦāļēāļāļ™āļģāđ„āļ›āđāļŠāļ”āļ‡āļœāļĨāđƒāļ™āļŠ่āļ§āļ™āļ—ี่āļŠāļ™āļัāļš Single quote āļŦāļĢืāļ­ Double quote āļ‚āļ­āļ‡ syntax āļšāļ™ html āļĨ่āļ°?
1// āļŠāļĄāļĄุāļ•ิāđƒāļŦ้  user āļāļĢāļ­āļāļ„่āļēāđ€āļ‚้āļēāļĄāļēāđ€āļ›็āļ™  "your name"
2// āļ”ัāļ‡āļ™ั้āļ™āļ–้āļēāļŦāļēāļāđ€āļĢāļēāļˆāļ°āđāļŠāļ”āļ‡āļ„่āļē your name āļ—ี่ value āļˆāļ°āđ€āļ›็āļ™āļ”ัāļ‡āļ™ี้
3<input name="name">

āđāļ™่āļ™āļ­āļ™āļ§่āļēāļāļēāļĢāđāļŠāļ”āļ‡āļœāļĨāđ€āļŠ่āļ™āļ™ี้āļœิāļ” syntax āļ‚āļ­āļ‡ html āļ”ัāļ‡āļ™ั้āļ™āđ€āļĢāļēāļˆึāļ‡āļ­āļēāļˆāđƒāļŠ้  function  htmlspecialchars  āļ‚āļ­āļ‡ php āļĄāļēāļŠ่āļ§āļĒāļ่āļ­āļ™āļ—ี่āļˆāļ°āđāļŠāļ”āļ‡āļœāļĨāļšāļ™āļ„่āļēāļ‚āļ­āļ‡ value āļˆāļ°āļ—āļģāđƒāļŦ้āļŠāļēāļĄāļēāļĢāļ–āđāļŠāļ”āļ‡āļœāļĨāļ­āļ­āļāļĄāļēāđ„āļ”้āļ–ูāļāļ•้āļ­āļ‡

āļāļēāļĢāđāļ้āđ„āļ‚ Magic Quotes GPC

āļŠāļēāļĄāļēāļĢāļ–āđāļ้āđ„āļ‚ Magic Quotes GPC āđ„āļ”้āļ—ี่ file php.ini
1# php.ini seting to trun On/Off
2magic_quotes_gpc = On

āļŦāļĢืāļ­āļŠāļēāļĄāļēāļĢāļ–āđāļ้āļ—ี่ file .htaccess āđ„āļ”้āļ”ัāļ‡āļ™ี้
1# .htaccess seting to trun On/Off
2php_flag magic_quotes_gpc off

āļ”ัāļ‡āļ™ั้āļ™āļāļēāļĢ set magic_quotes_gpc āļˆāļ°āļˆāļģāđ€āļ›็āļ™āļŦāļĢืāļ­āđ„āļĄ่āļ‚ึ้āļ™āļ­āļĒู่āļัāļš code āļ‚āļ­āļ‡āđ€āļĢāļēāđ€āļ­āļ‡āļ§่āļēāđ„āļ”้āļ„āļĢāļ­āļš mysql_real_escape_string āđ„āļ§้āļŦāļĢืāļ­āđ„āļĄ่āđ€āļžื่āļ­āļĨāļ­āļ‡āļĢัāļšāļ‚้āļ­āļĄูāļĨāļˆāļēāļ user āļ—ี่āļāļĢāļ­āļ Single quote āļŦāļĢืāļ­ Double quote āđ€āļ‚้āļēāļĄāļē

 
Design by Laikeng | Bloggerized by Storesu - sutoday | Court