Nginx+lua Study notes-Environment building

Source: Internet
Author: User

Use of Openresty

For specific tutorials, refer to: http://jinnianshilongnian.iteye.com/blog/2186270

This is just a record of my own environmental build-up process.

The system is using Ubuntu-14.04.1-server-amd64.iso

All operations are using the sudo right ...

First refer to http://blog.chinaunix.net/uid-8721861-id-2017178.html solution apt-get Install media change:please Insert the disc Labeled's question:

In the/etc/apt/sources.list file, comment out the CDROM line, and then execute the apt-get update under the Deb repository

And then

    1. Apt-get Install Libreadline-dev libncurses5-dev libpcre3-dev Libssl-dev perl

Later through wget to http://openresty.org/download the latest version, and then unzip.

After sudo mkdir/usr/servers and sudo mkdir/usr/lua

Then unzip the openresty directory to execute ./configure--prefix=/usr/servers, then sudo make && make install.

During the absence of make, the sudo apt-get install make is executed first.

And then to the/usr/servers directory.

In Nginx to find the Nginx conf file, first the errorlog comments removed, and then the location of the section to change as shown

Then go to/usr/lua under the new A.lua, enter the following content

After saving, switch to Nginx's sbin directory to execute sudo./nginx

The native IP is 192.168.1.105 so:

Visit http://192.168.1.105/See Hello,this is from Lua

Visit Http://192.168.1.105/lua See from Lua

OK, here the environment is basically set up, the subsequent need to learn LUA grammar and how to operate Redis

Nginx+lua Study notes-Environment building

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.