Solve the problem of "Welcome to nginx on Fedora!" after installing nginx on Centos7, and there is no default.conf file in the conf.d directory

Solve the problem of "Welcome to nginx on Fedora!" after installing nginx on Centos7, and there is no default.conf file in the conf.d directory

Problem Description

Install nginx on Tencent Cloud CentOS7

sudo yum install nginx

Open the default web page display

Welcome to nginx on Fedora!

and

/etc/nginx/conf.d

There is no default.conf file in the directory

reason

The default download source of Tencent Cloud's epel is Fedora's

Workaround

•Preparation

sudo yum install yum-utils

• Create nginx.repo file

sudo vim /etc/yum.repos.d/nginx.repo

And add the following

[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key

[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key

• Install nginx

sudo yum install nginx

Reference Links:

http://nginx.org/en/linux_packages.html

Summarize

The above is what I introduced to you. After installing nginx on Centos7, the prompt "Welcome to nginx on Fedora!" is displayed. There is no default.conf file in the conf.d directory. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • How to install Nginx in CentOS7 and configure automatic startup
  • Tutorial on installing lnmp using yum on centos7 (linux+nginx+php7.1+mysql5.7)
  • How to install Nginx using yum in CentOS7
  • How to install Nginx in CentOS7.2
  • How to Install Nextcloud with Nginx and PHP7-FPM in CentOS7
  • Two methods of installing nginx on centos7
  • Teach you how to quickly install Nginx in CentOS7

<<:  How to import, register and use components in batches in Vue

>>:  mysql three tables connected to create a view

Recommend

How to add fields to a large data table in MySQL

Preface I believe everyone is familiar with addin...

Detailed explanation of MySQL master-slave database construction method

This article describes how to build a MySQL maste...

Bootstrap 3.0 study notes grid system principle

Through the brief introduction in the previous tw...

Solution to the failure of docker windows10 shared directory mounting

cause When executing the docker script, an error ...

Detailed installation tutorial of mysql 5.7 under CentOS 6 and 7

You always need data for development. As a server...

Tomcat CentOS installation process diagram

Tomcat CentOS Installation This installation tuto...

Solve the problem that Docker pulls MySQL image too slowly

After half an hour of trying to pull the MySQL im...

MySQL Series II Multi-Instance Configuration

Tutorial Series MySQL series: Basic concepts of M...

MySQL 5.7.18 download and installation process detailed instructions

MySql Download 1. Open the official website and f...

Configure selenium environment based on linux and implement operation

1. Using Selenium in Linux 1. Install Chrome Inst...

Analysis of the principle and usage of MySQL custom functions

This article uses examples to illustrate the prin...

What codes should I master when learning web page design?

This article introduces in detail some of the tech...

Sample code for easily implementing page layout using flex layout

Without further ado, let's get straight to th...

W3C Tutorial (1): Understanding W3C

W3C, an organization founded in 1994, aims to unl...

A brief analysis of the four import methods and priorities in CSS

First: 4 ways to introduce CSS There are four way...