ITPub博客

首页 > Linux操作系统 > Linux操作系统 > **系统搭建

**系统搭建

原创 Linux操作系统 作者:whyun1984 时间:2013-11-08 14:23:21 0 删除 编辑


1、总体架构nginx+tomcat

mkdir -pv /home/source/img0.bbbb.com/
mkdir -pv /home/source/img1.bbbb.com/
mkdir -pv /home/source/img2.bbbb.com/
mkdir -pv /home/source/img3.bbbb.com/
mkdir -pv /home/source/img4.bbbb.com/
mkdir -pv /home/source/img5.bbbb.com/
mkdir -pv /home/source/js.bbbb.com/
mkdir -pv /home/source/css.bbbb.com/
mkdir -pv /home/source/html.bbbb.com/
mkdir -pv /home/source/trailer/
?
img0.aaaa.com 指向目录路径: /home/source/img0.bbbb.com/
img1.aaaa.com 指向目录路径: /home/source/img1.bbbb.com/
img2.aaaa.com 指向目录路径: /home/source/img2.bbbb.com/
img3.aaaa.com 指向目录路径: /home/source/img3.bbbb.com/
img4.aaaa.com 指向目录路径: /home/source/img4.bbbb.com/
img5.aaaa.com 指向目录路径: /home/source/img5.bbbb.com/
js.aaaa.com 指向目录路径: /home/source/js.bbbb.com/
css.aaaa.com 指向目录路径: /home/source/css.bbbb.com/
html.aaaa.com 指向目录路径: /home/source/html.bbbb.com/
v.aaaa.com 指向目录路径: /home/source/trailer/
cd /usr/local/nginx/conf
tail nginx.conf
include conf.d/*.conf;

cd conf.d
ls
css.bbbb.conf       image.bbbb.com.conf  img3.bbbb.com.conf  proxy.conf
bbbb.com.conf       img0.bbbb.com.conf   img4.bbbb.com.conf  v.bbbb.conf
bbbbinema.com.conf  img1.bbbb.com.conf   img5.bbbb.com.conf  web.conf
html.bbbb.com.conf  img2.bbbb.com.conf   js.bbbb.conf
cat bbbbinema.com.conf
server
{
        listen 8084;
        server_name www.bbbbinema.com www.aaaa.com.cn;
        index index.html index.jsp index.htm;
        root  /home/tomcatRoot/www.bbbbinema.com;

        charset utf-8;

        location ~* "\.(jsp|do)$" {
        proxy_pass http://192.168.0.37:8083;
        }

        location ~* {
        proxy_pass http://192.168.0.37:8083;
        }

        location ~* "\.(jpg|jpeg|png|gif|html|css)$" {
        expires 30d;
        }

}
cat img0.bbbb.com.conf
server
{
        listen 8084;
        server_name img0.aaaa.com;
        root  /home/source/img0.bbbb.com;
        location ~* "\.(jpg|jpeg|png|gif|html|css)$" {
        expires 30d;
        }
}

cat v.bbbb.conf
server
{
        listen 8084;
        server_name v.aaaa.com;
        root  /home/source/trailer;
        location ~* "\.(js|css|flv)$" {
        expires 30d;
        }
}

1、nginx
tar -xvf pcre-8.33.tar.gz
cd pcre-8.33
./configure
make && make install
tar -xvf nginx-1.5.4.tar.gz
cd nginx-1.5.4
./configure --with-http_stub_status_module --with-http_ssl_module
make && make install


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26972107/viewspace-776103/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2013-10-11

  • 博文量
    21
  • 访问量
    84781