zl程序教程

您现在的位置是:首页 >  其他

当前栏目

mac apache 开启伪静态

2023-02-19 12:20:15 时间

mac apache 开启伪静态


打开主配置文件 httpd.conf

sudo vim /etc/apache2/httpd.conf

去除前面的注释,加载 Rewrite 模块

LoadModule rewrite_module libexec/apache2/mod_rewrite.so

AllowOverride None 修改为 AllowOverride All

DocumentRoot "/Users/liang/Sites"
<Directory "/Users/liang/Sites">
    #AllowOverride None
    AllowOverride All
</Directory>

重启apache服务

sudo apachectl restart