分页: 11/28 第一页 上页 6 7 8 9 10 11 12 13 14 15 下页 最后页 [ 显示模式: 摘要 | 列表 ]
May 15
一、开始菜单-运行(Win+R)-输入regedit打开注册表编辑器
找到下面这项
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp
这时候你就可以看见右边的PortNumber键值了,双击PortNumber把基数改为十进制,修改成你想要改的端口号。

二、只修改了上面的这一个键值还是不行的,还要接着把下面的这个键值也修改成和上面的一样才可以
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
这个键值右边有很多选项,找到PortNumber这个键值,双击把基数改为十进制,端口号改成和上面修改的一致,退出注册表编辑器。

三、上面修改好了之后,你还要更新下防火墙的开放端口号,否则服务器重启之后你就连不上服务器了,你可以在修改默认的远程桌面端口号之前就把要设置的端口号在防火墙中排除掉,这样重启之后你就可以用修改后得端口远程连接你的服务器了,如你修改的端口号为7788那么你在远程连接工具的IP地址后面加上:7788就可以了。
May 4
1.请检查你的FastCGI进程是否启动

2.FastCGI进程不够使用
请通过执行 netstat -anpo | grep “php-cgi” | wc -l 判断,是否接近你启动的FastCGI进程,接近你的设置,表示进程不够

3.执行超时
请把
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
这几项的值调高

4.FastCGI缓冲不够
nginx和apache一样,有前端缓冲限制
请把
fastcgi_buffer_size 32k;
fastcgi_buffers 8 32k;
这几项的值调高

5.Proxy缓冲不够
如果你使用了Proxying,请把
proxy_buffer_size  16k;
proxy_buffers      4 16k;
这几项的值调高

6.https转发配置错误
正确的配置方法
server_name www.mydomain.com;

location /myproj/repos {

set $fixed_destination $http_destination;
if ( $http_destination ~* ^https(.*)$ )
{
set $fixed_destination http$1;
}

proxy_set_header        Host $host;
proxy_set_header        X-Real-IP $remote_addr;
proxy_set_header        Destination $fixed_destination;
proxy_pass              http://subversion_hosts;
}

7.php脚本执行时间过长
将php-fpm.conf的0s的0s改成一个时间。
Tags: ,
May 2
方法:系统平台是CentOS 5,前提是LAMP已配置好,运行正常。
1. wget -c http://www.21andy.com/centos/5/i386/spawn-fcgi-1.6.3-1.el5.i386.rpm(也可以去官方下载源码包编译安装:http://www.lighttpd.net/download/spawn-fcgi-1.6.3.tar.gz)
2. rpm -ivh spawn-fcgi-1.6.3-1.el5.i386.rpm
3. 使用spawn-fcgi来控制php-cgi的FastCGI进程:
/usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -C 5 -u apache -g apache -f /usr/bin/php-cgi
参数含义如下:
-f 指定调用FastCGI的进程的执行程序位置,根据系统上所装的PHP的情况具体设置。
-a 绑定到地址addr。
-p 绑定到端口port。
-s 绑定到unix socket的路径path。
-C 指定产生的FastCGI的进程数,默认为5。(仅用于PHP)
-P 指定产生的进程的PID文件路径。
-u和-g FastCGI使用什么身份(-u 用户 -g 用户组)运行,CentOS下可以使用apache用户,其他的根据情况配置,如nobody、www-data等。
4. 将这行代码加入到/etc/rc.local文件底部,这样系统启动的时候就可以同时启动PHP的FastCGI进程。
Tags: ,
Apr 27
在微软Windows Server 2008中开始提供一个全新的Server Core模式,它是一个最小限度的系统安装选项,只包括安全、TCP/IP、文件系统、RPC等服务器核心子系统。在Server Core我们可以安装所需的服务器角色和特征,并且仅有非常少的GUI,像我们常见的IE、OE等应用在Server Core中是没有的,在Server Core中我们可以安装的服务器角色也只有DNS、DHCP、文件服务、活动目录、ADLDS(轻型目录服务)、打印、媒体、Web这几种,而其他角色是不能安装的。Windows Server 2008的Server Core是不支持asp.net和 .NET Framework的, Windows Server 2008 R2 Server Core有了改进,增加了对 .NET Framework子集、ASP.Net的支持,并提供对PowerShell的支持,可以配置更多的服务器角色。

