Posts Tagged time

Linux系统信息查看命令大全

系统

# uname -a               # 查看内核/操作系统/CPU信息
# head -n 1 /etc/issue   # 查看操作系统版本
# cat /proc/cpuinfo      # 查看CPU信息
# hostname               # 查看计算机名
# lspci -tv              # 列出所有PCI设备
# lsusb -tv              # 列出所有USB设备
# lsmod                  # 列出加载的内核模块
# env                    # 查看环境变量

资源

# free -m                # 查看内存使用量和交换区使用量
# df -h                  # 查看各分区使用情况
# du -sh <目录名>        # 查看指定目录的大小
# grep MemTotal /proc/meminfo   # 查看内存总量
# grep MemFree /proc/meminfo    # 查看空闲内存量
# uptime                 # 查看系统运行时间、用户数、负载
# cat /proc/loadavg      # 查看系统负载

磁盘和分区

# mount | column -t      # 查看挂接的分区状态
# fdisk -l               # 查看所有分区
# swapon -s              # 查看所有交换分区
# hdparm -i /dev/hda     # 查看磁盘参数(仅适用于IDE设备)
# dmesg | grep IDE       # 查看启动时IDE设备检测状况

网络

# ifconfig               # 查看所有网络接口的属性
# iptables -L            # 查看防火墙设置
# route -n               # 查看路由表
# netstat -lntp          # 查看所有监听端口
# netstat -antp          # 查看所有已经建立的连接
# netstat -s             # 查看网络统计信息

进程

# ps -ef                 # 查看所有进程
# top                    # 实时显示进程状态

用户

# w                      # 查看活动用户
# id <用户名>            # 查看指定用户信息
# last                   # 查看用户登录日志
# cut -d: -f1 /etc/passwd   # 查看系统所有用户
# cut -d: -f1 /etc/group    # 查看系统所有组
# crontab -l             # 查看当前用户的计划任务

服务

# chkconfig --list       # 列出所有系统服务
# chkconfig --list | grep on    # 列出所有启动的系统服务

程序

# rpm -qa                # 查看所有安装的软件包
  • Share/Bookmark

Tags: , , , , , , , , , ,

CentOS 5.x系统服务优化详解

下面的建议主要是针对 Linux 单机服务器的角色来说明的,不是针对桌面环境

服务名称 功能简介
acpid (系统)进阶电源管理的介面,这是一个新的电源管理模组, 可以监听来自核心层的电源相关事件而予以回应。 CentOS 的设定档在 /etc/acpi/events/power.conf 中,预设仅有当你按下 power 按钮时,系统会自动关机!

anacron(可关闭) (系统)与循环型的工作排程 cron 有关,可在排程过期后还可以唤醒来继续执行, 设定档在 /etc/anacrontab。

apmd(可关闭) (系统)设定档在 /etc/sysconfig/apmd ,也是电源管理模组! 可侦测电池电量,当电池电力不足时,可以自动关机以保护电脑主机。

atd (系统)单一的例行性工作排程,抵挡机制的设定档在 /etc/at.{allow,deny}

auditd (系统)可以让系统需 SELinux 稽核的讯息写入 /var/log/audit/audit.log 中。若此服务没有启动,则讯息会传给 syslog 管理。

autofs(可关闭) (系统)可用来自动挂载来自网路上的其他伺服器所提供的网路磁碟机 (一般是 NFS)。 不过我们是单机系统,所以目前还没必要这个服务。

avahi-daemon(可关闭) (系统)也是一个用户端的服务,可以透过 Zeroconf 自动的分析与管理网路。 Zeroconf 较常用在笔记型电脑与行动装置上,所以我们可以先关闭他!

bluetooth(可关闭) (系统)用在蓝芽装置的搜寻上,如果 Linux 是当作伺服器使用时, 这个服务可以暂时关闭也没关系!

