1 / 3
Caption Text
2 / 3
Caption Two
3 / 3
Caption Three margin testing

Monday, January 18, 2010

如何迁移ZenCart到另一台服务器

如何迁移ZenCart到另一台服务器 : 新手上路

1. 在新主机上,创建新的MySQL数据库。记下用户名、密码、数据库名以及主机名(通常是localhost)。

2. 在新主机上,全新安装相同版本的Zen Cart,这保证configure.php文件中的设置正确。
在安装的时候,要安装演示数据,这样可以测试安装是否正确。
a. 安装
b. 测试
c. 备份新主机的 /includes/configure.php 和 /admin/includes/configure.php 文件到本地。


3. 完全备份已有数据库和商店程序。
a. 可以使用 "数据库备份模块" 或者 phpMyAdmin 来备份数据库 ... 要选择 "添加 DROP TABLE" 选项;同时,在数据选项下,选择 "完整插入" 以及 "扩展插入",保存SQL文件到本地计算机。
b. 通过FTP下载旧的网站上的所有文件 (如果可以的话,在服务器上压缩后再下载)

4. 上传旧的文件到新的服务器上,覆盖新服务器上的文件。两个文件例外:
不要覆盖新服务器上的 /includes/configure.php 和 /admin/includes/configure.php 文件。

5. 进入新服务器上的 phpMyAdmin 。
a. 选择新数据库 (安装了新的Zen Cart的数据库)
b. 删除所有数据表。
c. 导入上面 3a 中保存的SQL文件。

6. 下载缓存设置同步工具(见下载区),重置缓存设置。只要上传该文件到Zen Cart根目录并运行(fix_cache_key.php)即可。运行后一定要删除该文件。

7. 完成。

*********************************
迁移zencart网站的简易方法

1. 停止运行旧的网站
2. 复制旧网站所有zencart文件、目录到新的主机
3. 导出旧网站的数据库
4. 在新的主机上建立zencart数据库,导入旧的数据
5. 设置好数据库用户和权限
6. 修改新网站的两个文件
\includes\configure.php 和 \admin\includes\configure.php
主要是域名、物理路径、数据库名称、数据库用户名、密码这些内容
7. 登录新网站的后台,修改
商店设置-日志选项-日志保存到的路径
商店设置-Sessions-Sessions目录的路径
8. 完成

如何使用代理服务器上网

如何使用代理服务器-月光博客

  虽然我们的网络在公开场合下自称是"开放"的互联网,但实际情况却不是这样的,例如前几天,已经有两个同事咨询过我,如何使用代理服务访问Facebook,我发现其过程还是挺多的,与其我一步步讲给他们听,不如写一个教程,这样他们也更能理解和操作。下面我就介绍一下我是怎么使用代理服务器的,算是一篇科普教程吧。

  前面一段是科普教程,如果你只关心如何使用代理,可以直接跳到"如何使用SOCKS代理服务器"这一段。

  什么是代理服务器

  代理服务器(Proxy Server)是网上提供转接功能的服务器,在一般情况下,我们使用网络浏览器直接去连接其他Internet站点取得网络信息时,是直接联系到目的站点服务器,然后由目的站点服务器把信息传送回来。代理服务器是介于客户端和Web服务器之间的另一台服务器,有了它之后,浏览器不是直接到Web服务器去取回网页而是向代理服务器发出请求,信号会先送到代理服务器,由代理服务器来取回浏览器所需要的信息并传送给你的浏览器。

  比如你想访问的目的网站是A,由于某种原因你不能访问到网站A或者你不想直接访问网站A(这样通过代理服务器网站A,对网站A而已可以隐藏你自己的身份,也就是不知道是谁访问的网站,而认为是代理服务器访问的),此时你就可以使用代理服务器,在实际访问网站的时候,你在浏览器的地址栏内和你以前一样输入你要访问的网站,浏览器会自动先访问代理服务器,然后代理服务器会自动给你转接到你的目标网站。

  代理服务器的作用

  提高访问速度:通常代理服务器都设置一个较大的缓冲区,当有外界的信息通过时,同时也将其保存到缓冲区中,当其他用户再访问相同的信息时,则直接由缓冲区中取出信息,传给用户,以提高访问速度。

  隐藏真实身份:上网者也可以通过代理服务器隐藏自己的真实地址信息,还可隐藏自己的IP,防止被黑客攻击。

  突破限制:有时候网络供应商会对上网用户的端口,目的网站,协议,游戏,即时通讯软件等的限制,使用代理服务器都可以突破这些限制。

  代理服务器主要类型

  HTTP代理:最简单的一种代理形式,能够代理客户机的HTTP访问,上网浏览网页使用的都是HTTP协议,通常的HTTP代理端口为80、3128或8080端口。

  SOCKS代理:SOCKS代理与HTTP等其他类型的代理不同,它只是简单地传递数据包,而并不关心是何种应用协议,既可以是HTTP协议,也可以是FTP协议,或者其他任何协议,所以SOCKS代理服务器比其他类型的代理服务器速度要快得多。SOCKS代理又分为SOCKS4和 SOCKS5,二者不同的是SOCKS4代理只支持TCP协议(即传输控制协议),而SOCKS5代理则既支持TCP协议又支持UDP协议(即用户数据包协议),还支持各种身份验证机制、服务器端远程域名解析(解决DNS污染就靠这个了)等。SOCK4能做到的SOCKS5都可得到,但SOCKS5能够做到的SOCKS则不一定能做到。目前SOCKS5是最常用的一种SOCKS代理。

  如何使用HTTP代理服务器

  HTTP代理服务器的设置方法,对于IE和FireFox设置略有不同。设置前需要先找一些可用的免费代理服务器地址。

  IE的设置是这样的,打开IE浏览器,选择菜单栏的"工具/Internet选项..."。

  这时候分两种情况,对于ADSL拨号用户来说,选择一个网络连接后,点"设置",如下图所示,选中代理服务器,填入地址和端口号。

