您的位置:首页 > 其它

mac上设置xampp服务器

2016-04-22 00:31 399 查看
1、首先设置服务器的时候设置伪静态

在 Include etc/httpd.conf中将

<Directory />

    AllowOverride none

    Require all denied

</Directory>

改成

<Directory />

    #AllowOverride none

    #Require all denied

    Order deny,allow

    Allow from all

</Directory>

2、在Include etc/extra/httpd-vhosts.conf中设置

<VirtualHost *:8888>

  ServerName  localhost

  Documentroot  "/Users/**/project/web"

  RewriteEngine on

  #开启Rewrite模块

  RewriteRule (.*)\.(jpg|jpeg|jpe|gif|bmp|png|wma|mp3|wav|avi|mp4|flv|swf)$ https://www.baidu.com [R=301,L,NC]

</virtualHost>

<Directory "/Users/**/project/web">

    Options Indexes FollowSymLinks

    AllowOverride All

    Order allow,deny

    Allow from all

</Directory>

注意documentroot中的文件两边双引号一定要是英文
3、如果是smaryt权限问题smarty不能写文件的时候,将mac中的文件夹的权限递归设置一下
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: