Differences
This shows you the differences between two versions of the page.
|
doc:howto:http.nginx [2013/01/19 09:44] orca |
doc:howto:http.nginx [2013/01/23 14:08] (current) craxyow3 Not WIP, added comments to nginx config. |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== nginx ====== | + | ====== Nginx ====== |
| - | WIP, by trial and error. This is what I did to make PHP5 to work. | + | [[http://wiki.nginx.org/|Nginx]] is a high-performance http-server with other functions as well. |
| + | It is a perfect candidate to run on OpenWRT due to the performance and memory handling. | ||
| ===== Installation ===== | ===== Installation ===== | ||
| Line 14: | Line 15: | ||
| [[http://downloads.openwrt.org/attitude_adjustment/12.09-rc1/|http://downloads.openwrt.org/attitude_adjustment/12.09-rc1/]] ARCH /generic/packages/nginx_1.2.2-1_ARCH.ipk | [[http://downloads.openwrt.org/attitude_adjustment/12.09-rc1/|http://downloads.openwrt.org/attitude_adjustment/12.09-rc1/]] ARCH /generic/packages/nginx_1.2.2-1_ARCH.ipk | ||
| + | |||
| + | Ofcourse there will be port issues if you installed LuCI before or after. LuCI package installs uhttpd which also want to claim port 80. | ||
| + | So configuring and portforwarding may be neccessary. There are ways to run LuCI with another http daemon but that is not coverd here. | ||
| + | For a quick fix just change the uhttpd port to something else. config file resides <code>/etc/config/uhttpd</code> | ||
| ==== Configuration Files ==== | ==== Configuration Files ==== | ||
| Line 48: | Line 53: | ||
| gzip_vary on; | gzip_vary on; | ||
| server { | server { | ||
| - | listen 80; | + | listen 80; # Port, make sure it is not in conflict with another http daemon. |
| - | server_name YOUR_SERVER; | + | server_name YOUR_SERVER; # Change this, reference -> http://nginx.org/en/docs/http/server_names.html |
| fastcgi_connect_timeout 300; | fastcgi_connect_timeout 300; | ||
| fastcgi_send_timeout 300; | fastcgi_send_timeout 300; | ||
| Line 59: | Line 64: | ||
| client_body_timeout 10; | client_body_timeout 10; | ||
| client_header_timeout 10; | client_header_timeout 10; | ||
| - | send_timeout 60; | + | send_timeout 60; # 60 sec should be enough, if experiencing alof of timeouts, increase this. |
| output_buffers 1 32k; | output_buffers 1 32k; | ||
| postpone_output 1460; | postpone_output 1460; | ||
| - | root /mnt/data/www; | + | root /mnt/data/www; # Your document root, where all public material is. |
| location ~ \.php$ { | location ~ \.php$ { | ||
doc/howto/http.nginx.1358585050.txt.bz2 · Last modified: 2013/01/19 09:44 by orca
