Giter Club home page Giter Club logo

openresty.org's Introduction

Name

OpenResty.org - Code and data for the official site of OpenResty

Table of Contents

Description

This repository holds the source code and configurations for the official OpenResty site.

This site is a dynamic web application built entirely upon the OpenResty stack, backed by the PostgreSQL database management system.

The latest generation of this site is under the v2/ directory of this repository.

Building

You need to install both OpenResty and PostgreSQL 9.x, obviously.

You need to install pandoc, marked, cheerio, axios, pug and sharp to your system. On Mac OS X, for example, it's as simple as

brew install pandoc
npm install marked cheerio axios pug sharp

You'll also need perl installed in your system for building the web site (not needed for serivce deployment though).

cd v2/

make gendata  # generate data files from .md files

# create the test database "openresty_org" and the test account "openresty" in your local PostgreSQL server.
# using commands in the initial comment lines of the init.sql file.
# for example:
psql -Upostgres    # or "psql postgres", depending on your Pg installation
# postgres=# create user openresty with password 'speedtheweb';
# postgres=# create database openresty_org;
# postgres=# grant all privileges on database openresty_org to openresty;

make initdb   # create the database and load the data files
make run      # starting the test nginx server listened on localhost:8080
make reload   # for reloading the test nginx server

If your machine has more than one spare CPU cores, then you can specify the -jN option of make to build the HTML docs in parallel, as in

make gendata -j8

This command will run the build in 8 parallel jobs, thus utilizing 8 CPU cores at most.

If you want to re-generate the openresty_org.templates Lua module from the TT2 template files under templates/, then you need to install the Lemplate CPAN module like this:

sudo cpan Lemplate

and then just run

make

The .po files under po/ are for I18N (we need to support both the English and Chinese versions of this site, at least). These files are similar to the .po files used by the classic GNU gettext toolchain, but we do not use GNU gettext at all. Our .po files would be automatically updated according to the latest Lua source and TT2 template files with this command as well. If you make any edits to the .po files, then remember to re-run the make command to make your changes take effect (by updating the openresty_org.i18n Lua module file from the .po files).

If you want to update the list of blog posts, then you need to run:

make auto-templates

This command also downloads images from our blog site, compress these images and save them to /v2/images/header-images.

TODO

  • Add responsive design to the web page templates for mobile devices with small screens.
  • Add a in-memory caching layer to the openresty_org web app via lua-resty-lrucache and/or lua_shared_dict.
  • Translate more English .md documents into Chinese.
  • Add a pager to the search result page in the openresty_org web app.
  • Add an RSS feed endpoint in the openresty_org web app.
  • Add another tab page to the right-hand side-bar of the web pages featuring the top N hot pages.
  • Add an OpenResty logo to the web page header.
  • Remove the dependency on pandoc by migrating to a standalone Perl script.

Back to TOC

Credit

  • Thanks Mashape.com for contributing the page templates for the v2 version of this site.
  • Thanks leaf corcoran for contributing the pgmoon library for communicating with PostgreSQL via cosockets.

Back to TOC

Author

Yichun Zhang (agentzh) <[email protected]>

Back to TOC

Copyright and License

This module is licensed under the BSD license.

Copyright (C) 2011-2017 by Yichun "agentzh" Zhang (章亦春) <[email protected]>, OpenResty Inc.

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Back to TOC

See Also

Back to TOC

openresty.org's People

Contributors

agentzh avatar bambooom avatar daenikon avatar detailyang avatar doujiang24 avatar github-actions[bot] avatar ingydotnet avatar jiguorui avatar jinfei avatar judithpatudith avatar kindy avatar laserhenry avatar liwang2019 avatar lynch1981 avatar meathill avatar mkusaka avatar moonming avatar ooyuanoo avatar saintak avatar selboo avatar sjnam avatar spacewander avatar susan51531 avatar thibaultcha avatar tokers avatar tst2005 avatar warmchang avatar xiaocang avatar ycmove avatar zhuizhuhaomeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openresty.org's Issues

Add information to the GPG key

To verify the download with the PGP signature the public key of 'A0E98066' is needed. I found the following script that is importing the key to the GPG keyring.

On the website there is no information about the public key A0E98066 shared via keyserver at pgpkeys.mit.edu.
Please add a note about the key and the keyserver.

Rsync endpoint for http://openresty.org/package/