IE代理服务器设置

  对于局域网用户来说,需要点"局域网设置",如下图所示,选中代理服务器,填入地址和端口号。

IE代理服务器设置

  FireFox的设置和IE类似,打开FireFox浏览器,选择菜单栏的"工具/选项..."。

  这时选择"高级/网络",点设置,就出现下面的界面,就可以进行代理服务器的设置了,选中"手动配置代理",然后填写代理服务器的地址和端口。

FireFox代理服务器设置 

  如何使用SOCKS代理服务器

  这里就到重点内容了,SOCKS代理是目前功能最为全面,使用最为稳定的代理服务器,我目前上网就只用SSH搭建SOCKS代理服务器上网,访问网络没有任何限制。下面我就着重讲一下如何使用SOCKS代理服务器。

  用SSH搭建SOCKS代理上网,建议使用Firefox浏览器,因为Firefox支持SOCKS代理远程域名解析,而IE只能通过类似SocksCap这样的第三方软件实现,不是很方便。

  配置Firefox浏览器

  在Firefox设置SOCKS远程域名解析,主要是为了防止DNS污染,具体设置方法是,在Firefox地址栏中,输入 about:config ,按确认,修改里面的一项数值,改成 network.proxy.socks_remote_dns=true 就可以了。

Firefox远程域名解析设置

  然后,打开FireFox浏览器,选择菜单栏的"工具/选项..."。选择"高级/网络",点设置,就出现下面的界面,就可以进行代理服务器的设置了,选中"手动配置代理",然后在SOCKS主机上,填写代理服务器的地址127.0.0.1,端口1080,SOCKS类型选择"SOCKS V5",这时Firefox就配置结束。

Firefox的SOCKS5代理设置

  设置SSH

  配置好了Firefox,就该配置SSH了,安全外壳协议(Secure Shell Protocol / SSH)是一种在不安全网络上提供安全远程登录及其它安全网络服务的协议。常用的SSH工具有开源软件PuTTY,支持SSH远程登录的主机可以实现socks5代理服务器的功能,不过在PuTTY中没有配置文件,需要手动设置才能实现,且无法保存,而PuTTY完整版自带的pLink可以实现命令行方式调用PuTTY实现SSH的加密通道。

  具体的方法是,去PuTTY官方网站下载pLink这个文件,pLink的调用参数是:plink -C -v -N -pw 密码 -D 本地端口 远程用户@IP或域名:远程希望打开的端口。

  新建一个文件,写入以下内容,另存为pLink.bat批处理文件,并放在Putty的安装目录内。

  plink -N Username@sshServer -pw Password -D 127.0.0.1:1080

  请将Username sshServer Password三处改为用户自己登陆SSH服务器的用户名、服务器地址和密码。这个SSH帐号可以通过多种方法获得,例如用户购买了某些国外主机空间或VPS就会有SSH帐号,或者在淘宝网也有SSH帐号出售,我自用的SSH帐号是用每年100美元购买虚拟主机时赠送的,通常SSH帐号的价格大约是每年几十元人民币左右,也有少量国外网站提供免费的SSH帐号。

  执行这个批处理文件,保持其窗口开启,一旦关闭窗口代理便失效。然后打开已经配置好127.0.0.1:1080的Socks5代理的Firefox浏览器,就可以使用SOCKS代理服务器上网了。

  其他设置技巧

  为了方便代理服务器的快速切换,我建议安装一个名为QuickProxy的FireFox代理服务器扩展,可以实现一键切换代理功能,QuickProxy安装后在状态栏有一个按钮,点击后可以启用、关闭Firefox浏览器的默认代理设置,可以快速在代理和非代理之间切换,很方便。界面如下图所示。

