Home  >  Article  >  Operation and Maintenance  >  How to solve the error "Welcome to nginx on Fedora!" after installing nginx on Centos7

How to solve the error "Welcome to nginx on Fedora!" after installing nginx on Centos7

PHPz
PHPzforward
2023-05-18 16:34:11808browse

Problem Description

Install nginx on Tencent Cloud centos7<br>

sudo yum install nginx

Open The default web page displays

welcome to nginx on fedora!

and<br>

##/etc/nginx/conf.d

There is no default.conf file in the directory

Cause

The epel source of Tencent Cloud is downloaded by default, which is fedora

Solution<br>

•Preparation

<br>

sudo yum install yum-utils<br>

•Create nginx.repo file

<br>

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

and add the following

<br>

[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

<br>

sudo yum install nginx

The above is the detailed content of How to solve the error "Welcome to nginx on Fedora!" after installing nginx on Centos7. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete