标签:Ant log nginx 云盘 115 lua conf 微信 OpenResty
买115云盘资源微信多少
永久客服【芯:5828つ0650】█
永久客服【芯:4058つ3626】█
一、前期准备
二、创建并配置项目
-
创建一个名为luademo1的
Lua
项目 -
创建
conf
、src
目录,并添加nginx.conf
、build.xml
和helloworld.lua
文件-
nginx.conf
文件worker_processes 1; error_log logs/error.log info; events { worker_connections 1024; } http { default_type application/octet-stream; access_log logs/access.log; lua_package_path 'luademo1/?.lua;;'; server { listen 8080; server_name localhost; default_type text/html; location = /favicon.ico { log_not_found off; access_log off; } location /test { content_by_lua_file luademo1/helloworld.lua; } } }
-
helloworld.lua
文件local hello = function () ngx.say("Hello world,Lua!") end hello()
-
build.xml
文件<?xml version="1.0" encoding="UTF-8"?> <project name="luademo1" default="dist" basedir="."> <description> run pic-server </description> <!-- set global properties for this build --> <property name="openresty-home" location="D:\openresty-1.15.8.2-win64"/> <property name="conf" location="${basedir}/conf"/> <property name="src" location="${basedir}/src"/> <property name="target-conf" location="${openresty-home}/conf"/> <property name="target-src" location="${openresty-home}/${ant.project.name}"/> <echo>######开发版本的ant配置#####</echo> <target name="clean" depends=""> <echo>清理openresty目录${dist}下的conf,logs,janus,januslib</echo> <delete dir="${target-conf}"/> <delete dir="${target-src}"/> <delete> <fileset dir="${openresty-home}/logs" includes="*.log"> </fileset> </delete> </target> <target name="init" depends="clean"> <echo>创建安装目录</echo> <mkdir dir="${target-conf}"/> <mkdir dir="${target-src}"/> </target> <target name="dist" depends="init" description="generate the distribution" > <echo>复制安装文件</echo> <copy todir="${target-conf}"> <fileset dir="${conf}"></fileset> </copy> <copy todir="${target-src}"> <fileset dir="${src}"></fileset> </copy> </target> </project>
其中
build.xml
文件中的D:\openresty-1.15.8.2-win64
一定要换成OpenResty
的真实安装目录
-
-
配置nginx server,用于在
IDEA
中启动nginx
- 配置
Ant Build
,用于将conf
和src
中的文件拷贝到OpenResty
安装目录下的指定路径-
右键
build.xml
文件,选中Add as Ant Build File
-
点击
Ant
中的Run
执行一下
Ant
依赖JDK环境,因此在项目中指定一下JDK版本,这里选址JDK1.8再次运行
Ant
,在OpenResty
安装目录下看到文件已经拷贝过来了- 设置启动
Nginx Server
前先运行Ant
执行文件拷贝
-
-
配置
nginx.conf
高亮,File->Settings->Editor->File Types,选中Nginx Config
后添加nginx*.conf
配置前:
标签:Ant,log,nginx,云盘,115,lua,conf,微信,OpenResty 来源: https://www.cnblogs.com/115vip/p/12434283.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。