在Windows Server 2008 R2 Server Core R2中Server Core提供了一些可选的特性:

•提供对 .NET Framework 2.0子集的支持
•提供对 .NET Framework 3.0和3.5子集的支持,包括WCF、WF、LINQ等开发工具
•提供对PowerShell的支持
•提供asp.Net支持,丰富了IIS的功能,除了不支持IIS的GUI管理界面,其他功能都是完全的。
•提供Active Directory Certificate Services服务器角色,即活动目录验证服务,可以成为CA服务器管理用户、计算机的公钥。
•Windows Server 2008 R2完全架构于64位,但其Server Core可以通过Windows on Windows(WOW)功能支持32位的应用程序,如果用户还需要运行32位程序的话,这个功能还是比较有用。
Server Core就是微软用命令行模式代替了图形界面,并且只有少数应用可以安装。Server Core安装完成后,我们首次登录后仅仅可以看到一个命令行窗口,看不到菜单、任务栏等GUI,服务器驱动的安装、TCP/IP设置、服务器角色的安装管理等操作均需要通过命令行来进行设置。

Server Core的常见部署主要应用做基础构架服务器,如DNS、DHCP、IIS等,或者作为分支机构的只读域控制器,除此之外,还可以作为Windows虚拟化宿主系统,可以运行微软虚拟化平台Hyper-V。

使用Server Core我们可以获得如下好处:

简化维护管理:在Server Core中我们安装的是所需的服务器角色和特征,其他的角色默认是不安装的,这样对于管理员来说可以专著于某一个应用,提高了工作效率,也降低了后期IT管理费用,总体降低了企业TCO成本。

减少攻击表面:Windows的图形界面虽然大大简化了操作,但是多个GUI也增加了出现漏洞的可能。Server Core中仅提供了系统更改时间等少数GUI,Windows中常见的GUI、Shell、IE、OE、Media等在Server Core中都被取消,这样就使服务器的攻击表面大大减少,提高了服务器的安全性。

高可用性:由于Server Core是一个最小的系统安装选项,安装的角色和特性降到了最低,省略了GUI,安装角色也不需要重启,这样就提高了系统的可用性,使系统工作更加稳定。

降低磁盘占用:Server Core去掉了Windows的外壳,也没有安装不必要的功能,所以使空间占用大大降低,Server Core安装成功后大概占用1GB的磁盘空间,随着应用的安装还需要大概2GB的空间,这比Windows Server 2008的磁盘占用要少得多。

较少的补丁安装:在Windows中我们需要经常安装各种补丁,对于不同组件需要安装不同的补丁。在Server Core中由于只具备少数组件,我们免去了安装大量补丁的麻烦。

Server Core的安装很简单,需要注意的是Server Core不能从原有的系统进行升级,只能进行全新安装。安装完成后,我们需要对Server Core进行一些初始化配置。首先我们需要做的是输入操作系统序列号并激活系统,并对系统激活状态进行验证。需要连接到网络,在命令提示符窗口中输入“Slmgr.vbs -ipk ”来输入序列号,然后输入“Slmgr.vbs -ato”来激活系统。激活之后可以用“Slmgr.vbs -dli”来验证系统激活状态。

激活系统后还需要进行一些初始化设置,如设置静态IP、重命名服务器、加入域和配置防火墙。