cpuspeed (系统)可以用来管理 CPU 的频率功能。若系统闲置时,此项功能可以自动的降低 CPU 频率来节省电量与降低 CPU 温度喔!

crond (系统)系统设定档为 /etc/crontab。

cups(可关闭) (网路)用来管理印表机的服务,可以提供网路连线的功能,有点类似列印伺服器的功能哩! 你可以在 Linux 本机上面以浏览器的 http://localhost:631 来管理印表机!由于我们目前没有印表机,所以可以暂时关闭他。

firstboot(可关闭) (系统)还记得系统第一次进入图形介面还需要进行一些额外的设定吗? 就是这个服务的帮忙啦!既然已经安装妥当,现在你可以将这个服务关闭啰。

gpm (系统)在 tty1~tty6 的环境下你竟然可以使用滑鼠功能来复制贴上,就是这个 gpm 提供的能力啦!

haldaemon(可关闭) (系统)通常用在桌上型电脑的环境中,可侦测类似 usb 的装置呢! 不过,如果是伺服器环境,这个服务倒是可以关闭啦!如果是桌上型电脑,那最好可以启动啰!

hidd(可关闭) (系统)也是蓝芽服务的功能啦!可以提供键盘、滑鼠等蓝芽装置的侦测哩! 须搭配 bluetooth。伺服器环境倒是不需要此项服务。

hplip(可关闭) (系统)主要是针对 HP 的印表机功能所开发的脚本服务,如果你的环境中并没有 HP 相关设备,这个服务就给他关闭吧!

ip6tables(可关闭) (网路)是针对本机的防火墙功能!这个防火墙主要是针对 IPv6 的版本, 如果你的网路环境并没有 IPv6 的设备,那么这个服务是可以关闭的。

iptables (网路)本机防火墙功能,是核心支援的呢!所以功能与效能都非常棒!当然不能够取消啊! 只是设定上就得要努力研究啦!我们会在伺服器篇介绍网路相关资讯的。

irqbalance (系统)如果你的系统是多核心的硬体,那么这个服务要启动, 因为它可以自动的分配系统中断 (IRQ) 之类的硬体资源。

isdn(可关闭) (网路)ISDN 是一种宽频设备 (数据机的一种) ,但是在台湾我们比较常使用 ADSL 及光纤设备, 所以这个服务是可以关闭啦。

kudzu(可关闭) (系统)如果你有增加新的硬体时,这个服务可以在开机时自动的侦测硬体, 并且会自动的呼叫相关的设定软体,方便你在开机时就处理好你的硬体啊!

lm_sensors(可关闭) (系统)这个服务可以帮你侦测主机板的相关侦测晶片,举例来说, 某些主机板会主动的侦测 CPU 温度、频率、电压等,这个 lm_sensors 能够将这些温度、频率等数据显示出来喔!

lvm2-monitor (系统)我们已经谈过 LVM 啰!所以我们当然要启动这个服务比较妥当。

mcstrans (系统)与 SELinux 有关的服务,最好也启动啊!

mdmonitor(可关闭) (系统)可以侦测所有软体的状态,暂时似乎也不需要启动这个服务哩!

messagebus(可关闭) (系统)可用来沟通各个软体之间的讯息,有点类似剪贴簿的感觉。 不过在伺服器环境则没有强烈需求就是了。

microcode_ctl(可关闭) (系统)Intel 的 CPU 会提供一个外挂的微指令集提供系统运作, 不过,如果你没有下载 Intel 相关的指令集档案,那么这个服务不需要启动的,也不会影响系统运作。

netfs(可关闭) (网路)可以进行网路磁碟机 (NFS, SMB/CIFS) 的挂载与卸载功能。 目前我们尚未使用网路,因此这个服务可以先关闭。

network (网路)提供网路设定的功能,所以一定要启动的啦!

nfslock(可关闭) (网路)NFS 为一种 Unix like 的网路磁碟机,但在进行档案的分享时, 为了担心同一档案多重编辑的问题,所以会有这个锁住 (lock) 的服务!可以避免同一个档案被两个不同的人编辑时所造成的档案错误问题。