@ZenithalHourlyRate, as the maintainer of TUNA mirrors, reported a syncing issue in #200. Although this issue has been resolved, it would still be very helpful to provide an rsync endpoint for open-source mirror sites, as it could help:

  • Reduce redundant requests and file transmission through network, and saves disk space of downstream, as many files (directories) are actually symlinks.
  • Keep the integrity of synced packages better. I'm not sure whether openresty packages are behind CDN, but as far as I know the file listing by CDN may not be updated and thus HTTP-based syncing programs (lftp, etc.) cannot get a full list of packages and metadata files and bring users trouble.

I'm also the maintainer of one of the downstream mirrors of openresty (also we're users of openresty actually!). After a discussion with @ZenithalHourlyRate, we think that I should open up a new issue to follow up the progress, as the original issue #200 is closed now.

rewrite_by_lua_no_postpone not working in server context

Hi,
I am using rewrite_by_lua directive within server context followed by a nginx rewrite directive. I have rewrite_by_lua_no_postpone on in the http context.

Example conf:


server{
...
rewrite_by_lua_file lua/test.lua;
rewrite ^/test/(.*)$ /test1/$1 break;
...
}

However, in the server rewrite phase, nginx is evaluating the rewrite directive first and not the rewrite_by_lua directive which is unexpected as I have disabled lua rewrite postpone by setting rewrite_by_lua_no_postpone to on.

In fact, to my surprise, the rewrite_by_lua directive gets evaluated after matching all the location handlers. The same configuration works fine in the location context.

How can I ensure that rewrite_by_lua gets evaluated before any rewrite and location handlers.

OpenResty China 2016 Conference: Call for Conference Proposals

The OpenResty China 2016 Conference will be held on Dec. 10 in Shenzhen, China.

The Conference Organizing Committee is currently accepting proposals for the OpenResty China 2016 conference. If you want to submit a proposal ,please send an email to [email protected] with your proposal's detail.

Before submitting a proposal, please review the submission and speaker requirements below.

Presentation Criteria:

  • Should be 40 minutes in length and limited to one speaker
  • Can be in either English or Mandarin
  • Must be associated with the OpenResty technology stack
  • Not accept any form of ad content

Welcome to the OpenResty party!

Change location of log files

Hi,

I just installed openresty with the prefix '--prefix=/home/me/apps/nginx'. Although I'd like to have nginx in that location I'd like to have my log files in separate location. I've updated my config so my error & access logs are in the '/home/me/mylogs/' folder. Now, when I run the server I have 2 sets of logs; one in my preferred location and the other in '/home/me/apps/nginx/log'. How do I turn off the default log location?

你好,我在安装openresty后使用redis

My system is ubuntu14.04
apt-get install libreadline-dev libpcre3-dev libssl-dev perl build-essential
I installed these options
./configure --prefix=/opt/openresty
--without-http_redis2_module
--without-http_redis_module
--without-lua_resty_redis
--without-lua_cjson
--with-http_iconv_module
--without-http_set_misc_module
The installation process without any problems,Nginx is running normally,Can parse lua
But can't identify redis2
unknown directive "redis2_query"
On the Internet looking for a long time didn't find the solution,Redis can run normally
I install ngx_openresty-1.7.4.1

openresty.org DNS issues (dnspod.com)

Over the past couple day's I've been experiencing intermittent problems when trying to download the openresty-1.9.15.1.tar.gz package. The problem seems to be that my DNS sometimes can't resolve the openresty.org domain name. After running a few tests, I'm also seeing DNS resolution errors or slowness from other internet connections, so I don't think it's just me.

It looks like the issue is likely on the end of the nameservers openresty.org uses (dnspod.com), so this might not be in your control. But since I believe I've been seeing these DNS issues for the past couple days, I thought I'd let you know.

Here's a couple example results from external DNS checkers:

https://www.ultratools.com/tools/dnsLookup: Timeout
screen shot 2016-06-14 at 10 09 06 am

http://mxtoolbox.com/DNSLookup.aspx: Succeeds, but took 20 seconds
screen shot 2016-06-14 at 10 03 40 am

bad HTML content in file html/en/debugging.html

I try make gendata 47c89a1

 make gendata
.....


pandoc --from markdown_github-hard_line_breaks --to plain cn/memc-nginx-module.md --output text/cn/memc-nginx-module.txt
mkdir -p text/en text/cn
pandoc --from markdown_github-hard_line_breaks --to plain cn/yichun-zhang.md --output text/cn/yichun-zhang.txt
./util/gen-data.pl en
bad HTML content in file html/en/debugging.html at ./util/gen-data.pl line 47.
Makefile:74: recipe for target 'posts-en.tsv' failed
make: *** [posts-en.tsv] Error 255

