Installation of Nginx under "Linux" Ubuntu and solutions to common problems __linux

Source: Internet
Author: User
1. Download the source package to Nginx website.
2. Install nginx Dependency Pack Run command: sudo apt-get install Libssl-dev

sudo apt-get install libpcre3 libpcre3-dev

3. Extract the downloaded Nginx source package. Check the compilation Environment command as follows: enter Nginx directory: #./configure--prefix=/usr/local/nginx


4. Compile and install, command as follows: make


Make Install

5. To the Nginx installation directory execution launch command:/usr/local/nginx/sbin/nginx Close command:/usr/local/sbin/nginx-s Stop (stop)
Reboot command:/usr/local/sbin/nginx-s reload (reboot)
after startup http://localhost/see if the browser is successful. 6. Sometimes restart Nginx use./nginx-s Reload to re-read the configuration file, discover the report nginx: [ERROR] Open () "/usr/local/nginx/logs/nginx.pid" failed (2:no such file or directory) error, the logs file found that there is indeed no nginx.pid solution: root@alice-vostro-3800:/usr/local/nginx/ sbin#./nginx-c/usr/local/nginx/conf/nginx.conf uses nginx-c parameters to specify the location of the nginx.conf file, which solves the problem.




 
by Alice



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.