•设置静态IP:如果服务器需要设置静态IP,可以用Netsh命令进行设置。首先需要用“Netsh interface ipv4 show interfaces”命令来查看服务器上网络适配器的状态,记下需要设置IP的网络适配器的名称,如“Local Area Connetion”。然后使用命令Netsh interface ipv4 set address name=“网络适配器名称” source=static address=静态IP地址 mask=子网掩码 gateway=默认网关 来设置静态IP地址。
•设置DNS可以用如下命令:Netsh interface ipv4 add dnsservername=“网络适配器名称” address=DNS服务器IP地址 index=1。如果设置多个DNS,只需重复输入此条命令,然后将index值递增即可。
•加入域:如果服务器需要加入域,可以利用如下命令:Netdom join 计算机名称 /domain:域名 /userd:有权限加入域的用户名 /passwordd:* ,回车后输入密码即可。
•配置防火墙:还需要进行防火墙的配置,因为防火墙默认是开启的,所以我们需要定义一些规则,如打开远程访问所需的3389端口等,否则会默认禁止应用所需的端口和协议。在系统调试阶段,我们可以暂时关闭防火墙,以消除影响,可利用如下命令:“netsh firewall set opmode disable”。创建防火墙规则可以使用命令“netsh firewall set portopening protocol=TCP|UDP port=端口号 name=名称”。此外如果需要进行一些高级设置可以使用“netsh advfirewall”命令。
•安装服务器角色:安装服务器角色我们需要利用Oclist命令,这个命令可以列出服务器所有安装的角色。安装各种角色可以利用如下命令,注意大小写是敏感的:
Start/w Ocsetup 角色包
 DHCP服务器= DHCPServerCore
 DNS 服务器= DNS-Server-Core-Role
 文件复制服务= FRS-Infrastructure
 分布式文件系统服务= DFSN-Server
 分布式文件系统复制= DFSR-Infrastructure-ServerEdition
 网络文件系统= ServerForNFS-Base
 流媒体服务器= MediaServer
 打印服务器= Printing-ServerCore-Role
 LPD = Printing-LPDPrintService
常用命令汇总:对于之前没有接触过命令行操作的用户来说,一下子掌握Server Core的操作确实有些难度,Server Core中提供了一个常用的命令行汇总,可以为用户提供不少的便利:c:windowssystem32cscript scregedit.wsf /cli

管理功能:可以通过四种方式来管理Server Core,本地或者远程使用命令提示符;远程使用终端服务器;使用Windows远程命令提示符(WinRS);远程使用微软管理控制台(MMC)。

