Home > Operation and Maintenance > Apache > How to install and run apache2 on suse operating system

How to install and run apache2 on suse operating system

王林
Release: 2021-02-25 16:33:49
forward
4078 people have browsed it

How to install and run apache2 on suse operating system

Friends who have used Debian or Redhat operating systems know that installing apache2 on these two operating systems will automatically create an html folder in the /var/www directory.

But the strange thing is that the suse operating system is not like this. It is created under /srv/www, and the apache2 config file is also divided into several different files.

So there is some content.

Start the apache service

/usr/sbin/rcapache2 start
Copy after login

After visiting the IP address, I saw 403, access denied
The initial feeling is that wwwrun does not have permission to read the file, and then

ls -la /srv/www/htdocs /srv/www
Copy after login

all It shows that it has read permission, so the problem is not there.
I saw someone on the suse forum who had the same problem as me. It was a group of people who tried their best to make suggestions but it didn’t work and crashed.
Later I remembered that when I installed apache2, I only installed one package.

sudo zypper in apache2
Copy after login

Maybe others The configuration file was not downloaded and installed?

(Recommended learning: PHP training)
Then I looked at all the installation packages

sudo zypper se apache2
Copy after login

No matter what, install them all

sudo zypper in apache2 apache2-doc apache2-example-pages apache2-utils apache2-prefork apache2-mod_perl apache2-mod_php5
Copy after login

Start apache2

/usr/sbin/rcapache start
Copy after login

Open the ip address in the browser, it works!

Related recommendations: apache tutorial

The above is the detailed content of How to install and run apache2 on suse operating system. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
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