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
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
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
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
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
Start apache2
/usr/sbin/rcapache start
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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











Installing MySQL on CentOS involves the following steps: Adding the appropriate MySQL yum source. Execute the yum install mysql-server command to install the MySQL server. Use the mysql_secure_installation command to make security settings, such as setting the root user password. Customize the MySQL configuration file as needed. Tune MySQL parameters and optimize databases for performance.

VS Code extensions pose malicious risks, such as hiding malicious code, exploiting vulnerabilities, and masturbating as legitimate extensions. Methods to identify malicious extensions include: checking publishers, reading comments, checking code, and installing with caution. Security measures also include: security awareness, good habits, regular updates and antivirus software.

The main uses of Linux include: 1. Server operating system, 2. Embedded system, 3. Desktop operating system, 4. Development and testing environment. Linux excels in these areas, providing stability, security and efficient development tools.

In VS Code, you can run the program in the terminal through the following steps: Prepare the code and open the integrated terminal to ensure that the code directory is consistent with the terminal working directory. Select the run command according to the programming language (such as Python's python your_file_name.py) to check whether it runs successfully and resolve errors. Use the debugger to improve debugging efficiency.

There are six ways to run code in Sublime: through hotkeys, menus, build systems, command lines, set default build systems, and custom build commands, and run individual files/projects by right-clicking on projects/files. The build system availability depends on the installation of Sublime Text.

The reasons for the installation of VS Code extensions may be: network instability, insufficient permissions, system compatibility issues, VS Code version is too old, antivirus software or firewall interference. By checking network connections, permissions, log files, updating VS Code, disabling security software, and restarting VS Code or computers, you can gradually troubleshoot and resolve issues.

By installing and enabling the Simplified Chinese Language Pack or Traditional Chinese Language Pack in the VS Code extension store, the VS Code user interface can be translated into Chinese, thereby enhancing the coding experience. In addition, themes, shortcuts, and code snippets can be adjusted to further personalize the settings.

VS Code is still available on Windows 7, but is highly not recommended. Windows 7 lacks security updates and patches, resulting in security risks and VS Code compatibility issues. Although simple code editing is barely competent, it is recommended to upgrade to Windows 10 or later for complex development or for extensions.
