最近打算看看cocos2d-html5,原因是想做个小东西,使用cocos2d,但是C++和Objective-C都不是最熟练,虽然JS也很弱,但是相比之下上手配置会简单一点,所以就使用了html5版本
在参照了http://www.gamefromscratch.com/post/2012/06/04/Cocos2D-HTML5-tutorial-1-Getting-set-up-and-running.aspx这里的Cocos2D HTML5教程以后,按第一步配置了本地的Apache服务环境,但是毕竟要把文件内容都放到C盘制定的www目录下不是很爽(个人不太喜欢在C盘放系统有关之外的东西),正好在工作中有看到过可以配置映射目录,所以尝试了一下,虽然步骤可能不规范,有多余的东西,但是至少改了以后成功了,下面是要改的部分,仅作为记录用
1. 搜索Directory这个标签,默认的c:/wamp/www/目录已经被设为了允许访问权限,所以我们把整个标签复制一份下来
<Directory "c:/wamp/www/">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
# Online --> Require all granted
# onlineoffline tag - don't remove
Order Allow,Deny
Allow from all
Require local
</Directory>
改写第一行中的目录地址,这是你要映射的地址,同事再看最后的三行,这应该是关于权限的配置,我没有修改(具体代表的意义和这个文件的意义有大神知道麻烦给我普及一下,万分感谢)
2.继续搜索IfModule alias_module 找到这个标签,从名字上来判断,这个就是别名映射的模块了
<IfModule alias_module>
#
# Redirect: Allows you to tell clients about documents that used to
# exist in your server's namespace, but do not anymore. The client
# will make a new request for the document at its new location.
# Example:
# Redirect permanent /foo http://www.example.com/bar
#
# Alias: Maps web paths into filesystem paths and is used to
# access content that does not live under the DocumentRoot.
# Example:
# Alias /webpath /full/filesystem/path
#
# If you include a trailing / on /webpath then the server will
# require it to be present in the URL. You will also likely
# need to provide a <Directory> section to allow access to
# the filesystem path.
#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the target directory are treated as applications and
# run by the server when requested rather than as documents sent to the
# client. The same rules about trailing "/" apply to ScriptAlias
# directives as to Alias.
#
ScriptAlias /cgi-bin/ "cgi-bin/"
Alias /cocos2dhtml5/ "D:/Coding/cocos2d-html5-v0.5.0-alpha/"
</IfModule>
在这个模块的最后 添加上要映射的别名路径 格式是Alias /你要映射成的名字/ "你要映射的源目录"
3. 按以上更改好以后保存,重启服务,以我为例,我就可以通过192.168.1.2/cocos2dhtml5/ 访问到我D盘下Coding文件夹中cocos2d....那个文件夹中的内容了
分享到:
相关推荐
Apache2 httpd.conf 配置文件中文版 详细说明了apache2的配置文件的各项参数的配置方法,
Apache的httpd.conf文件常用指令解释Apache的httpd.conf文件常用指令解释Apache的httpd.conf文件常用指令解释
Apache 的 httpd.conf 详解 Apache 的 httpd.conf 详解Apache 的 httpd.conf 详解Apache 的 httpd.conf 详解Apache 的 httpd.conf 详解Apache 的 httpd.conf 详解Apache 的 httpd.conf 详解
Apache2 httpd.conf 中文版 Apache2 httpd.conf 中文版
Apache服务器的本地配置是一件令人头疼的事,无法访问一般是由于配置文件的不正确导致的,这是一份可以在Mac系统中正常运行的配置文件。
apache的HTTPD.conf文件配置详解及基本配置和示例说明
Apache2 httpd.conf配置文件中文版详解 # 基于 NCSA 服务的配置文件。
apache httpd.conf中文 apache优化
apache和C++实现fastcgi时Apache中httpd.conf的配置
apache2配置文件httpd.conf
httpd.conf文件配置详解
Linux与Apache(httpd.conf )配置与管理图文教程 chm Linux与Apache(httpd.conf )配置与管理图文教程 chm
Notepad++ 自定义 httpd.conf 文件语法高亮的配置文件 使用方法: http://blog.csdn.net/zhyl8157121/article/details/51320819
Apache2httpd.conf配置文件中文版详解宣贯.pdf
自己收集的一些资料,可以参考一下!有什么需要帮忙的地方可以与我联系:Q:527514926 MSN:wang527514926@163.com
技术分享:Apache中Httpd.conf详解
httpd.conf中文.txt php配置文件的中文解释。
可以解决在2003服务器上用apache和iis公用,解析域名均不用带端口,非常好用,网管必会