pcscd(可关闭) (系统)智慧卡侦测的服务,可以关闭他啦。

portmap (网路)用在远端程序呼叫的服务,很多服务都使用这个玩意儿来辅助连线的, 因此建议不要取消他,除非你确定你的系统没有使用到任何的 RPC 服务喔!

readahead_early
readahead_later
(可关闭) (系统)在系统开机的时候可以先将某些程式载入到记忆体中,以方便快速的载入, 可加快一些启动的速度。

restorecond (系统)利用 /etc/selinux/restorecond.conf 的设定来判断当新建档案时,该档案的 SELinux 类型应该如何还原。需要注意的是,如果你的系统有很多非正规的 SELinux 档案类型设定时,这个 daemon 最好关闭,否则他会将你设定的 type 修改回预设值。

rpcgssd
rpcidmapd
(可关闭) (网路)与 NFS 有关的用户端功能,在你还没有玩到网路阶段时, 这两个咚咚也能够先取消啦!

sendmail (网路)这就是电子邮件的软体啊!我们想要拥有可寄信的功能时, 这个服务可不能关闭。不过,预设这个服务仅能支援本机的功能,无法收受来自网际网路的邮件喔!

setroubleshoot (系统)一定要启动啊!因为这玩意儿可以将你的 SELinux 相关讯息记录在 /var/log/messages 里面,非常有帮助喔!

smartd (系统)这个服务可以自动的侦测硬碟状态,如果硬碟发生问题的话, 还能够自动的回报给系统管理员,是个非常有帮助的服务喔!不可关闭他啊!

sshd (网路)这个是远端连线伺服器的软体功能, 这个通讯协定比 telnet 好的地方在于 sshd 在传送资料时可以进行加密喔!这个服务不要关闭他啦!

syslog (系统)这个服务可以记录系统所产生的各项讯息, 包括 /var/log/messages 内的几个重要的登录档啊。

xfs(可关闭) (系统)这个是 X Font Server,主要提供图形介面的字型的一个服务, 如果你不启动 X 视窗的话,那么这个服务可以启动。但是如果你有需要用到 X 时,一定要启动这玩意儿,否则图形介面是无法启动的喔。

xinetd (系统)就是 super daemon 啊,不必讲了吧 ^_^

yum-updatesd (可关闭)可以透过 yum 的功能进行软体的线上升级机制, 若有升级的软体释出时,就能够以邮件或者是 syslog 来通知系统管理原来手动升级啊。

上面的服务是 CentOS 5.x 预设有启动的,这些预设启动的服务很多是针对桌面电脑所设计的,所以啰,如果你的 Linux 主机用途是在服务器上面的话,那么有很多服务是可以关闭的啦!如果你还有某些不明白的服务想要关闭的, 请务必要搞清楚该服务的功能为何喔!举例来说,那个 syslog 就不能关闭,如果你关掉他的话,系统就不会记录登录档, 那你的系统所产生的警告讯息就无法记录起来,你将无法进行 debug 喔。

下面继续说明一些可能在你的系统当中的服务,只是预设并没有启动这个服务就是了。只是说明一下, 各服务的用途还是需要您自行查询相关的文章啰。

其他服务的简易说明
服务名称 功能简介
dovecot (网路)可以设定 POP3/IMAP 等收受信件的服务,如果你的 Linux 主机是 email server 才需要这个服务,否则不需要启动他啦!
httpd (网路)这个服务可以让你的 Linux服务器成为 www server 喔!
named (网路)这是域名解析服务器 (Domain Name System) 的服务, 这个服务非常重要,但是设定非常困难!目前应该不需要这个服务啦!
nfs (网路)这就是 Network Filesystem,是 Unix-Like 之间互相作为网路磁碟机的一个功能。
ntpd (网路)服务的全名是 Network Time Protocol ,这个服务可以用来进行网路校时, 让你系统的时间永远都是正确的哩!
smb (网路)这个服务可以让 Linux 模拟成为 Windows 上面的网路上的芳邻。 如果你的 Linux 主机想要做为 Windows 用户端的网路磁碟机服务器,这玩意儿得要好好玩一玩。
squid (网路)作为代理服务器的一个服务,可作为一个区域网路的防火墙之用。
vsftpd (网路)作为档案传输服务器 (FTP) 的服务。

  • Share/Bookmark

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

