您的足迹:首页 > 我的代码 >linux/centos站群批量建站用的配置文件conf

linux/centos站群批量建站用的配置文件conf

server
 {
   listen       80;
   server_name  domain www.domain;
   index index.html index.php;
   root /home/web/www/dede/www.domain;

   if (!-f $request_filename)
   {
      rewrite ^/list-([0-9]+)\.html$ /plus/list.php?tid=$1   last;
      rewrite ^/list-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /plus/list.php?tid=$1&totalresult=$2&PageNo=$3   last;
      rewrite ^/arc-([0-9]+)-1\.html$ /plus/view.php?arcID=$1   last;
      rewrite ^/arc-([0-9]+)-([0-9]+)\.html$ /plus/view.php?aid=$1&pageno=$2  last;
      rewrite ^(.*)/tags\.html /tags.php;
      rewrite ^(.*)/tags/(.*).html $1/tags.php?/$2;
   }

   location ~* ^/data/.*\.(php|php5)$
   {
      deny all;
   }

   location ~* ^/templets/.*\.(php|php5)$
   {
      deny all;
   }

   location ~ .*\.(php|php5)?$
   {
     fastcgi_pass  unix:/tmp/php-cgi.sock;
     fastcgi_index index.html;
     include fastcgi.conf;
   }

   if ($host != 'www.domain' ) {
                rewrite  ^/(.*)$  http://www.domain/$1  permanent;
            }

   location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
   {
     expires      30d;
   }

   location ~ .*\.(js|css)?$
   {
     expires      1h;
   }
   error_page 404 /404.html;
   error_page 404 = http://www.domain/404.html;
}


名字保存成  dede.com.conf 放在  /usr/local/nginx/conf/vhost/dede.com.conf


具体命令:

rm -Rf  /usr/local/mysql/var/www_ABC_com
rm -Rf  /home/web/www/dede/www.ABC.com


unzip www.ABC.com.zip
chmod -R 777 www.ABC.com
chown -R www:www www.ABC.com
\cp /usr/local/nginx/conf/vhost/dede.com.conf /usr/local/nginx/conf/vhost/www.ABC.com.conf
sed -i 's#domain#ABC.com#'  /usr/local/nginx/conf/vhost/www.ABC.com.conf
sed -i 's#domain#ABC.com#'  /usr/local/nginx/conf/vhost/www.ABC.com.conf


lnmp restart






本博客所有文章如无特别注明均为原创。作者:恶猫复制或转载请以超链接形式注明转自 恶猫的博客
原文地址《linux/centos站群批量建站用的配置文件conf

相关推荐

分享本文至:

发表评论

路人甲 表情
看不清楚?点图切换 Ctrl+Enter快速提交

网友评论(0)

恶猫的博客 -记录自己日常,代码,美图,电影,音乐,新闻,只是个人博客而已

浙ICP备15011757号-4 网站地图 联系我