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中的文件夹的权限递归设置一下
在 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中的文件夹的权限递归设置一下
相关文章推荐
- 基于spring test框架进行单元测试-框架介绍
- 关于<script/>
- 深入HTTP协议
- 2015-2016 下半学期 第六周 训练
- Java多线程——sleep(),wait(),notify(),notifyAll(),join()
- [改善Java代码]推荐使用枚举定义常量
- 个人工作总结4
- 换乐网redis应用分析
- hibernate的Many2One、Many2Many等的使用
- ucos中OSMemCreate()函数难点解析
- DbUnit实践:Spring Test Dbunit,H2数据库
- 数据库变慢问题定位方式
- Adobe CS2提供免费序列号,官网宣布Photoshop cs2免费
- MS SQL Server中数据表、视图、函数/方法、存储过程是否存在判断及创建
- CSS的盒子模型以及BFC
- 图的数据结构实现
- 图片的拉伸
- 总结下struts2前台传递值到后台的方式
- 深度学习工具评论
- Bitmap的加载与Cache(一)