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

Automatically log out inactive users after login timeout in Linux

Method 1: Modify the .bashrc or .bash_profile fil...

A brief discussion on Python's function knowledge

Table of contents Two major categories of functio...

7 Best VSCode Extensions for Vue Developers

Adding the right VS Code extension to Visual Stud...

React.js framework Redux basic case detailed explanation

react.js framework Redux https://github.com/react...

TypeScript Mapping Type Details

Table of contents 1. Mapped Types 2. Mapping Modi...

5 ways to migrate from MySQL to ClickHouse

Data migration needs to be imported from MySQL to...

Record the process of connecting to the local Linux virtual machine via SSH

Experimental environment: Physical machine Window...

Basic learning tutorial of table tag in HTML

Table label composition The table in HTML is comp...

Learn about CSS label display mode in one article

Tag type (display mode) HTML tags are generally d...

Implementation of fastdfs+nginx cluster construction

1. Introduction to fastdfs 1. What is fastdfs Fas...

How to add a pop-up bottom action button for element-ui's Select and Cascader

As shown in the figure below, it is a common desi...

How to solve the problem of MySQL query character set mismatch

Find the problem I recently encountered a problem...

Detailed explanation of JavaScript's Set data structure

Table of contents 1. What is Set 2. Set Construct...