php 新项目需要配置的环境
1,C:\Windows\System32\drivers\etc\hosts 文件中绑定域名
127.0.0.1 www.my.com
2.在F:\wamp\bin\apache\Apache2.2.21\conf目录下打开 httpd.conf 查找到
#Include conf/extra/httpd-vhosts.conf 把前面的# 去掉并保存
,3. 配置wamp文件的httpd-vhosts.conf 文件添加域名、文件绑定
E:\wamp\bin\apache\apache2.4.9\conf\extra
最后添加下面的配置
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot d:/yike
ServerName 192.168.2.60
<Directory d:/yike>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ErrorLog "logs/yike-access.log"
CustomLog "logs/yiki-error.log" common
</VirtualHost>
<VirtualHost *:80>
DocumentRoot d:/my
ServerName www.my.com
<Directory d:/my>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
Require all granted
</Directory>
ErrorLog "logs/my-access.log"
CustomLog "logs/my-error.log" common
</VirtualHost>
4,项目中配置域名访问
var Lemon = Lemon || {}, Desktop = Desktop || {}, Front = {}, Util = {}, Uc = {}, Libs = Libs || {};
Lemon.cookie = {domain: "ixdcw.net", path: "/", prefix: "esd_"};
Lemon.url_site = Lemon.site_url = "http://www.plugin.com/";
Lemon.image_url = "http://thumb.ixdcw.net/";
Lemon.upload_domain = "http://192.168.1.142/file/uploads/";
Lemon.seajsBase = "http://www.ixdcw.net/static/js/";
Lemon.cookie_domain = "ixdcw.net";
Lemon.cookie_path = "/";
Lemon.cookie_prefix = "esd_";
Lemon.site_name = "jquery插件库";
Lemon.desktop = {};
Lemon.uc = {};
Lemon.front = {};
var lemon = Lemon;