nginx文件类型错误解析漏洞(80sec)

漏洞介绍:nginx是一款高性能的web服务器,使用非常广泛,其不仅经常被用作反向代理,也可以非常好的支持PHP的运行。80sec发现其中存在一个较为严重的安全问题,默认情况下可能导致服务器错误的将任何类型的文件以PHP的方式进行解析,这将导致严重的安全问题,使得恶意的攻击者可能攻陷支持php的nginx服务器。
漏洞分析:nginx默认以cgi的方式支持php的运行,譬如在配置文件当中可以以

location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
}

的方式支持对php的解析,location对请求进行选择的时候会使用URI环境变量进行选择,其中传递到后端Fastcgi的关键变量SCRIPT_FILENAME由nginx生成的$fastcgi_script_name决定,而通过分析可以看到$fastcgi_script_name是直接由URI环境变量控制的,这里就是产生问题的点。而为了较好的支持PATH_INFO的提取,在PHP的配置选项里存在cgi.fix_pathinfo选项,其目的是为了从SCRIPT_FILENAME里取出真正的脚本名。
那么假设存在一个http://www.80sec.com/80sec.jpg,我们以如下的方式去访问

将会得到一个URI
/80sec.jpg/80sec.php
经过location指令,该请求将会交给后端的fastcgi处理,nginx为其设置环境变量SCRIPT_FILENAME,内容为
/scripts/80sec.jpg/80sec.php
而在其他的webserver如lighttpd当中,我们发现其中的SCRIPT_FILENAME被正确的设置为
/scripts/80sec.jpg
所以不存在此问题。
后端的fastcgi在接受到该选项时,会根据fix_pathinfo配置决定是否对SCRIPT_FILENAME进行额外的处理,一般情况下如果不对fix_pathinfo进行设置将影响使用PATH_INFO进行路由选择的应用,所以该选项一般配置开启。Php通过该选项之后将查找其中真正的脚本文件名字,查找的方式也是查看文件是否存在,这个时候将分离出SCRIPT_FILENAME和PATH_INFO分别为
/scripts/80sec.jpg和80sec.php
最后,以/scripts/80sec.jpg作为此次请求需要执行的脚本,攻击者就可以实现让nginx以php来解析任何类型的文件了。

http://www.80sec.com/80sec.jpg/80sec.php

 

POC: 访问一个nginx来支持php的站点,在一个任何资源的文件如robots.txt后面加上/80sec.php,这个时候你可以看到如下的区别:

访问http://www.80sec.com/robots.txt
HTTP/1.1 200 OK
Server: nginx/0.6.32
Date: Thu, 20 May 2010 10:05:30 GMT
Content-Type: text/plain
Content-Length: 18
Last-Modified: Thu, 20 May 2010 06:26:34 GMT
Connection: keep-alive
Keep-Alive: timeout=20
Accept-Ranges: bytes

访问访问http://www.80sec.com/robots.txt/80sec.php
HTTP/1.1 200 OK
Server: nginx/0.6.32
Date: Thu, 20 May 2010 10:06:49 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
Keep-Alive: timeout=20
X-Powered-By: PHP/5.2.6

其中的Content-Type的变化说明了后端负责解析的变化,该站点就可能存在漏洞。

漏洞厂商:http://www.nginx.org

解决方案:

