OpenResty入门
来源:互联网 发布:unreal 源码分析 编辑:程序博客网 时间:2024/06/05 00:11
转载:
https://openresty.org/cn/linux-packages.html
安装
CentOS
sudo yum install yum-utilssudo yum-config-manager --add-repo https://openresty.org/package/centos/openresty.reposudo yum install openresty-resty列出所有 openresty 仓库里头的软件包:sudo yum --disablerepo="*" --enablerepo="openresty" list available
HelloWorld
mkdir ~/workcd ~/workmkdir logs/ conf/
Prepare the nginx.conf config file
Create a simple plain text file named conf/nginx.conf with the following contents in it:
worker_processes 1;error_log logs/error.log;events { worker_connections 1024;}http { server { listen 8080; location / { default_type text/html; content_by_lua ' ngx.say("<p>hello, world</p>") '; } }}
Start the Nginx server
PATH=/usr/local/openresty/nginx/sbin:$PATHexport PATHThen we start the nginx server with our config file this way:nginx -p `pwd`/ -c conf/nginx.conf
Access our HelloWorld web service
curl http://localhost:8080/If everything is okay, we should get the output<p>hello, world</p>
阅读全文
0 0
- OpenResty入门
- OpenResty入门
- openresty 开发入门
- openResty入门-安装编
- openresty 前端开发入门一
- openresty 前端开发入门二
- OpenResty(nginx+lua) 开发入门
- OpenResty(Nginx+Lua)开发入门
- openresty
- OpenResty
- openresty
- openresty
- openresty
- 第二章 OpenResty(Nginx+Lua)开发入门
- openresty 前端开发入门三之JSON篇
- openresty 前端开发入门四之Redis篇
- openresty 前端开发入门五之Mysql篇
- openresty 前端开发入门六之调试篇
- python+opencv+caffe+摄像头做目标检测
- jdk多版本共存配置(jdk1.8也会对其有影响)
- HDU 2546-饭卡(01背包)
- JavaScript闭包案例
- 2017暑假集训小结
- OpenResty入门
- rocketmq 安装配置出现NoClassDefFoundError的问题
- Treap树堆的基本模板(无讲解)
- B
- HDU 6108 小C的倍数问题 (数论 2017百度之星初赛A第1题)
- xcode 删除复制某一行 快捷键
- 《高质量 C++/C 编程指南 》阅读笔记(三)
- Tomcat出现Unloading class sun.reflect.GeneratedMethodAccessor216]解决方案
- 关于STL的一些笔记