Apache2 使用Tips

多站点配置:

1.打开httpd.conf,设置启用虚拟目录:

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

2.指定虚拟目录位置:

Include conf/extra/httpd-vhosts.conf,

3.修改

远程访问权限设置:

1.设置防火墙

2.修改配置文件:

/etc/httpd/conf/httpd.conf

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

常用命令

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

查看apache2状态

httpd -V

你可能感兴趣的:(Apache2 使用Tips)