我们已经尝试联系官方,但是此前你可以通过以下的方式来减少损失
关闭cgi.fix_pathinfo为0
或者
if ( $fastcgi_script_name ~ \..*\/.*php ) {
return 403;
}

  • Share/Bookmark

Tags: , , , , , , , , , , ,

cPanel添加域名强制检查DNS servers问题

用cPanel时,常遇到这类问题

Error from park wrapper: Using nameservers with the following IPs: ………   Sorry, the domain is already pointed to an IP address that does not appear to use DNS servers associated with this server.  Please transfer the domain to this servers nameservers or have your administrator add one of its nameservers to /etc/ips.remotedns and make the proper A entries on that remote nameserver.

其实就是为所有权检查,还有一些安全而考虑的

有的服务器商就去掉了这种检验机制,因为DNS更改时延造成的麻烦很大

而bluehost的检验机制更为强大

如何关了?如果你有WHM管理权限,可按如下处理:

Fix the option in WHM. In whm->tweak settings, make sure that this option is checked:

Quote:
Allow Creation of Parked/Addon Domains that resolve to other servers (i.e. domain transfers) [This can be a major security problem. If you must have it enabled, be sure to not allow users to park common internet domains.] 

This really is redundant any more and doesn’t need to be used. Just make SURE to follow the instructions and NOT allow users to park common domains.

This can (at times) become a security issue, but only if you don’t keep a close eye on what your users are doing.

  • Share/Bookmark

Tags: , , , , , , ,

看看,是真的还是假的,ebay没这么夸张吧

from:1243@ebayenforcement.com

We have noted your registration through the Internet registry in your country of XXXXsibay.com, a domain name that is confusingly similar to the famous eBay name and trademark.

The coined term “eBay” is one of the most famous brands on the Internet.  eBay owns exclusive trademark rights to the eBay trademark in many countries worldwide, including the United States, Canada, The United Kingdom,  the European Union  and elsewhere internationally, including related common law rights.  Accordingly, eBay enjoys broad trademark rights in its name.

Arbitrary use of the word BAY in a domain is problematic if the connected website is used in association with a business making use of eBay or operating in the same sphere of business as eBay.

Please review the following links for further information regarding eBay trademarks:
http://pages.ebay.com/help/community/tm.html
http://pages.ebay.com/help/policies/trademark.html

We are concerned that use of your domain name may infringe and/or dilute the famous eBay trademark.  Infringement occurs when a third party’s use of a company’s trademark (or a confusingly similar variation thereof) is likely to confuse consumers as to the affiliation, sponsorship or endorsement of the third party’s services.  Trademark dilution occurs when a third party’s use of a variation of a company’s trademark is likely to lessen the distinctiveness of the company’s famous trademark.  In this case, your use of “BAY” in your domain name, especially if used for an e-commerce web site, is likely to lessen the distinctiveness of the famous eBay brand.  “eBay” is an arbitrary and fanciful trademark; neither “eBay” nor “bay” describe online auctions, online trading, or e-commerce in any way.  We cannot permit the use of the suffix “bay” to evoke eBay or as a shorthand reference to e-commerce.

We appreciate that you may have registered XXXXibay.com with the best of intentions and without full knowledge of the law in this area. 

eBay respects your right of expression and your desire to conduct business on the Internet,  but must enforce its own rights. To avoid further consumer confusion, eBay must insist that you not use the domain name for any purpose, do not sell, offer to sell or transfer the domain name to a third party, and instead simply let the domain registration expire.  In the meantime, the domain name should remain inactive and should not point to any content 

Please confirm in writing that you will agree to resolve this matter as requested.
Thank you in advance for your anticipated cooperation.  

Sincerely,

Edith
eBay Legal Department

  • Share/Bookmark

Tags: , , , , , , , , ,

GOOGLE翻墙代码

