Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zuiketang
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
zuiketang
Commits
336cd64f
Commit
336cd64f
authored
Oct 17, 2016
by
xiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加生产环境配置
parent
dd36f3f9
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
162 additions
and
9 deletions
+162
-9
main-local.php
src/environments/prod/backend/config/main-local.php
+5
-1
index-test.php
src/environments/prod/backend/web/index-test.php
+25
-0
index.php
src/environments/prod/backend/web/index.php
+8
-2
main-local.php
src/environments/prod/common/config/main-local.php
+42
-3
params-local.php
src/environments/prod/common/config/params-local.php
+36
-0
main-local.php
src/environments/prod/console/config/main-local.php
+1
-0
main-local.php
src/environments/prod/frontend/config/main-local.php
+15
-3
index-test.php
src/environments/prod/frontend/web/index-test.php
+24
-0
index.php
src/environments/prod/frontend/web/index.php
+6
-0
No files found.
src/environments/prod/backend/config/main-local.php
View file @
336cd64f
<?php
<?php
return
[
$config
=
[
'components'
=>
[
'components'
=>
[
'request'
=>
[
'request'
=>
[
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
...
@@ -7,3 +8,6 @@ return [
...
@@ -7,3 +8,6 @@ return [
],
],
],
],
];
];
return
$config
;
src/environments/prod/backend/web/index-test.php
0 → 100644
View file @
336cd64f
<?php
// NOTE: Make sure this file is not accessible when deployed to production
if
(
!
in_array
(
@
$_SERVER
[
'REMOTE_ADDR'
],
[
'127.0.0.1'
,
'::1'
]))
{
die
(
'You are not allowed to access this file.'
);
}
if
(
!
function_exists
(
'fnmatch'
))
{
function
fnmatch
(
$pattern
,
$string
)
{
return
preg_match
(
"#^"
.
strtr
(
preg_quote
(
$pattern
,
'#'
),
array
(
'\*'
=>
'.*'
,
'\?'
=>
'.'
))
.
"$#i"
,
$string
);
}
// end
}
// end if
defined
(
'YII_DEBUG'
)
or
define
(
'YII_DEBUG'
,
true
);
defined
(
'YII_ENV'
)
or
define
(
'YII_ENV'
,
'test'
);
require
(
__DIR__
.
'/../../vendor/autoload.php'
);
require
(
__DIR__
.
'/../../vendor/yiisoft/yii2/Yii.php'
);
require
(
__DIR__
.
'/../../common/config/bootstrap.php'
);
require
(
__DIR__
.
'/../config/bootstrap.php'
);
$config
=
require
(
__DIR__
.
'/../../tests/codeception/config/backend/acceptance.php'
);
(
new
yii\web\Application
(
$config
))
->
run
();
src/environments/prod/backend/web/index.php
View file @
336cd64f
<?php
<?php
defined
(
'YII_DEBUG'
)
or
define
(
'YII_DEBUG'
,
false
);
defined
(
'YII_DEBUG'
)
or
define
(
'YII_DEBUG'
,
true
);
defined
(
'YII_ENV'
)
or
define
(
'YII_ENV'
,
'prod'
);
defined
(
'YII_ENV'
)
or
define
(
'YII_ENV'
,
'dev'
);
if
(
!
function_exists
(
'fnmatch'
))
{
function
fnmatch
(
$pattern
,
$string
)
{
return
preg_match
(
"#^"
.
strtr
(
preg_quote
(
$pattern
,
'#'
),
array
(
'\*'
=>
'.*'
,
'\?'
=>
'.'
))
.
"$#i"
,
$string
);
}
// end
}
// end if
require
(
__DIR__
.
'/../../vendor/autoload.php'
);
require
(
__DIR__
.
'/../../vendor/autoload.php'
);
require
(
__DIR__
.
'/../../vendor/yiisoft/yii2/Yii.php'
);
require
(
__DIR__
.
'/../../vendor/yiisoft/yii2/Yii.php'
);
require
(
__DIR__
.
'/../../common/config/bootstrap.php'
);
require
(
__DIR__
.
'/../../common/config/bootstrap.php'
);
...
...
src/environments/prod/common/config/main-local.php
View file @
336cd64f
<?php
<?php
return
[
return
[
'components'
=>
[
'components'
=>
[
'cache'
=>
[
'class'
=>
'yii\redis\Cache'
,
'redis'
=>
[
'hostname'
=>
'192.168.1.12'
,
'port'
=>
6380
,
'database'
=>
2
,
]
],
'db'
=>
[
'db'
=>
[
'class'
=>
'yii\db\Connection'
,
'class'
=>
'yii\db\Connection'
,
'dsn'
=>
'mysql:host=
localhost;dbname=yii2advanced
'
,
'dsn'
=>
'mysql:host=
192.168.1.7;port:3305;dbname=pp_c
'
,
'username'
=>
'
root
'
,
'username'
=>
'
pp_c
'
,
'password'
=>
''
,
'password'
=>
'
nF@V5LK#ilb!NEvZ@1Ze#rWm#H
'
,
'charset'
=>
'utf8'
,
'charset'
=>
'utf8'
,
],
],
'redis'
=>
[
'class'
=>
'yii\redis\Connection'
,
'hostname'
=>
'192.168.1.21'
,
'port'
=>
6380
,
'database'
=>
2
,
],
'mailer'
=>
[
'mailer'
=>
[
'class'
=>
'yii\swiftmailer\Mailer'
,
'class'
=>
'yii\swiftmailer\Mailer'
,
'viewPath'
=>
'@common/mail'
,
'viewPath'
=>
'@common/mail'
,
// send all mails to a file by default. You have to set
// 'useFileTransport' to false and configure a transport
// for the mailer to send real emails.
'useFileTransport'
=>
TRUE
,
],
],
'qiniu'
=>
[
'class'
=>
'common\components\Qiniu'
,
'accessKey'
=>
'n85SCPB9uO2v32az-3TRFsZCXwJu7YddyzLRYXg-'
,
'secretKey'
=>
'KDl3b7aLpj7n9YZ07lHGivVY4c_Q-0QSM0TZ_-XS'
,
'storages'
=>
[
'public'
=>
[
'bucket'
=>
'pp-classroom'
,
'fsizeLimit'
=>
pow
(
1024
,
2
)
*
5
,
//5MB
'mimeLimit'
=>
'image/jpeg;image/png;image/gif'
,
'url'
=>
'http://dev.qdn.pp.cc/'
],
'video'
=>
[
'bucket'
=>
'pp-classroom-private'
,
'fsizeLimit'
=>
pow
(
1024
,
3
)
*
2
,
//2GB
'mimeLimit'
=>
'video/*;flv-application/octet-stream'
,
'url'
=>
'http://oe9d6dr84.bkt.clouddn.com/'
]
]
]
],
],
];
];
src/environments/prod/common/config/params-local.php
View file @
336cd64f
<?php
<?php
return
[
return
[
'adminEmail'
=>
'admin@example.com'
,
'supportEmail'
=>
'support@example.com'
,
'user.passwordResetTokenExpire'
=>
3600
,
'captchaId'
=>
'4d6ad870bf63a30be3d22c92925b04ca'
,
'privateKey'
=>
'a2ca5e5139d1f43ac4e1cd248f3e52e4'
,
'msg.host'
=>
'http://114.55.132.75:7893/sms.aspx'
,
'msg.userid'
=>
'78'
,
'msg.account'
=>
'276147613x'
,
'msg.password'
=>
'276147613'
,
'msg.signature'
=>
'【最课堂】'
,
'alipay'
=>
[
'partner'
=>
'2088701843067550'
,
'seller_id'
=>
'2088701843067550'
,
'key'
=>
'12vr33u4g314hytde3g81oao9dfdarm6'
,
'notify_url'
=>
'http://c.pp.cc/pay/alipay-notify'
,
'return_url'
=>
'http://商户网址/create_direct_pay_by_user-PHP-UTF-8/return_url.php'
,
'sign_type'
=>
strtoupper
(
'MD5'
),
'input_charset'
=>
strtolower
(
'utf-8'
),
'cacert'
=>
getcwd
()
.
'\\cacert.pem'
,
'transport'
=>
'http'
,
'payment_type'
=>
'1'
,
'service'
=>
'create_direct_pay_by_user'
,
],
// 'weixinpay'=>[
// 'appid'=>'wx180521eb22e9d7af',
// 'mchid'=>'1295461001',
// 'key'=>'ejg0l9phOAkp021qB54shz0Q8Tiscwzy',
// 'appsecret'=>'f20293c9548c469fb8b855fc98c4ef3c',
//
// ]
'weixinpay'
=>
[
'appid'
=>
'wx5714a24a60083b2a'
,
'mchid'
=>
'1399794002'
,
'key'
=>
'8934e7d15453e97507ef794cf7b0519d'
,
'appsecret'
=>
'7c18222c6ec31efa65d21606a629585d'
,
]
];
];
src/environments/prod/console/config/main-local.php
View file @
336cd64f
<?php
<?php
return
[
return
[
];
];
src/environments/prod/frontend/config/main-local.php
View file @
336cd64f
<?php
<?php
return
[
$config
=
[
'components'
=>
[
'components'
=>
[
'request'
=>
[
'request'
=>
[
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
'cookieValidationKey'
=>
'1o1zEUf8jdBvsnZy_JygPUO5_sZ7zBci'
,
'cookieValidationKey'
=>
''
,
],
'session'
=>
[
'timeout'
=>
3600
,
'name'
=>
'zuiektang-frontend'
,
'class'
=>
'yii\redis\Session'
,
'redis'
=>
[
'hostname'
=>
'192.168.1.21'
,
'port'
=>
6380
,
'database'
=>
2
,
]
],
],
],
],
];
];
return
$config
;
src/environments/prod/frontend/web/index-test.php
0 → 100644
View file @
336cd64f
<?php
// NOTE: Make sure this file is not accessible when deployed to production
if
(
!
in_array
(
@
$_SERVER
[
'REMOTE_ADDR'
],
[
'127.0.0.1'
,
'::1'
]))
{
die
(
'You are not allowed to access this file.'
);
}
if
(
!
function_exists
(
'fnmatch'
))
{
function
fnmatch
(
$pattern
,
$string
)
{
return
preg_match
(
"#^"
.
strtr
(
preg_quote
(
$pattern
,
'#'
),
array
(
'\*'
=>
'.*'
,
'\?'
=>
'.'
))
.
"$#i"
,
$string
);
}
// end
}
// end if
defined
(
'YII_DEBUG'
)
or
define
(
'YII_DEBUG'
,
true
);
defined
(
'YII_ENV'
)
or
define
(
'YII_ENV'
,
'test'
);
require
(
__DIR__
.
'/../../vendor/autoload.php'
);
require
(
__DIR__
.
'/../../vendor/yiisoft/yii2/Yii.php'
);
require
(
__DIR__
.
'/../../common/config/bootstrap.php'
);
require
(
__DIR__
.
'/../config/bootstrap.php'
);
$config
=
require
(
__DIR__
.
'/../../tests/codeception/config/frontend/acceptance.php'
);
(
new
yii\web\Application
(
$config
))
->
run
();
src/environments/prod/frontend/web/index.php
View file @
336cd64f
<?php
<?php
defined
(
'YII_DEBUG'
)
or
define
(
'YII_DEBUG'
,
false
);
defined
(
'YII_DEBUG'
)
or
define
(
'YII_DEBUG'
,
false
);
defined
(
'YII_ENV'
)
or
define
(
'YII_ENV'
,
'prod'
);
defined
(
'YII_ENV'
)
or
define
(
'YII_ENV'
,
'prod'
);
if
(
!
function_exists
(
'fnmatch'
))
{
function
fnmatch
(
$pattern
,
$string
)
{
return
preg_match
(
"#^"
.
strtr
(
preg_quote
(
$pattern
,
'#'
),
array
(
'\*'
=>
'.*'
,
'\?'
=>
'.'
))
.
"$#i"
,
$string
);
}
// end
}
// end if
require
(
__DIR__
.
'/../../vendor/autoload.php'
);
require
(
__DIR__
.
'/../../vendor/autoload.php'
);
require
(
__DIR__
.
'/../../vendor/yiisoft/yii2/Yii.php'
);
require
(
__DIR__
.
'/../../vendor/yiisoft/yii2/Yii.php'
);
require
(
__DIR__
.
'/../../common/config/bootstrap.php'
);
require
(
__DIR__
.
'/../../common/config/bootstrap.php'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment