Home >Backend Development >PHP Tutorial >Tips for using Apache
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>
2. Specify the virtual directory location:
Include conf/extra/httpd-vhosts.conf,
3. Modify the
<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>
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>
3. Common commands
/bin/systemctl start httpd.service #启动 /bin/systemctl restart httpd.service #重启 /bin/systemctl status httpd.service #查看状态
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.