Re: [Lua] "Hello, world!" from Lua file?

2014-01-28 Thread Shohreh
Yichun Zhang (agentzh) Wrote: --- > Alternatively one can set the Content-Type response header directly in Lua (which is more flexible): > > content_by_lua ' > ngx.header["Content-Type"] = "text/plain" > ngx.say("hello world")

Re: [Lua] "Hello, world!" from Lua file?

2014-01-27 Thread Shohreh
Thanks for the tip. After editing nginx.conf thusly... == ... location / { root html; index index.html index.htm; content_by_lua_file html/hello.lua; add_header Content-Type text/plain; } ... == ... the script simply displays an empty page, with no error

[Lua] "Hello, world!" from Lua file?

2014-01-27 Thread Shohreh
Hello Now that I have a working Nginx with the ngx_lua module, I'd like to start learning how to write web scripts. The following page doesn't have a basic sample: http://wiki.nginx.org/HttpLuaModule So I used the following... http://yichunzhang.wordpress.com/2010/05/18/a-simple-ngx_lua-example-

Re: [OpenResty] How to start Nginx?

2014-01-27 Thread Shohreh
Thanks, but this is for an appliance, so a virtual machine is too big. Recompiling with "--prefix" solved the problem. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,246792,246862#msg-246862 ___ nginx mailing list nginx@nginx.org http://mail

Re: [OpenResty] How to start Nginx?

2014-01-27 Thread Shohreh
Thanks for the idea, but I had to compile Nginx because the one available in the depot didn't have Lua compiled, and I'd rather compile both Nginx and Lua at the same time. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,246792,246861#msg-246861 _

Re: [OpenResty] How to start Nginx?

2014-01-27 Thread Shohreh
Thanks Yichun. This is what I ended up doing, because "make install DESTDIR=blah" triggered other errors. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,246792,246860#msg-246860 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/

[OpenResty] How to start Nginx?

2014-01-24 Thread Shohreh
Hello Using OpenResty, I compiled and installed a Lua-capable Nginx in /tmp so I could experiment with it before replacing the current Nginx that was installed through apt-get. However, since files are located in non-standard locations, Nginx can't find them:

Re: [1.4.1] Finding docroot directory?

2013-05-13 Thread Shohreh
Thanks everyone for the infos. "nginx -V" doesn't say where the docroot is, but I noticed that /etc/nginx/nginx.conf does use "/etc/nginx/conf.d/*.conf", where default.conf says: [code] location / { root /usr/share/nginx/html [/code] Thank you. Posted at Nginx Forum: http://forum.ngin

Re: [1.4.1] Finding docroot directory?

2013-05-13 Thread Shohreh
I found a work-around: Reading "/var/log/nginx/error.log" includes a warning that Nginx can't find "/usr/share/nginx/html/favicon.ico", so for some reason, Nginx uses /usr/share/nginx/html/ instead of /var/www. I'm confused about the multiple configuration files used by Nginx: /etc/nginx.conf /et

[1.4.1] Finding docroot directory?

2013-05-13 Thread Shohreh
Hello I'm running Nginx 1.4.1 on an appliance running Debian 6, and can't find from which directory Nginx is serving files. According to /etc/nginx.conf, the location for "/" is "root /var/www;", but even renaming the default index.html still displays the familiar "Welcome to nginx!". After us

Re: Cross-compiling Nginx for ARM?

2013-04-15 Thread Shohreh
djczaski Wrote: --- > I've compiled for ARM A8. The biggest issue was configuring to use the system OpenSSL and pcre libraries. other than that , no problems. Thanks for the input. By any chance, did you write a tutorial that I could use to try

Cross-compiling Nginx for ARM?

2013-04-12 Thread Shohreh
Hello, I'd like to run Nginx on the SheevaPlug (http://en.wikipedia.org/wiki/SheevaPlug), which is based on Marvell's Kirkwood 88F6281 (ARM9E/ARMv5TE). I have a couple of newbie questions: 1. The archives of the mailing list (http://forum.nginx.org/read.php?2,227934,228360#msg-228360) include a