QuickProxy代理服务器扩展

  设置完成了之后,你就可以自由自在地在开放的互联网上傲游了。根据我的使用经验,基于SSH的SOCKS代理稳定、快速、功能全面,是值得推荐的代理方法,使用过程中流量需要自己把控,我个人觉得其浏览体验要远远高于其他代理软件。

  随着这次Google退出中国市场,本文可能会成为未来网民常用的上网技巧之一。

Friday, January 15, 2010

Managing Your GoDaddy Hosting Account Domains

Managing Your Hosting Account Domains - GoDaddy Help Center, Search the GoDaddy Knowledge Base

To Change Your Primary Hosted Domain

  1. Log in to your Account Manager.
  2. In the My Products section, select Hosting.
  3. Next to the hosting account you want to modify, click Manage Account.
  4. In the Settings section of the Hosting Control Center, click the Domain Management icon.
  5. Select your primary hosted domain, and then click Change Primary.
  6. Enter the new primary domain for your account, and then click OK.

Thursday, January 14, 2010

Using 301 Page Redirects

Using 301 Page Redirects - GoDaddy Help Center, Search the GoDaddy Knowledge Base

If you renamed or moved pages of your website, a 301 redirect lets you automatically redirect visitors and search engine spiders to your new pages while maintaining your search engine ranking.

For example, you can redirect traffic from oldpage.php (.asp or .jsp) to "http://www.newdomain.com/newpage.html" and retain your search engine ranking and back links.

Use the code below to redirect traffic to your pages using a 301 Redirect.

NOTE: In the code examples below, replace "oldpagename" with the name of your old Web page from which you want to redirect traffic and replace "newpage.html" with the name of the new Web page to which you want to redirect traffic.

PHP

Save this as oldpagename.php

<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.newdomain.com/newpage.html");
exit();
?>

ASP

Save this as oldpagename.asp

<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.new-url.com"
%>

ASP.NET

Save this as oldpagename.aspx

<script language="c#" runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.new-url.com");
}
</script>

ColdFusion

Save this as oldpagename.cfm

<.cfheader statuscode="301" statustext="Moved permanently">
<.cfheader name="Location" value="http://www.newdomain.com/newpage.html">

.htaccess

When using a Linux server with the Apache Mod-Rewrite module enabled, you can create a .htaccess file to ensure that all requests to coolexample.com will redirect to www.coolexample.com, where "coolexample.com" is your domain. Save the .htaccess file in your old website's root directory, which is the same directory as your index file. You can create a .htaccess file with the following code:

RewriteEngine on
rewritecond %{http_host} ^coolexample.com [nc]
rewriterule ^(.*)$ http://www.coolexample.com/$1 [r=301,nc]

Does an SSL Certificate Secure Both www.yourpersonaldomainname.com and yourpersonaldomainname.com

Does an SSL Certificate Secure Both www.yourpersonaldomainname.com and yourpersonaldomainname.com - GoDaddy Help Center, Search the GoDaddy Knowledge Base

Yes, an SSL certificate secures the common name (domain name) listed in the certificate, with or without the "WWW" prefix.

NOTE: In the case of UCC certificates or "Multiple Domain Certificates", only the primary domain name is secured both with and without www.

The Subject Alternative Names (SANs) do not receive the same treatment.

NOTE: Until renewed, certificates issued prior to December 2006 only secure the exact, fully-qualified domain entered as the common name in the Certificate Signing Request (CSR). Thus, a certificate that secures "www.yourpersonaldomainname" does not secure the "yourpersonaldomainname.com."

Wednesday, January 13, 2010

Third Party SSL Certificate Authorities

