Nginx startup prompt port 80 is occupied by other services (Apache and Tomcat)

Source: Internet
Author: User
: This article mainly introduces the Nginx startup prompt that port 80 is occupied by other services (Apache and Tomcat). If you are interested in the PHP Tutorial, refer to it. Problem:

When Nginx is started, port 80 is prompted to be in use and thus cannot be started.

Description analysis:

After Nginx1.6.2 is installed on CentOS where Apache (listening for non-port 80) and Tomcat (listening for port 80) are installed, the system prompts that port 80 is in use and the service cannot be started. But check nginx. after conf, it is found that the listen of each server is not 80. In addition, you can see the welcome page after stopping tomact and then starting nginx. This indicates that nginx should listen to port 80 somewhere, and return to the welco page. This problem is clarified. find the configuration file for listening to port 80, modify it to a non-port 80, or comment out its response.

Solution:

View the configuration directories in the nginx installation directory. first, view the default configuration directories, such as conf. the conf file with the default character under the d Directory. mine is conf. d. default. in the conf file, the default configuration of nginx is displayed, including the welcome page displayed when nginx is started. modify port 80 to another port, for example, 82, save and then start nginx.

The above introduces the Nginx startup prompt that port 80 is occupied by other services (Apache and Tomcat), including content, and hope to be helpful to friends who are interested in PHP tutorials.

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.