Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1181701
  • 博文数量: 181
  • 博客积分: 4968
  • 博客等级: 上校
  • 技术积分: 1867
  • 用 户 组: 普通用户
  • 注册时间: 2008-01-13 21:52
文章分类

全部博文(181)

文章存档

2015年(2)

2013年(6)

2012年(22)

2011年(41)

2010年(27)

2009年(51)

2008年(32)

我的朋友

分类: LINUX

2012-08-14 14:10:56

Apache2Nginx

一个linux下的命令行工具,可以用来将apache的conf文件转换成nginx 的conf文件。

Overview

NGINX (“engine x”) is a high performance web server, caching proxy and a Layer 7 load balancing solution. Millions of web sites on the Internet benefit from using NGINX because of its extreme performance, scalability, reliability, flexibility and security.

However, like Apache, the configuration of NGINX is not an easy thing for most of the people. In particularly, it will take our more efforts to learn the modules and directives in Apache and Nginx when we need to migrate to NGINX from Apache server.

According to the above requirement, we developed the apache2nginx tool. The goal of this tool is generating Nginx configuration file(s) according to those of Apache.

Download and Installation

You could download source code or binary file (i386 or x86_64) to use.

Download Binary
$ wget $ tar jxvf apache2nginx-1.0.0-bin.i386.tar.bz2

Now you will get the executable file apache2nginx.

you can by follow command to try use.

$ ./apache2nginx -h
Download Source Code

Step 1: Download and unzip source code to the above directory.

$ wget $ unzip nhnc-nginx-apache2nginx.zip

Step 2: Configure: you could change the PREFIX by --prefix option for the installation directory

$ cd nhnc-nginx-apache2nginx $ ./configure --prefix=/usr/local/apache2nginx

Step 3: Compile and install

$ make && make install

Step 4: Add apache2nginx to PATH environment variable.

$ export PATH=/usr/local/apache2nginx/bin:$PATH
Run

The easiest way to run Apache2nginx is as below:

$ apache2nginx -f /etc/httpd/conf/httpd.conf

Now, if it’s ok, nginx.conf will been produced. By default, the converting result file is nginx.conf which is in the current directory.

Docs & Help
  1. Manual 
  2. Supported Modules 
  3. Module and Directive Mapping 
阅读(1059) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~