Set up all that basic shit
This commit is contained in:
parent
1b96e2c199
commit
6c9c04a85d
5 changed files with 198 additions and 0 deletions
57
conf/nginx.conf
Normal file
57
conf/nginx.conf
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
server
|
||||||
|
{
|
||||||
|
listen 80;
|
||||||
|
server_name *.leaderbin.com;
|
||||||
|
|
||||||
|
if ($host ~* "^(.+)\.leaderbin\.com$")
|
||||||
|
{
|
||||||
|
rewrite ^(.*)$ http://leaderbin.com$1 permanent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server
|
||||||
|
{
|
||||||
|
listen 80;
|
||||||
|
server_name local.leaderbin.com leaderbin.com;
|
||||||
|
|
||||||
|
access_log /var/log/nginx/leaderbin.com.access.log;
|
||||||
|
error_log /var/log/nginx/leaderbin.com.error.log;
|
||||||
|
|
||||||
|
root /var/www/leaderbin.com/public;
|
||||||
|
|
||||||
|
rewrite_log on;
|
||||||
|
|
||||||
|
# Rewrites static content with an appended timestamp
|
||||||
|
location ~ ^/(.+)\.(\d+)\.(css|js|gif|png|jpg|jpeg)$
|
||||||
|
{
|
||||||
|
rewrite ^/(.+)\.(\d+)\.(css|js|gif|png|jpg|jpeg)$ /$1.$3 break;
|
||||||
|
expires max;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /
|
||||||
|
{
|
||||||
|
index index.php;
|
||||||
|
|
||||||
|
# Strips the trailing slash
|
||||||
|
rewrite ^/(.*)/$ /$1 permanent;
|
||||||
|
|
||||||
|
# If file exists return it right away
|
||||||
|
if (-f $request_filename)
|
||||||
|
{
|
||||||
|
expires max;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
# and the rest
|
||||||
|
rewrite ^/(.+)$ /index.php?request=$1 last;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.php$
|
||||||
|
{
|
||||||
|
try_files $uri =404;
|
||||||
|
include /etc/nginx/fastcgi_params;
|
||||||
|
fastcgi_pass 127.0.0.1:9000;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
fastcgi_param SCRIPT_FILENAME /var/www/leaderbin.com/public$fastcgi_script_name;
|
||||||
|
}
|
||||||
|
}
|
125
config.php
Normal file
125
config.php
Normal file
|
@ -0,0 +1,125 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$config = array(
|
||||||
|
// {{{ Environments
|
||||||
|
|
||||||
|
'environments' => array(
|
||||||
|
'local' => 'local.leaderbin.com',
|
||||||
|
'production' => 'leaderbin.com',
|
||||||
|
),
|
||||||
|
|
||||||
|
// }}}
|
||||||
|
// {{{ PHP Options
|
||||||
|
|
||||||
|
'php' => array(
|
||||||
|
'local' => array(
|
||||||
|
'date.timezone' => 'Universal',
|
||||||
|
'display_errors' => true,
|
||||||
|
'error_reporting' => -1,
|
||||||
|
'session.gc_maxlifetime' => 86400,
|
||||||
|
),
|
||||||
|
'production' => array(
|
||||||
|
'date.timezone' => 'Universal',
|
||||||
|
'display_errors' => false,
|
||||||
|
'error_reporting' => -1,
|
||||||
|
'session.gc_maxlifetime' => 86400,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// }}}
|
||||||
|
// {{{ PICKLES Stuff
|
||||||
|
|
||||||
|
'pickles' => array(
|
||||||
|
'disabled' => false,
|
||||||
|
'session' => 'files',
|
||||||
|
'template' => 'index',
|
||||||
|
'module' => 'home',
|
||||||
|
//'404' => 'error/404',
|
||||||
|
'datasource' => 'mysql',
|
||||||
|
'cache' => 'memcached',
|
||||||
|
'profiler' => array(
|
||||||
|
'local' => false,
|
||||||
|
'production' => false,
|
||||||
|
),
|
||||||
|
'logging' => array(
|
||||||
|
'local' => true,
|
||||||
|
'production' => false,
|
||||||
|
),
|
||||||
|
'minify' => array(
|
||||||
|
'local' => true,
|
||||||
|
'production' => false,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// }}}
|
||||||
|
// {{{ Datasources
|
||||||
|
|
||||||
|
'datasources' => array(
|
||||||
|
'local' => array(
|
||||||
|
'memcached' => array(
|
||||||
|
'type' => 'memcache',
|
||||||
|
'hostname' => 'localhost',
|
||||||
|
'port' => 11211,
|
||||||
|
'namespace' => 'ELLBEE',
|
||||||
|
),
|
||||||
|
'mysql' => array(
|
||||||
|
'type' => 'mysql',
|
||||||
|
'driver' => 'pdo_mysql',
|
||||||
|
'hostname' => 'localhost',
|
||||||
|
'username' => 'root',
|
||||||
|
'password' => '',
|
||||||
|
'database' => 'leaderbin',
|
||||||
|
'cache' => false,
|
||||||
|
),
|
||||||
|
'redis' => array(
|
||||||
|
'type' => 'redis',
|
||||||
|
'hostname' => 'localhost',
|
||||||
|
'port' => 6379,
|
||||||
|
'database' => '0',
|
||||||
|
'namespace' => 'lb',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'production' => array(
|
||||||
|
'memcached' => array(
|
||||||
|
'type' => 'memcache',
|
||||||
|
'hostname' => 'localhost',
|
||||||
|
'port' => 11211,
|
||||||
|
'namespace' => 'ELLBEE',
|
||||||
|
),
|
||||||
|
'mysql' => array(
|
||||||
|
'type' => 'mysql',
|
||||||
|
'driver' => 'pdo_mysql',
|
||||||
|
'hostname' => 'localhost',
|
||||||
|
'username' => 'leaderbin',
|
||||||
|
'password' => '9f48580930bdcaf13c1888cd946e809e75ab8d90',
|
||||||
|
'database' => 'leaderbin',
|
||||||
|
'cache' => false,
|
||||||
|
),
|
||||||
|
'redis' => array(
|
||||||
|
'type' => 'redis',
|
||||||
|
'hostname' => 'localhost',
|
||||||
|
'port' => 6381,
|
||||||
|
'database' => '0',
|
||||||
|
'namespace' => 'lb',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// }}}
|
||||||
|
// {{{ Security Options
|
||||||
|
|
||||||
|
'security' => array(
|
||||||
|
'login' => 'login',
|
||||||
|
'model' => 'User',
|
||||||
|
'column' => 'role',
|
||||||
|
'levels' => array(
|
||||||
|
0 => 'ANONYMOUS',
|
||||||
|
10 => 'USER',
|
||||||
|
20 => 'ADMIN',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// }}}
|
||||||
|
);
|
||||||
|
|
||||||
|
?>
|
9
public/index.php
Normal file
9
public/index.php
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/share/pickles-latest');
|
||||||
|
|
||||||
|
require_once 'pickles.php';
|
||||||
|
|
||||||
|
new Controller()
|
||||||
|
|
||||||
|
?>
|
6
templates/__shared/index.phtml
Normal file
6
templates/__shared/index.phtml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<?php require $this->template; ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
1
templates/home.phtml
Normal file
1
templates/home.phtml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<h1>LeaderBin</h1>
|
Loading…
Add table
Add a link
Reference in a new issue