{ title: "Test `nginx.conf` Directives (subtitle: With MoonScript, OpenResty, and Busted)" } $index ## Introduction We'll need nginx and luarocks. Buildpack has luarocks installed. ```console $ docker pull openresty/openresty:bookworm-buildpack ``` Start a server on `localhost`: ```console $ docker run --rm -it -p 80:80 openresty/openresty:bookworm-buildpack ``` Visit `localhost` in browser. Should see OpenResty splash page.  [Prepare directory layout](ehttps://openresty.org/en/getting-started.html#prepare-directory-layout) ```console $ mkdir -p logs/ conf/conf.d/ html/ ``` [Copy config file](https://github.com/openresty/docker-openresty?tab=readme-ov-file#nginx-config-files) ```console $ docker run --rm -it -w /opt -v $PWD:/opt openresty/openresty:bookworm-buildpack \ cp /etc/nginx/conf.d/default.conf /opt/conf.d/ ``` edit default.conf change `root /usr/local/openresty/nginx/html;` to: root /var/www; `html/index.html` ```html