Home Backend Development PHP Tutorial Tips for using Apache

Tips for using Apache

Aug 08, 2016 am 09:31 AM
directory httpd quot

1. Multi-site configuration:

1. Open httpd.conf, set and enable the virtual directory:

<Directory />
    options FollowSymLinks
    AllowOverride all
    Allow from all
    #Require all denied
</Directory>
Copy after login

2. Specify the virtual directory location:

Include conf/extra/httpd-vhosts.conf,
Copy after login

3. Modify the node

<pre name="code" class="html"><VirtualHost *:80>
        ServerAdmin webmaster@dummy-host.example.com 
        DocumentRoot "/var/www/cloud_whirlpool_china"
        ServerName cloud.whirlpool-china.com
        ServerAlias cloud.whirlpool-china.com
        ErrorLog "logs/cloud.whirlpool-china.com-error_log"
        CustomLog "logs/cloud.whirlpool-china.com-access_log" common
</VirtualHost> 
Copy after login

Copy after login

You can also configure VirtualHost directly in the httpd.conf file.

2. Remote access permission settings:

1. Set up the firewall

2. Modify the configuration file:

/etc/httpd/conf/httpd.conf

<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>
Copy after login

3. Common commands

/bin/systemctl start httpd.service     #启动
/bin/systemctl restart httpd.service   #重启
/bin/systemctl status httpd.service    #查看状态
Copy after login

The above introduces the Tips for using Apache, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Active Directory Users and Computers Missing [Fixed in 3 Ways] Active Directory Users and Computers Missing [Fixed in 3 Ways] Apr 20, 2023 pm 01:25 PM

Active Directory Users and Computers (ADUC) loss is one of the most frustrating issues reported by many Windows Pro users. ADUC is an incredible MMC snap-in that enables administrators to manage Microsoft Active Directory. However, for some reason it is missing in the Windows Server or Enterprise/Pro editions. Let’s take a closer look at why it’s missing and how we can fix it. Does Windows 11 have Active Directory? Active Directory is useful for anyone wanting to manage remote

php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 Jun 13, 2016 am 10:23 AM

php提交表单通过后,弹出的对话框怎样在当前页弹出php提交表单通过后,弹出的对话框怎样在当前页弹出而不是在空白页弹出?想实现这样的效果:而不是空白页弹出:------解决方案--------------------如果你的验证用PHP在后端,那么就用Ajax;仅供参考:HTML code

Solve the problem that Yum Httpd cannot parse PHP Solve the problem that Yum Httpd cannot parse PHP Mar 22, 2024 pm 01:06 PM

To solve the problem that YumHttpd cannot parse PHP, you need specific code examples. When building a website, you often encounter the problem that the Httpd installed by Yum cannot parse PHP, resulting in the inability to access website pages normally. This problem has been plaguing many website administrators and developers. In this article, we will provide some solutions to this problem and give specific code examples. First, we need to identify the source of the problem. Httpd cannot parse PHP usually because necessary PHP modules are missing or incorrectly configured

What should I do if Yum Httpd encounters PHP parsing difficulties? What should I do if Yum Httpd encounters PHP parsing difficulties? Mar 22, 2024 pm 05:12 PM

What should I do if YumHttpd encounters PHP parsing difficulties? In the process of building a website, we often encounter situations where Apache's Httpd server cannot correctly parse PHP scripts. This will cause the website to not function properly, causing inconvenience to developers and users. So, how should you solve this situation? This article will introduce how to solve the problem that the Httpd server installed by Yum cannot correctly parse PHP scripts through configuration. First, we need to confirm whether PHP and HTTPd are installed

Yum Httpd configuration issue: PHP cannot parse correctly Yum Httpd configuration issue: PHP cannot parse correctly Mar 22, 2024 pm 03:54 PM

When we configure YumHttpd, we often encounter the problem that PHP cannot parse it correctly. This problem may cause the web page to not display properly, affecting website access and functionality. The key to solving this problem is to correctly configure Httpd and PHP to ensure that they can work together correctly. First, we need to confirm whether the PHP module is installed correctly when installing Httpd. In the configuration file httpd.conf, we need to add the following content to ensure that the PHP module has been loaded correctly: LoadMo

Why doesn't Yum Httpd recognize PHP files? Why doesn't Yum Httpd recognize PHP files? Mar 23, 2024 am 11:57 AM

Tools such as Yum, Httpd and PHP are often used when building websites, but sometimes we encounter a problem that the Httpd installed by Yum cannot recognize PHP files. This problem may cause the website to not function properly, so it is important to understand the cause of this problem and how to solve it. First, let’s understand why YumHttpd cannot recognize PHP files. In the process of building a website, we usually choose to use Apache as the web server.

Solve the problem that Yum Httpd is not compatible with PHP Solve the problem that Yum Httpd is not compatible with PHP Mar 23, 2024 pm 07:27 PM

To solve the problem of YumHttpd being incompatible with PHP, specific code examples are needed. In the process of building a website, we often encounter situations where the Httpd server installed by Yum is incompatible with the PHP version. At this time, we need to use some specific code examples to solve this problem. question. First of all, we need to be clear that there may be some compatibility issues between different versions of Httpd and PHP. For example, the PHP modules required by Httpd may be different in different versions of PHP, which requires us to install

图片消失怎么解决 图片消失怎么解决 Apr 07, 2024 pm 03:02 PM

图片消失如何解决先是图片文件上传$file=$_FILES['userfile'];  if(is_uploaded_file($file['tmp_name'])){$query=mysql_query("INSERT INTO gdb_banner(image_src ) VALUES ('images/{$file['name'

See all articles