Site Admin (Hosted Environment)
From Kb_JMY(晉明夷)
Contents
|
All administrative issues encountered in a web-hosted environment are listed here.
- This wiki of dreamhost.com maybe useful: wiki.dreamhost.com
Admin Practice
System Backup
- System and data backup strategy
- once a day for most recent 7days
- once a week for most recent 4weeks
- once a month for most recent 12months
- once a year for most recent 7years
- ---------------------------------------------
- total: 30 records at the end of the 8th year
- if 100MB is required for each record on the average, 3GB is required for 8years' consumption.
Changing Domain Name for a Hosting Site
- e.g. from http://tefagroup.com to http://newsite.org
- Ref: support ticket ID: 136578 (2006-12-11 10:59am)
- The account name can be changed, so that newsite.org will be pointed to:
- http://67.15.250.5/~newsite
- instead of http://67.15.250.5/~tefagrou
- But... all things SHALL be cleared, so you must backup the site's existing program directories and database before the move.
- The old domain name http://tefagroup.com can be parked to the newsite through cpanel. This makes two domain names pointed to one hosted acount. And hence...
Transfering Domain Name from one Registrar to another
- Ref: SiteGnd support ticket ID#:163021, issue Date: 2007-02-20 07:17am
- You will need to contact your current registrar and ask them to
- unlock your domain name and
- provide you with its EPP key.
- --> The EPP key is the authorization code for your domain name, which is required for its transfer. Each domain name has its own unique EPP key. Your current registrar should provide you with this key for your domain in order to be able to transfer it.
- SiteGnd: The price of the transfer procedure is $14.95 (HK$116.6) as of k07_0220, pls. see:
How to make new DNS effective?
- Ref: (1) SiteGnd Support TicketID: 163941, Issue Date: 2007-02-21 09:26pm
- (2) k07_0221(wed) email "Changing DNS of mosct.com" from "MikeTing@onehosting.com.hk"
- Problems:
|
- Solutions:
|
Need to refresh the cache of:
Windows IP Configuration Successfully flushed the DNS Resolver Cache.
|
DNS Related Network Commands(Windows)
- Ref: k07_0221(wed) email "Changing DNS of mosct.com" from "MikeTing@onehosting.com.hk"
- In windows desktop
- -> click "start" -> run -> cmd -> dos command prompt window -> enter the commands
- some of the commands
- ipconfig /all
- ipconfig /flushdns
- ping mysite.com
- tracert mysite.com (trace the root of mysite.com)
Two sites, 2 distinct domain names, but one hosting account
For making two sites with 2 distinct domain names using one hosting account,p ls. refer to this notes:
multiple domains in one root
- Ref:
- assume:
- at least one more Domain parking is allowed by your web-hosting plan (e.g. Plan B of myAsiaCloud.com)
- domain-one.com -> public_html/one
- domain-two.com -> public_html/two
| example .htaccess file in your "public_html" |
|---|
#two domains served from one root..
RewriteCond %{HTTP_HOST} domain-one.com
RewriteCond %{REQUEST_URI} !^/one
RewriteRule ^(.*)$ one/$1 [L]
RewriteCond %{HTTP_HOST} domain-two.com
RewriteCond %{REQUEST_URI} !^two
RewriteRule ^(.*)$ two/$1 [L]
|
How to detect the domain name redirected to my site
- Solutions: <-- Tested Good as of 2006.12.13 ! <--- but failed later as the web-hosting company banded that!
- You could write your own index.php page hosted at the IP Address, that determines the Referer and then use an "if, then, else" statement to redirect to the appropriate site:
<?php
// get referrer from _SERVER array
$ref = $_SERVER["HTTP_HOST"];
//echo $ref; //uncomment this command if testing
if ( ($ref == 'www.mysite2.com') || ($ref == 'mysite2.com') )
{
header("Location: http://www.mysite.com/site2");
exit(0);
}
//301 Permanent Redirect
header( "HTTP/1.1 301 Moved Permanently" );
header( "Status: 301 Moved Permanently" );
header( "Location: http://www.mysite.com/site1/" );
exit(0); // This is Optional but suggested, to avoid any accidental output
?>
PHP
Some Useful PHP parameteres
- If you are in a Linux box running Apache the ini file will be specified in httpd.
- max_execution_time = 30; Maximum execution time of each script, in secs
- max_input_time = 60; Maximum amount of time each script may spend parsing request data
- memory_limit = 8M; Maximum amount of memory a script may consume
- file_uploads = On; Whether to allow HTTP file uploads.
- upload_tmp_dir = C:\PHP\uploadtemp; Temporary directory for HTTP uploaded files
- upload_max_filesize = 2M; Maximum allowed size for uploaded files.
Web Browser
- shift + "reload button": Bypassing web-browser cache and get the most recent version of the page by forcing a refresh in your browser (typically by holding down the shift key and clicking the reload button).
Forcing IE7 to use utf-8 encoding
- Assume
- "Joomla_1.0.12-Full_Package(Chinese-Beta1).tar.gz"
- Firefox 1.5.0.10
- IE 7
- Problems: Although Firefox can display Chinese properly, but not IE7
- -> it is found that "big5" encoding is selected in IE7
- Solution:
- -> Force all browsers (including IE7) to use utf-8 encoding.
- -> Add the line to the .htaccess file: AddDefaultCharset UTF-8
- -> the .htaccess file should be placed in "public_html"
MySQL
- Here is the solution per the Ref:
SELECT CONCAT( 'ALTER TABLE ', TABLE_NAME, ' RENAME TO en_', TABLE_NAME, ';') AS my_queries FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'your_database'
Common Limitations
Site Errors(SiteGnd)
Slow FTP Speed Problem
- Ref: SiteGnd Ticket# 137733 (2006.12.14,Thu); ID: 138929 (2006.12.17,Sun)
- Final solution: Restart SiteGround's ftp server <-- not fixed the problem yet!
Slow Web-Speed
- Ref: SiteGnd Ticket#ID: 141216 (2006.12.24,Sun, GMT+8)
- Problems: All my sites mosct.com, 6millionDollarPage.com, are extremely slow, they cannot display each time unless I repeat reloading the page for several times!!! While.... I can load the local hong kong site appledaily.com and the USA site apple.com easily.
- Notice that your service commitment and agreement for server uptime is 99.9%!!
- Just a simple calculation, SiteGround's server down-time is 365days x24hrs x0.1% = 8.76 hours /year !
- Response: The reason we have started this backup procedure is that some of our client has violated the terms of use and abused our servers, so we have made a deep investigation and we have suspended them.
- However we had to make a full back up of the server just in case to prevent any data loss if this happens again in the near hours.
- Please note that the server is not down, but this is what we are trying to prevent with this backup.
Occasionally slow and download "index.php" problem
- Ref: (1) SiteGnd Support TicketID: 171336, 2007-03-10 03:59am (Domain: mosct.com)
- (2) SiteGnd Support TicketID: 172763, 2007-03-13 09:34pm
- Problems:
- I find an occasional problem of slow response of my installed Joomla site, and sometimes the accessed page take more than 10 second to respond, and... not normally displayed --> instead, it triggers Firefox to download the corresponding "index.php" file! The screen is captured for your reference:
http://mosct.com/_Errors_&Bugs/k07_0310_dnload_index.php_problem.gif
- Pls. check if this is a php accelerator problems or something else that casuse this problem!
- This is not unique to mosct.com, this problem is common to other sites, e.g. MyanmarArtclub.com!
- Response:
- As far as I can see your front page is quite heavy and requires a quite a lot data to be transferred before it is fully loaded you might experience such issues.
- possible reason: exceeding the limitations as specified at: http://www.siteground139.com/~support/phpinfo.php
- we do understand that this is a big inconvenience for you and I have doubled the max_execution_time for your account. This basically should resolve such issues in most cases.
- --> However, it is found that the max_execution_time are found to be "30" for both "local value" and "master value"
- --> so it is believed that small max_execution_time is NOT the cause for the index.php--download problem, but some other reasons that SiteGnd doesn't want to disclose! --- most likely it is because SiteGnd has set some BW limiting parameters that cause the problem
- Checked next day: k07_0311(Sun)
- slow problem disappeared!
- index.php--download problem disappeared!
- --> for both mosct.com and MyanmarArtClub.com !
- Checked k07_0314 (Wed)
- Ref: SiteGnd Support TicketID: 172763, 2007-03-13 09:34pm
- slow problem and index.php file download happens again
- SiteGnd Response that they cannot set the "max_execution_time" to "60" globally as this is a shared server, so I need to add a local "php.ini" (inlcudes the single line: "max_execution_time = 60 ") in each directory that requires longer execution time!
- For checking if the local max_execution_time has been updated and in effect
- -> create a "info.php" file with the line: <? phpinfo(); ?>
- -> access info.php in your browser to check the updated value of max_execution_time
Slow Image Loading Speed
- Ref: SiteGnd TicketID: 144111,
- Issue Date: 2007-01-03 07:37pm
- Domain: 6milliondollarpage.org
- Our server is located in Houston data center
- and it is connected with 3 broadband connection to the internet
- each with more than 1 Megabit per second.
- The office where I am located at has a connection to the internet about 300kbps and the pictures load very fast.
Internal Server Error 500
- My site occasionally shows “Internal Server Error 500” message
e.g. at site IP -> http://67.15.250.x/error_page500.html
- most likely it is due to access to restricted files or directories
- --> Solution: correctly set the permissions of the files or directories.
Internal Server Error
My site shows “Internal Server Error” or a blank screen and the problem does NOT disappear by reloading.
This most likely happens after a certain module/component/application installation. The module/component/application requirements may vary according to the PHP version, file permissions, file ownership, configuration requirements, .htaccess rules, server configuration, etc. ....
<--- not verified!!!
SiteGnd Specific
cpanel limitations
Why cpanel's file manager cannot extract "gallery-2.2.1-full.tar.gz" fully?
- Ref:
- SiteGnd support ticketID: 184649, 2007-04-12 02:51am, Domain: MyanmarArtClub.com
- menalto.com : Top URGENT! -- What's the right method for upgrading G2 from v2.1.2 to v2.2.1?
- Problem: Why cpanel's file manager cannot extract the file "gallery-2.2.1-full.tar.gz" fully, some (or many?) files inside it cannot be extracted?
- Solution:
- -> The exact reason the File Manager failed to extract the file is due to the fact the server load was a bit higher than usual and the extract process was taking a bit more resources to be completed. So, our monitoring system was killing the process.
- => request SiteGnd's CS to help.
Webhosting Limitations
Emailing Rate: 400 emails/hr
- Ref: Support Ticket ID: 152877, 2007-01-25 10:10pm
- Subject: Sending emails at rate 800 emails /hour?
- Ans: In order to be able to send more than 400 mails per hour, the only option we could offer you is to upgrade your account to a VPS server: http://www.siteground.com/vps.htm , I am afraid that the shared hosting server is not suitable for sending more than 400 mails per hour.
- Suppose 1200emails are required to be sent, then break it into 3 batches of 400emails
- if 30mins are required to complete sending one batch of 400emails, wait more than 30mins before sending the second batch, otherwise, some or all the second batch emails shall be bounced back.
- So best to estimate the time required to send a particular emails before making actions to send them all.
- Or without do estimation everytime, do it once to estimate the time required to send a batch of 20 short email, say 1 mins,
- --> then calculate the waiting time required, say 2mins, to consume one hour's time for sending 20 batches of 20 emails (i.e. 400emails)
- --> add some allowance, say 1mins, to the waiting time, so that the final waiting time is, say 3mins.
Multimedia file storage: 5GB
- Subject: Possible to increase multimedia file storage size from 5GB to 10GB?
- Ref: Support Ticket ID: 152893, 2007-01-25 11:01pm
- Ans: I am afraid that such increase in your Multimedia files quota is not possible. However, if you wish to host up to 10GB of files on your account, you may consider upgrading your account to VPS, where such limitations are not applied.
Service Related
Readjusting Renewal Day is not possible!
- Subject: Possible to readjust the renewal day of DXNstore.com ?
- Ref: Support Ticket ID#152873, Issue Date: 2007-01-25
- Ans: Unfortunately our Billing System does not allow such customizations and you will not be able to pay partially as intended. Please proceed with renewing it for another year.
The Free Shared-SSL Certificate
- How to setup the free Shared-SSL service for my site?
- Ref: (1) SiteGnd Support Ticket ID#153612, 2007-01-27 10:22pm
- Ans: No need to setup, just access Shared-SSL by:
|
- Further that if I want to protect the administrative backend only, say at: "public_html/mysite/adminstrator", how to do it?
- Ans: It depends on the application you are using. For the E-Commerce application you have set this via the configuration panel.
- If you are using Joomla for an example you may not be able to use the Editor from the application back-end via SSL.
- However, if you would like your CMS back-end to be available only via SSL you may create .htaccess file under the public_html/mysite/adminstrator and redirect all requests to this address to the SSL address. You may want to check the following URL for more information how to setup the above redirection:
- However, pls. let me know the limitations to the free shared-SSL when compared with the paided-SSL at US$74?
- The Shared SSL:
- The Shared SSL is available only via the server address and not via your domain name.
- There will be a pop window every time you visit your website which will inform you that this certificate is not owned by you.
- The Private SSL:
- The pop up that you have experienced with the Shared SSL will be removed.
- You will be able to use the SSL certificate via the domain name you have ordered it for.
FAQ(SiteAdmin)

