+ You did it! Nginx is running using
+
+
+ Enjoy this incredible achievement with us! 😊
+diff --git a/README.md b/README.md index c3fd1e50e..3e7e3000d 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ format defined by the WebAssembly reference interpreter (`.wat`). Once installed, you will be able to run: ```sh -wasmer run nginx.wasm +wasmer run examples/nginx/nginx.wasm -- -p examples/nginx -c nginx.conf ``` ## Building & Running diff --git a/examples/nginx/.gitignore b/examples/nginx/.gitignore new file mode 100644 index 000000000..e46878d35 --- /dev/null +++ b/examples/nginx/.gitignore @@ -0,0 +1 @@ +*_temp diff --git a/examples/nginx/html/index.html b/examples/nginx/html/index.html new file mode 100644 index 000000000..3bf59b84a --- /dev/null +++ b/examples/nginx/html/index.html @@ -0,0 +1,36 @@ + +
+ + + + + + + + diff --git a/examples/nginx/html/wasmer-logo.png b/examples/nginx/html/wasmer-logo.png new file mode 100644 index 000000000..cfc26f6d0 Binary files /dev/null and b/examples/nginx/html/wasmer-logo.png differ diff --git a/examples/nginx/logs/nginx.pid b/examples/nginx/logs/nginx.pid new file mode 100644 index 000000000..e69de29bb diff --git a/examples/nginx/nginx.conf b/examples/nginx/nginx.conf new file mode 100644 index 000000000..d44d2569b --- /dev/null +++ b/examples/nginx/nginx.conf @@ -0,0 +1,24 @@ +events { +} + +# We need this for now, as we want to run nginx as a worker +daemon off; +master_process off; + +# We show the errors and info in stderr +error_log /dev/stderr info; + +http { + # We show access in the stdout + access_log /dev/stdout; + server { + listen 8080; + server_name _; + + location / { + # IMPORTANT: Replace the dir with the one you want to serve (that have an index.html file) + root ./html/; + index index.html; + } + } +} diff --git a/examples/nginx.wasm b/examples/nginx/nginx.wasm similarity index 100% rename from examples/nginx.wasm rename to examples/nginx/nginx.wasm