修改dns
dns设为192.168.109.200
windows
下载源码
- 下载wamp
- 启动
- 进入wamp/www/
- git clone git@tech.pingansec.com:wangqs/web-php.git
- git clone git@tech.pingansec.com:wangqs/php-config.git
- git clone git@tech.pingansec.com:wangqs/static.git
- 将php-config目录的config文件夹复制到web-php目录
配置域名
<VirtualHost *:80>
DocumentRoot e:/wamp/www/web-php/app-finance
ServerName finance.dev.pingansec.com
ServerAlias *.finance.dev.pingansec.com
<Location />
AddDefaultCharset utf-8
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L,QSA]
</Location>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot e:/wamp/www/static
ServerName static.dev.pingansec.com
<Directory />
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
将上边内容复制到wamp/bin/apache/apache2.x/conf/http.conf
文件的最下边
在http.conf
中搜索mod_rewrite.so
把这一行的注释去掉,保存文件
启动wamp
,托盘点击图标,php->php_extension->php_redis.so将之打开
重启wamp
浏览器输入
finance.dev.pingansec.com
phpstorm配置
下载phpstorm
- phpstorm 注册
- 注册时选择License server,
- 填http://www.iteblog.com/idea/key.php 第一个不行填这个 http://idea.qinxi1992.cn
phpstorm配置git
file->settins->搜索 git 选择git,path设置成
C:\Program Files (x86)\Git\cmd\git.exe
搜索ssh 选择 subversion 右边选择ssh settings
将private key设置成你的私钥,ssh-keygen生成的 类似
C:\Users\suxianbaozi\.ssh\id_rsa
试试能不能用git了吧~~
linux & mac
请参照windows 自行配置(上边的东西其实是写给前端同学看的,服务端的自己搞定吧)
环境要求 nginx + php-fpm mac上已经存在php了,只需要安装nginx即可,可以安装brew之后进行安装
nginx 配置文件
server {
listen 80;
server_name finance.dev.pingansec.com;
index index.html index.htm index.php;
root /Users/www/web-php/app-finance;
rewrite . /index.php;
location ~ .*\.(php|php5)?$ {
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
#静态文件
server {
listen 80;
server_name static.dev.pingansec.com;
root /Users/www/static;
limit_rate 512k;
}