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

PHPz
Release: 2023-05-18 16:34:11
forward
847 people have browsed it

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
Copy after login

•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!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!