more infor

NAME="openSUSE Leap"
VERSION="42.1"
VERSION_ID="42.1"
PRETTY_NAME="openSUSE Leap 42.1 (x86_64)"
ID=opensuse
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:opensuse:42.1"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://opensuse.org/"
ID_LIKE="suse"



pandoc --version
pandoc 1.15.0.6
Compiled with texmath 0.8.3, highlighting-kate 0.6.
Syntax highlighting is supported for the following languages:
    abc, actionscript, ada, agda, apache, asn1, asp, awk, bash, bibtex, boo, c,
    changelog, clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css,
    curry, d, diff, djangotemplate, dockerfile, dot, doxygen, doxygenlua, dtd,
    eiffel, email, erlang, fasm, fortran, fsharp, gcc, glsl, gnuassembler, go,
    haskell, haxe, html, idris, ini, isocpp, java, javadoc, javascript, json,
    jsp, julia, kotlin, latex, lex, lilypond, literatecurry, literatehaskell,
    lua, m4, makefile, mandoc, markdown, mathematica, matlab, maxima, mediawiki,
    metafont, mips, modelines, modula2, modula3, monobasic, nasm, noweb,
    objectivec, objectivecpp, ocaml, octave, opencl, pascal, perl, php, pike,
    postscript, prolog, pure, python, r, relaxng, relaxngcompact, rest, rhtml,
    roff, rpmspec, ruby, rust, scala, scheme, sci, sed, sgml, sql, sqlmysql,
    sqlpostgresql, tcl, tcsh, texinfo, verilog, vhdl, xml, xorg, xslt, xul,
    yacc, yaml, zsh
Default user data directory: /home/mingjunyang/.pandoc
Copyright (C) 2006-2015 John MacFarlane
Web:  http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.

Unzip the office source code with user Information.

When I unzip tar.gz which download from official site, The office tar.gz package packs the user information into this tar.gz package.which useId was 1000 and usergroupId was 1003.
Vision number was openresty/1.15.8.1

HTTP protocol errors from website

When I load https://openresty.org/en/ in Firefox, I get a connection error.

image

Perhaps related, package installations using opm are also failing with HTTP2 protocol errors.

$ docker run openresty/openresty:1.15.8.3-0-buster-fat sh -c \                                                                 130 ↵
  "curl -sS -i -A 'opm 0.0.5 (x86_64-linux-gnu-thread-multi, perl v5.28.1)' \
  'https://opm.openresty.org/api/pkg/fetch?account=cdbattags&name=lua-resty-jwt&op=&version='"
curl: (92) HTTP/2 stream 0 was not closed cleanly: INTERNAL_ERROR (err 2)
HTTP/2 302 
date: Thu, 02 Apr 2020 16:58:05 GMT
content-type: text/html
content-length: 158
set-cookie: userid=00000a00000421e4fce8204c; Expires=Fri, 02-Apr-21 16:58:05 GMT; Max-Age=31536000; Domain=openresty.org
x-file-checksum: 9e7cd1b7-d4b0-b7f3-258d-4208c20f9d7a
location: /api/pkg/tarball/cdbattags/lua-resty-jwt-0.2.0.opm.tar.gz
expires: Thu, 02 Apr 2020 17:01:05 GMT
cache-control: max-age=180
server: OpenResty Edge 2
req-id: 00000a00000421e4fce8204c
edge-cache-age: 22444
cache-status: EXPIRED

Search bar disappears when interacting with site

I don't find this intuitive. When I first arrived on the site and clicked around, I wasn't able to find a search feature. Why not have it show permanently? If screen space is a concern, move the search field the right of the openresty logo.

search.mp4

Firefox 114

Is Redis Connection too Frequent ?

In the nginx config file I have the following code, for the location where the $request_uri matched,I connect the redis and query the value of the key.The code bellow can work correct,But I think the code has some shortcomings:every time I must reconnect the redis server,I think the redis server will bear great pressure.Is there other good solution for that?

  location ~* /(\w+\/\w+) {
    set $qstring $1;
    access_by_lua '
      local redis = require "resty.redis"
      local red = redis:new()
      red:connect("127.0.0.1", 6379)
      red:set_timeout(1000)
      ok, err = red:hget("repo:" .. ngx.var.qstring .. ".git", "m")
      if ok and ok ~= ngx.null then
        return ngx.redirect("http://" .. ok .. ngx.var.request_uri)
      end
    ';
    try_files $request_uri $uri @project_name;
  }

Specify more GPG key bits — otherwise the key can be faked? Someone already did

On the website, https://openresty.org/en/download.html, there's this:

Source Code Releases
All the releases are signed by the public PGP key A0E98066 of Yichun Zhang.

That's 32 bits to identify a key — and that's a bit few bits; others can generate fake keys with the same last 32 bits.

In fact, someone did:

$ gpg --keyserver keyserver.ubuntu.com --keyserver-options timeout=10 --recv-key A0E98066
gpg: key A84A5A40A0E98066: public key "Totally Legit Signing Key <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1

As you can see, someone has generated a fake key that ends with A0E98066.

(That's Ubuntu's keyserver, which I tried, when MIT didn't work; they're supposed to be in sync with each other I think?)

What do you think about specifying the full key ID on the website, or the last 64 bits?

There's an old issue and merged PR related to that,
issue: #30 "Add information to the GPG key"
PR: #32 "Add information about public key to verify release files"

but somehow the changes in the PR seems to have gotten lost during the years. Anyway, in the PR, I see that the last 64 bits of the key are: 0xB550E09EA0E98066

openresty.org/package/ contains unaccessible file

Hi, we are downstream mirror of openresty. We use lftp to sync https://openresty.org/package/ to our site, the script could be found here.

Recently all the mirror sites using this script failed to sync from you. After investigation, it turned out that you have put unaccessible files under package directory, more specifically, all these excluded file below

lftp "https://openresty.org/package/" -e "mirror --verbose --skip-noaccess -P 5 --delete --only-newer --exclude=centos/7/2 --exclude=oracle/7/2 --exclude=rhel/7/2 --exclude=centos/7Client/2 --exclude=centos/7Server/2 --exclude=centos/8/8 --exclude=rocky/8/8 --exclude=alinux/2/2 --exclude=alinux/2.1903/2 --exclude=alinux/3/8; bye"

The problem is that 25 days ago (13-May-2022) you created a unaccessible file named 8 in https://openresty.org/package/centos/8/. Later a file named 2 was also created in https://openresty.org/package/centos/7/ on 25-May-2022.

Could you please remove these unnecessary files?

Also, we note that many directories are just symbol links, could you provide rsync service such that we can sync these symbol links instead of duplicating them for each directory. In that way we can save disk spaces (currently the whole openresty takes ~45G)

Also, you could use mirror site to distribute your software, like adding these mirror sites in openresty.org and redirecting traffics to them. We have also provided a redirection service for some mirror sites in https://mirrors.cernet.edu.cn/openresty so you could use it.

mailing list does not work

http://openresty.org/en/community.html :

"Subscribing: send an empty email to [email protected]"

Delivery to the following recipient failed permanently:

     [email protected]

Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the server for the recipient domain googlegroups.com by gmr-smtp-in.l.google.com. [2a00:1450:400c:c07::e].

The error that the other server returned was:
550-5.1.1 The email account that you tried to reach does not exist. Please try
550-5.1.1 double-checking the recipient's email address for typos or
550-5.1.1 unnecessary spaces. Learn more at
550 5.1.1  https://support.google.com/mail/answer/6596 p199si1481526wmd.1 - gsmtp

ngx.worker.id () is always 0 on windows

openresty version 1.19.3.1
nginx.conf worker_processes 4;
init_worker_by_lua_file resty_test/init.lua;
init.lua
ngx.log(ngx.ERR, "init worker: ",ngx.worker.id()) -- It's ngx.worker.id() always zero here

Please do not block User-Agent: Python-urllib

i'm getting 403 with python urllib and urllib2:

   >>> urllib2.urlopen('https://openresty.org/download/ngx_openresty-1.9.3.1.tar.gz').code
   Traceback (most recent call last):
   ...
   urllib2.HTTPError: HTTP Error 403: Forbidden

if i pass no User-Agent or a custom User-Agent everything is fine:

   >>> opener = urllib2.build_opener()
   >>> opener.addheaders = [('User-agent', 'Mozilla/5.0')]
   >>> opener.open('https://openresty.org/download/ngx_openresty-1.9.3.1.tar.gz').code
   200

   >>> opener = urllib2.build_opener()
   >>> opener.addheaders = []
   >>> opener.open('https://openresty.org/download/ngx_openresty-1.9.3.1.tar.gz').code
   200

