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

Two ways to install Python3 on Linux servers

First method Alibaba Cloud and Baidu Cloud server...

Solution to the Docker container cannot be stopped and deleted

Find the running container id docker ps Find the ...

Summary of pitfalls in virtualbox centos7 nat+host-only networking

Table of contents 1. Problem Background 2. What a...

Detailed Example of MySQL InnoDB Locking Mechanism

1. InnoDB locking mechanism The InnoDB storage en...

Gallery function implemented by native Js

Table of contents The first The second Native Js ...

HTML table markup tutorial (48): CSS modified table

<br />Now let's take a look at how to cl...

Example of automatic import method of vue3.0 common components

1. Prerequisites We use the require.context metho...

HTML basics - CSS style sheets, style attributes, format and layout details

1. position : fixed Locked position (relative to ...

How to view the database installation path in MySQL

We can view the installation path of mysql throug...

How to draw a mind map in a mini program

Table of contents What is a mind map? How to draw...

Let's talk about the v-on parameter problem in Vue

Use of v-on:clock in Vue I'm currently learni...

HTML CSS3 does not stretch the image display effect

1. Use the transform attribute to display the ima...

Introduction to reactive function toRef function ref function in Vue3

Table of contents Reactive Function usage: toRef ...