<?php
ini_set(‘max_execution_time’, 60);//脚本最大允许执行时长祿  表示没有限制
ini_set(‘memory_limit’, ’128M’);//限制最大占用的内存 28M
ini_set(‘error_reporting’, 0);
ini_set(‘display_errors’, 0);
ini_set(‘magic_quotes_runtime’, 0);//默认为off,意为不转义从文件读取或数据库中查询获得的数据
ini_set(‘magic_quotes_sybase’, 0);//是否采用Sybase形式的自动字符串转义★★
ini_set(‘default_mimetype’, ‘text/html’);//设置默认mime类型为text/html
ini_set(‘default_charset’,'UTF-8′);//设置默认编码为UTF-8
ini_set(‘default_socket_timeout’, ’60′);//默认socket超时(祿
ini_set(‘date.timezone’, ‘UTC’);//设置时区 //date_default_timezone_set(‘UTC’);
//检查gzip加速支持情儿
if ( extension_loaded(‘zlib’) && strstr($_SERVER["HTTP_ACCEPT_ENCODING"],”gzip”) ) {
 ob_start(‘ob_gzhandler’);
} else {
 ob_start();
}
//header(‘Content-Type: text/html; charset=UTF-8′);
//header(‘Content-language: zh-CN’);
//header(‘Expires:-1′);
header(‘Server: gws’);
header(‘X-Powered-By: gushu’); 

$str1 = array(
     ‘<title>Google</title>’,
     ‘Google 搜索</title>’,
     ‘www.google.com.hk’,
     ‘zh-TW’
     );
$str2 = array(‘
     <title>CrazyLemon提供Google在线翻墙搜索服务</title>’,
     ‘CrazyLemon提供Google在线翻墙搜索服务</title>’,
     ‘www.crazylemon.net/google’,
     ‘zh-CN’
     );
     //echo $_SERVER["QUERY_STRING"];
if(!empty($_SERVER["QUERY_STRING"])){
 $q = str_replace(‘hl=zh-TW’,'hl=zh-CN’,$_SERVER["QUERY_STRING"]);
 $url = ‘http://www.google.com.hk/search?’.$q;
}else{
 $url = ‘http://www.google.com.hk/’;
}
$user_agent = $_SERVER["HTTP_USER_AGENT"];
$referer_url = ‘http://www.gushu.cn/’;
//$url 需要抓取的页面地址
//$user_agent 需要返回的user_agent信息 如“baiduspider”或“googlebot
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
//curl_setopt ($ch, CURLOPT_HEADER, 1);
curl_setopt ($ch, CURLOPT_USERAGENT, $user_agent);
curl_setopt ($ch, CURLOPT_REFERER, $referer_url);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION,1);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
/*
curl_setopt ($ch, CURLOPT_HEADER, 1);
curl_setopt ($ch, CURLOPT_COOKIE, $_COOKIE);
curl_setopt ($ch, CURLOPT_POST, $_POST);
*/
if(!curl_errno($ch))
{
 $google =str_replace(“/search”,”/google/search”, curl_exec ($ch));

 echo str_replace($str1,$str2,$google);
}
curl_close($ch);

ob_end_flush();
?>

如何把一段文本里的A标签都去掉?

preg_replace(array(“/\<a[^\>]+\>/i”,”/\<\/a\>/i”), “”, $string);

  • Share/Bookmark

Tags: , , , , , , , , , , , , , ,

php远程下载文件到服务器

由于所买的虚拟主机没有申请SSH或根本不提供SSH访问,无法直接在shell里用get命令获取远程数据,在转移数据时只能通过FTP下载到本地再上传到另一台主机上,速度很慢,如果能直传就好了

解决方法如下,写个PHP文件在A主机上,直接通过PHP脚本下载B主机上的文件到A主机,代码如下:

<form method=”post”>
文件地址:<input name=”url” size=”50″ /><br>
操作密码:<input name=”pwd” size=”30″ />
<input name=”submit” type=”submit” />
</form>
<?php
$pwd=’abcd’;
if ($_POST['pwd']!=$pwd)
exit(‘Sorry ,you are not validate user!’);
// maximum execution time in seconds
set_time_limit (24 * 60 * 60);
if (!isset($_POST['submit'])) die();
// folder to save downloaded files to. must end with slash
$destination_folder = ‘temp/’;
 
$url = $_POST['url'];
$newfname = $destination_folder . basename($url);
$file = fopen ($url, “rb”);
if ($file) {
$newf = fopen ($newfname, “wb”);
if ($newf)
while(!feof($file))
{
fwrite($newf, fread($file, 1024 * 8 ), 1024 * 8 );
}
}
if ($file)
{
fclose($file);
}
if ($newf) {
fclose($newf);
echo ‘OK,File has been downloaded!’;
}
?>

基中$pwd是操作密码,这样不会被人乱下东西挤爆硬盘了

  • Share/Bookmark

Tags: , , , , , , , , ,

How to use the html tag HTTP-EQUIV “IMAGETOOLBAR”

This meta tag is used to facilitate how to handle images and photos when you use Internet Exlorer. If you want your images and photos to be visible constantly, it is best not to use this meta tag. 
Using this imagetoolbal tag doesn’t influence your ranking with the search engines. The title of your page the keywords and the description tag do influence your ranking.

&lt;meta http-equiv="imagetoolbar" content="value"&gt;

Example meta tag http-equiv=”imagetoolbar”

 

 Add the following meta tag in the source of your webpage. The difference in spelling at the end of the tag is either you use     ” /> = xml or “> = html.
&lt;meta http-equiv="imagetoolbar" content="yes"&gt;&lt;meta http-equiv="imagetoolbar" content="no"&gt;

 

Where should you add this imagetoolbar tag?

You may add this meta tag to all of your webpages, so not only in the first index page. Make sure that on every page relevant meta tags are added.  Add keywords and phrases that are relevant and correspond to the text and the language on that specific page. It might be a lot of work to add specific meta tags to each page but you will notice in time that it works!

Meta tags Summary – Important SEO things to remember

We suggest that you use the Meta tags in your index.htm or index.html page. Than in all other important pages and last but not least in all the pages of your website. Make sure to put some extra effort in it, it will attract extra visitors to your webpage. Create relevant different meta tags for each and every page.
  • Share/Bookmark

Tags: , , , , , , , , , , ,

ecshop设置模板报错的解决方法

装了ecshop的默认模板,点设置模板时,报如下错误

Maximum execution time of 30 seconds exceeded in …… admin/includes/lib_template.php

这个是ECShop的一个鸡肋问题,有一个暴力解决方法。

删除:themes\XXX\libs.xml

直接删除模板下的这个配置文件,基本上第三方的模板都能设置了。这个确实是个鸡肋的功能,无法自动生成libs.xml文件,配置错误就会导致设置模板功能出错。

  • Share/Bookmark

Tags: , , ,

bluehost上安装网站显示http 500错误

网友遇到的一个安装网站报500错误的问题,网站源码为Magento 。安装和错误细节:上传压缩包到bluehost帐户public_html目录后解压缩,访问http://www.yourdomain.com/install.php时提示ERR 500错误。
解决方法:

试访问:http://www.yourdomain.com/LICENSE.txt ,显示正常。
上传内容为< ?php phpinfo(); ? > 的测试文件info.php,用浏览器访问,显示正常。

检查目录和文件属性,发现均不正常。

目录见图1,图中目录的允许均为775,实际应为755,全部进行修改。即OK

原因是bluehost的安全机制,不允许属性为664的PHP文件执行,以前有说过

另外,altushost装magento不能成功,老是执行超时,因为altushost的php max_execution_time 为60,不够它安装完的

而且就算在根目录放置php.ini文件进行自定义也没用,因为无法更改master value,local value再大也没用

这点和bluehost不一样,bluehost的php.ini可以同时作用到这两个域

  • Share/Bookmark

Tags: , , , , , , ,