Using "Python-urllib" as User-Agent results in 403, independently of any following python version ("Python-urllib", "Python-urllib/2.7", "Python-urllib/3.4"). I've also seen that some potential bots are blocked as well. For example "EmailSiphon" and "autoemailspider". So i assume "Python-urllib" is on that list as well.

Could you please remove Python-urllib from that list? Otherwise good-natured python clients like zc.buildout are not able to download openresty.

openresty see .css/.js as lua file

Hi. Lua module tries to enterpretate all css/js files as lua fies.

*95 failed to load external Lua file "/usr/local/openresty/nginx/html/mysite/themes/default/js/jquery-1.10.2.min.js":

My config

location ~^/mysite/(.+) {
default_type text/html;
lua_need_request_body on;
lua_code_cache off;
content_by_lua_file html/mysite/$1;
index index.lua index.lp;
}
location ~* ^.+.(?:css|eot|js|json|png|svg|ttf|woff)$ { }

openresty.org apex CNAME?

I'm unable to browse to openresty.org due to a DNS failure. It looks like openresty.org has a top-level CNAME defined:

openresty.org. 3600 IN CNAME openresty-org-635249771.ap-southeast-1.elb.amazonaws.com.

See http://serverfault.com/a/613830/9470 for details on why this is prohibited.

incorrect yum repo directory name