上述管理也可以通过一个图形工具进行参考:图形化的2008R2 Server Core 配置管理工具。
Apr 21
<configuration>
  
    <system.webServer>
        <httpErrors errorMode="Detailed" />
        <asp scriptErrorSentToBrowser="true"/>
  <rewrite>
    <rules>
      <rule name="Rewrite subdomain">
        <match url="(.*)" />
         <conditions>
          <add input="{HTTP_HOST}" pattern="^yourdomain\.com$" />
         </conditions>
         <action type="Redirect"  url="http://www.yourdomain.com/{R:1}" appendQueryString="false"/>
      </rule>
      <rule name="From Ultimate SEO URLs 1" stopProcessing="true">
            <match url="^(.*)-p-(.*).html$" ignoreCase="false" />
            <conditions>
              <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
              <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
            </conditions>
            <action type="Rewrite" url="index.php?main_page=product_info&amp;products_id={R:2}&amp;" appendQueryString="true" />
       </rule>
    
      <rule name="From Ultimate SEO URLs 2" stopProcessing="true">
            <match url="^(.*)-c-(.*).html$" ignoreCase="false" />
            <conditions>
              <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
              <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
            </conditions>
            <action type="Rewrite" url="index.php?main_page=index&amp;cPath={R:2}&amp;" appendQueryString="true" />
       </rule>
      
       <rule name="From Ultimate SEO URLs 3" stopProcessing="true">
            <match url="^(.*)-m-([0-9]+).html$" ignoreCase="false" />
            <conditions>
              <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
              <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
            </conditions>
            <action type="Rewrite" url="index.php?main_page=index&amp;manufacturers_id={R:2}&amp;" appendQueryString="true" />
       </rule>
      
       <rule name="From Ultimate SEO URLs 4" stopProcessing="true">
            <match url="^(.*)-pi-([0-9]+).html$" ignoreCase="false" />
            <conditions>
              <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
              <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
            </conditions>
            <action type="Rewrite" url="index.php?main_page=popup_image&amp;pID={R:2}&amp;" appendQueryString="true" />
       </rule>
        <rule name="From Ultimate SEO URLs 5" stopProcessing="true">
            <match url="^(.*)-pr-([0-9]+).html$" ignoreCase="false" />
            <conditions>
              <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
              <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
            </conditions>
            <action type="Rewrite" url="index.php?main_page=product_reviews&amp;products_id={R:2}&amp;" appendQueryString="true" />
       </rule>
       <rule name="From Ultimate SEO URLs 6" stopProcessing="true">
            <match url="^(.*)-pri-([0-9]+).html$" ignoreCase="false" />
            <conditions>
              <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
              <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
            </conditions>
            <action type="Rewrite" url="index.php?main_page=product_reviews_info&amp;products_id={R:2}&amp;" appendQueryString="true" />
       </rule>
      
      <rule name="For Open Operations Info Manager" stopProcessing="true">
            <match url="^(.*)-i-([0-9]+).html$" ignoreCase="false" />
            <conditions>
              <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
              <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
            </conditions>
            <action type="Rewrite" url="index.php?main_page=info_manager&amp;pages_id={R:2}&amp;" appendQueryString="true" />
       </rule>
      
       <rule name="For dreamscape's News and Articles Manager 1" stopProcessing="true">
            <match url="^news/?$" ignoreCase="false" />
            <conditions>
              <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
              <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
            </conditions>
            <action type="Rewrite" url="index.php?main_page=news&amp;" appendQueryString="true" />
       </rule>
       <rule name="For dreamscape's News and Articles Manager 2" stopProcessing="true">
            <match url="^news/rss.xml$" ignoreCase="false" />
            <conditions>
              <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
              <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
            </conditions>
            <action type="Rewrite" url="index.php?main_page=news_rss&amp;" appendQueryString="true" />
       </rule>  
       <rule name="For dreamscape's News and Articles Manager 3" stopProcessing="true">
            <match url="^news/archive/?$" ignoreCase="false" />
            <conditions>
              <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
              <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
            </conditions>
            <action type="Rewrite" url="index.php?main_page=news_archive&amp;" appendQueryString="true" />
       </rule>
       <rule name="For dreamscape's News and Articles Manager 4" stopProcessing="true">
            <match url="^news/([0-9]{4})-([0-9]{2})-([0-9]{2}).html$" ignoreCase="false" />
            <conditions>
              <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
              <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
            </conditions>
            <action type="Rewrite" url="index.php?main_page=news&amp;date={R:1}-{R:2}-{R:3}&amp;" appendQueryString="true" />
       </rule>
           <rule name="For dreamscape's News and Articles Manager 5" stopProcessing="true">
            <match url="^news/archive/([0-9]{4})-([0-9]{2}).html$" ignoreCase="false" />
            <conditions>
              <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
              <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
            </conditions>
            <action type="Rewrite" url="index.php?main_page=news_archive&amp;date={R:1}-{R:2}&amp;" appendQueryString="true" />
       </rule>
      <rule name="For dreamscape's News and Articles Manager 6" stopProcessing="true">
            <match url="^news/(.*)-a-([0-9]+)-comments.html$" ignoreCase="false" />
            <conditions>
              <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
              <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
            </conditions>
            <action type="Rewrite" url="index.php?main_page=news_comments&amp;article_id={R:2}&amp;" appendQueryString="true" />
       </rule>
       <rule name="For dreamscape's News and Articles Manager 7" stopProcessing="true">
            <match url="^news/(.*)-a-([0-9]+).html$" ignoreCase="false" />
            <conditions>
              <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
              <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
            </conditions>
            <action type="Rewrite" url="index.php?main_page=news_article&amp;article_id={R:2}&amp;" appendQueryString="true" />
       </rule>
      
      
      
       <rule name="All other pages" stopProcessing="true">
            <match url="^(.*).html$" ignoreCase="false" />
            <conditions>
              <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
              <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
            </conditions>
            <action type="Rewrite" url="index.php?main_page={R:1}&amp;" appendQueryString="true" />
       </rule>
     </rules>
    </rewrite>
    </system.webServer>
    <system.web>
        <customErrors mode="Off"/>
        <compilation debug="true"/>
    </system.web>
</configuration>
Tags: , ,
分页: 11/28 第一页 上页 6 7 8 9 10 11 12 13 14 15 下页 最后页 [ 显示模式: 摘要 | 列表 ]