Open Directory - Computers: Security: Public Key Infrastructure: PKIX: Tools and Services: Third Party Certificate Authorities

  • CAcert - A community driven certificate authority that issues certificates to the public at large for free.
  • Comodo - Provider of 128-bit certificates and various other security related products.
  • Digicert - Certificate authority offering a range of services including PKI and a seal program.
  • Digi-Sign - Bulk vendor of 128-bit certificates offering PKI and verification services.
  • Digital Signature Trust Co. - DST was the first CA to be licensed in the U.S. DST provides PKI-based digital certificate services and electronic commerce solutions for commercial and government clients. DST creates the trust that enables organizations to fully benefit from electronic commerce.
  • Ebizid - Certificate authority offering 128 and 256 bit certificates. Also a provider of various security products including validation and vulnerability testing.
  • Enterprise SSL - Provider of wildcard and single domain 128-bit Comodo SSL warranted certificates for web servers.
  • Entrust.net - Subsidiary of Entrust, Inc. Sells digital certificates that enable Web servers to establish Secure Sockets Layer (SSL) sessions.
  • GeoTrust - Vendor of SSL certificates that features an identity verification program.
  • GlobalSign - The Leading European Trusted Network of Certification Authorities.
  • LiteSSL - Provides secure 128/256 bit ssl digital certificates.
  • Network Solutions: SSL Certificates - Offer digital certificate services and secure seal schemes for websites.
  • Pink Roccade PKI - Netherlands based reseller of Verisign certificates.
  • ProntoSSL - Reseller of 128Bit QuickSSL Premium, RapidSSL and Geotrust Verified Domain Certificates.
  • QualitySSL - A Denmark based provider of 128 bit certificates and identity assurance products.
  • Rapid SSL - Provider of 256 bit single root install SSL Certificates.
  • Secure SSL - Provider of Comodo 128 bit SSL certificates and web identity services.
  • SimpleAuthority certification authority - A free certification authority that can be used to generate keys and certificates for secure email, client and server SSL authentication, VPN access, etc.
  • SSL Certificate Management Site - Site allows users to create, download and store free SSL self-signed certificates.
  • SSL.com - Provider of wildcard, single and multi-year warranted 128-bit SSL certificates for web servers.
  • Thawte Digital Certificates - Global certification authority offering a range of SSL and code signing digital certificate products.
  • Trustwave - SSL certificates authority featuring 256 bit AES encryption.
  • The USERTRUST Network - A Public Key Infrastructure providing SSL Certificates and Digital Signatures.
  • VeriSign - SSL certificates, communications and content delivery, plus security consulting.
  • How can I force my site to add "www." before the URL if visitors don't enter it?

    Zen Cart(tm) Tutorials and FAQs - How can I force my site to add "www." before...

    Scenario:
    Customer types in "example.com" when trying to enter your website.
    In most cases this will let them get to your site fine.

    BUT ... if you've configured your site to use "www.example.com" in all the URLs it generates, then the customer's next click will attempt to change the URL and (on some servers) may log them out if they were attempting login, etc. This is because of the way PHP session security works with setting a session cookie tied to a domain name, etc. The technical details can be read online elsewhere.

    Also, in Internet Explorer, if you are using some fancy flyout CSS effects the addon script that drives this may not be "found" because of the change in domain name ... meaning that the menu won't work until the customer first does another click on your site.

    There are a couple things to keep in mind to handle this:
    1. Always be consistent in your use of your domain name. If you're going to use "www.example.com", be sure to use it exactly that way everywhere. Don't drop the "www." unless you do it consistently in all places.
    2. In your SSL certificate, when you register one, you must specify a domain name. Again, be consistent. If you're using "www." in your URL, use it in your SSL certificate too.
    3. Ensure that your hosting company has configured a "www." address as an alias to your domain name ... so that "both" will work -- otherwise visitors might get a "domain not found" error instead of your site.
    4. If you are running on an Apache webserver, you can set up a .htaccess rule to automatically add the "www." into the URL if the customer forgets to include it. The following is what you'd put in your .htaccess to accomplish this:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^example.com$
    RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

    --------------------
    How to Remove the WWW Prefix from Your Domain Names Using Apache's mod_rewrite

    To redirect any URL starting with (say) www.example.com to example.com, add the following code to your .htaccess file.

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
    RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]

    The above rules checks if the hostname in a URL contains www.example.com. If it does, the visitor is sent to example.com instead.

    To use the rule, change all instances of "example.com" to your actual domain name. For the line beginning with RewriteCond, add a backslash ("\") before each of the full stops (or "periods") in your domain name.


    Featured Post

    Windows和Ubuntu双系统完全独立的安装方法

    http://www.ubuntuhome.com/windows-and-ubuntu-install.html  | Ubuntu Home Posted by Snow on 2012/06/25 安装Windows和Ubuntu双系统时,很多人喜欢先安装windows,然...