Tips for using Apache

WBOY
Release: 2016-08-08 09:31:25
Original
1219 people have browsed it

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.

Related labels:
source:php.cn
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!