On the website (http://openresty.org/en/linux-packages.html) the baseurl is the following line: baseurl=https://copr-be.cloud.fedoraproject.org/results/openresty/openresty/epel-$releasever-$basearch/

On RHEL Server, the $releasever variable expands to 7Server or 7Client (if using version 7). However, the actual yum repo at that url is only epel-7-x86_64/ and not epel-7Server-x86_64/. This means that the yum repo does not actually work when specifying $releasever in the baseurl.

FIX: please make links named "epel--" to the epel-- directory on the yum repo. For example, create a link named "epel-7Server-x86_64" to "epel-7-x86_64" on the yum repo. Thanks.

The repo in CentOS 8+ is error

If your OS version is CentOS 8+, you should use the new repo in the link: https://openresty.org/package/pubkey2.gpg , not in https://openresty.org/package/pubkey.gpg.

If you use the second one, you'll receive the error like this

The GPG keys listed for the "Official OpenResty Open Source Repository for CentOS" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.. Failing package is: openresty-1.21.4.2-1.el9.x86_64
 GPG Keys are configured as: https://openresty.org/package/pubkey.gpg

Wish to fix this bug in website.

apt keyring changed with Debian 12

I recently updates to Debian 12. This message appears while doing an apt update:

W: http://openresty.org/package/debian/dists/bookworm/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

There referenced man 8 apt-key suggests:

wget -O - https://openresty.org/package/pubkey.gpg | sudo tee /etc/apt/trusted.gpg.d/openresty.asc

I can very that this is working. 🟢

The reference is here: https://github.com/openresty/openresty.org/blob/master/v2/en/linux-packages.md?plain=1#L259

I don't know how far back this change to apt happened, so I would suggest a split for the Debian section in For Debian <= 11 and For Debian 12 or above (just as with ubuntu).

https://qa.openresty.org - Cloudflare HTTPS error

tlserrcloudflare

Important part:

The SSL certificate presented by the server did not pass validation. This could indicate an expired SSL certificate or a certificate that does not include the requested domain name. Please contact your hosting provider to ensure that an up-to-date and valid SSL certificate issued by a Certificate Authority is configured for this domain name on the origin server. Additional troubleshooting information here.

nginx proxy_cache_methods doesn't work

Hi,
I'm try use nginx proxy_cache for caching large file. The following is my idea:

 Browser --> Nginx --> Storage
  • Nginx is a function of caching and proxy server.
  • Storage is contain files server.
  • I'm have used ngx.var.upstream_cache_status to determine the status of the HIT file caching but it does'n work, nil value. Then I found this: openresty/lua-nginx-module#125 . I would caching file with only GET method and use HEAD method is checked file caching done(HIT) but proxy_cache_methods doesn't work, proxy_method also. I'm try request from Browser with HEAD, GET method then nginx proxy pass to Storage server with GET methods, I do not understand what the reason.

attempt to call field 'say' (a nil value)

follower this find error :
https://openresty.org/cn/using-luarocks.html

ERROR:

tail -f /usr/local/openresty/nginx/logs/error.log


2019/11/04 18:31:48 [error] 2028#2028: *2 lua entry thread aborted: runtime error: content_by_lua(nginx.conf:68):3: attempt to call field 'say' (a nil value)
stack traceback:
coroutine 0:
	content_by_lua(nginx.conf:68): in main chunk, client: 127.0.0.1, server: localhost, request: "GET /luarocks HTTP/1.1", host: "localhost"


nginx.conf

    64	        location = /luarocks {
    65	            content_by_lua '
    66	                local foo = require("foo")
    67	                foo.say("hello, luarocks!")
    68	            ';
    69	        }
    70	

bad HTML content in file html/en/download.html

I'm new to nginx and OpenRestry.
Now i'm try make gendata

./util/gen-data.pl en
en/changelog-1009007: key @modifier not found. parsing git meta...
en/changelog-1009007: key @Modified not found. parsing git meta...
en/changelog-1009007: key @changes not found. parsing git meta...
en/changelog-1009015: key @modifier not found. parsing git meta...
en/changelog-1009015: key @Modified not found. parsing git meta...
en/changelog-1009015: key @changes not found. parsing git meta...
en/changelog-1011002: key @Creator not found. parsing git meta...
en/changelog-1011002: key @created not found. parsing git meta...
en/changelog-1011002: key @modifier not found. parsing git meta...
en/changelog-1011002: key @Modified not found. parsing git meta...
en/changelog-1011002: key @changes not found. parsing git meta...
en/changes: key @modifier not found. parsing git meta...
en/changes: key @Modified not found. parsing git meta...
en/changes: key @changes not found. parsing git meta...
en/community: key @modifier not found. parsing git meta...
en/community: key @Modified not found. parsing git meta...
en/community: key @changes not found. parsing git meta...
en/components: key @modifier not found. parsing git meta...
en/components: key @Modified not found. parsing git meta...
en/components: key @changes not found. parsing git meta...
en/donors: key @modifier not found. parsing git meta...
en/donors: key @Modified not found. parsing git meta...
en/donors: key @changes not found. parsing git meta...
bad HTML content in file html/en/download.html at ./util/gen-data.pl line 69.
make: *** [posts-en.tsv] Error 255

my info
NAME = mac OS Sierra
VERSION = 10.12.1

tpage is come from "sudo cpan Template"
version = Template Toolkit Version 2.26

pandoc --version
pandoc 1.19
Compiled with pandoc-types 1.17.0.4, texmath 0.9, highlighting-kate 0.6.3
Default user data directory: /Users/shencheng/.pandoc
Copyright (C) 2006-2016 John MacFarlane
Web: http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.

I have seen the #24.
My html/en/download.html is empty.
@lyqscmy I try to remove the entire directory html and make gendata again , but it doesn't work.

Can't I run sanity tests on openresty ?

Hi,
Earlier I could install and run sanity test cases on OpeenResty downloaded from github . Now I have installed Openresty latest version from tar ball provided in openresty website and could able to check few use cases of Openresty and nginx. Can we execute any other test cases to make sure that OpenResty functionality is correct ?

failed to load external Lua file

I am using mac os, with openresty 1.9.3.2

The issue I met is similar to:
http://stackoverflow.com/questions/28087228/openresty-content-by-lua-file

The server cannot load external Lua script:
2015/11/30 21:03:06 [error] 61190#0: *1 failed to load external Lua file "/Users/wangxu/Documents/work/tms/dev/tms/lua/req.lua": cannot open /Users/wangxu/Documents/work/tms/dev/tms/lua/req.lua: Permission denied, client: 127.0.0.1, server: , request: "GET /v1/p HTTP/1.1", host: "127.0.0.1"

However If I copy the lua file into /tmp and use
content_by_lua_file "/tmp/req.lua";

Everything is OK.

I checked the path, the permissions.. they are all correct.

Doc: Add a link to OpenResty rpm repo?

I open the issue here because I consider it is a question about documentation instead of package.

It would be welcome that there is a link to OpenResty's rpm repo description file.
For instance, store OpenResty.repo file under a url like https://reliable.website/OpenResty.repo.

Instead of copy & distribute, the users are able to run sudo yum-config-manager --add-repo https://reliable.website/OpenResty.repo directly to add the repo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.