リソースを見つけるために115ネットワークディスク

リソースを見つけるために115ネットワークディスク

[永久コア顧客サービス:5828 ZU 0650]█
永久顧客[コア:4058 ZU 3626]█

まず、準備

  1. インストールOpenRestyダウンロードする公式サイトの詳細は、ドキュメントをインストール

  2. インストールIDEA同時に、以下のプラグインをインストール
    • 取ります
    • nginxのサポート
    • OpenResty Luaのサポート

第二に、作成および設定プロジェクト

      1. luademo1というファイルを作成Luaプロジェクトを


      2. 作成confsrcカタログ、および追加nginx.confbuild.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、実際のインストールディレクトリ

      3. 以下のための構成nginxのサーバー、IDEAスタートアップnginx





      4. 設定済みAnt Buildのためconf、そしてsrcファイルをにコピーされOpenResty、指定したディレクトリ・パスのインストール
        • 右のbuild.xmlファイルを選択Add as Ant Build File

        • クリックAntRunいくつかの実装

        Ant依存JDK環境、プロジェクトJDKのバージョン、場所JDK1.8に指定されているので、どのような

        再び実行AntOpenRestyのファイルのインストールディレクトリを見ては、コピーされています

        • 開始するように設定Nginx Serverする前に実行するAntファイルコピーの実装


      5. 設定のnginx.conf強調表示され、ファイル- >設定- > Editorの>ファイルの種類、 選択しNginx Configた後に追加します。nginx*.conf

        配置前:

おすすめ

転載: www.cnblogs.com/115vip/p/12434722.html