I have tested this guide on openwrt 10.03 (backfire) running on TPLINK TL-WR1043ND.
Install precompiled Nginx
If you don’t want to compile nginx by yourself, you can install nginx from openwrt web interface:
select System -> Software -> Update Package List -> Install Nginx
Compile Nginx
If you never build openwrt from source before, you must build it first. You can follow my other post : how-to-build-openwrt-from-source-for-tp-link-tl-wr1043nd/. Note, nginx is not on openwrt base package. So you must download additional package (feeds).
On ‘make menuconfig’ select Network->nginx
Compiling nginx is very easy, thanks to openwrt developers!
make ./package/feeds/packages/nginx/compile
The nginx package will be placed at bin/[board_arch]/packages/nginx_0.7.67-3_ar71xx.ipk . In tplink tl wr1043nd : bin/ar71xx/packages/nginx_0.7.67-3_ar71xx.ipk
Configure Nginx
create nginx root directory
Edit /etc/nginx/nginx.conf:
- change the user from nobody to root
- change nginx root directory to /www-nginx/default
this is the diff file
Testing the configuration
create simple html file on /www-nginx/default/index.html.
Stop openwrt default web server and start nginx
create simple html file on /www-nginx/default/index.html.
Stop openwrt default web server and start nginx
0 comments:
Post a Comment