Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Commit

Permalink
style(dir): move apps\public to top dir
Browse files Browse the repository at this point in the history
1. revert part of commit e6394a6 : move rid-httpd back to bin/rid-httpd
2. move apps\public to top dir
  • Loading branch information
Rhilip committed Sep 11, 2019
1 parent c325fb0 commit cb3beae
Show file tree
Hide file tree
Showing 21 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .bowerrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"directory": "apps/public/lib"
"directory": "public/lib"
}
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
- **template:** Add git commit hash in `CHANGELOG.md` (76bc527)

### Feat
- **Auth:** Sep Auth part from Site to new components (f36884e)
- **Auth:** Use JWT to set cookies content (bf897c6)
- **Auth:** Add Auth By passkey support for special route (aff1f87)
- **Auth:** Sep Auth part from Site to new components (f36884e)
- **Auth/Login:** Add full Advanced Options support (6009dc8)
- **Secret:** Check session and user_id match or not in jwt payload (358ba5d)
- **Bonus:** Pre-Add Bonus system (59ddd39)
- **Secret:** Protect jwt key for env('APP_SECRET_KEY') (dfa67da)
- **Secret:** Check session and user_id match or not in jwt payload (358ba5d)
- **Sessions:** record user access information at Auth->onRequestAfter() (e2a22a7)
- **Sessions/List:** Use SessionsListForm to show user sessions (9ecfb97)
- **Site:** Add page Site/{Logs,Rules} (65cea9e)
Expand Down Expand Up @@ -57,6 +58,7 @@
- **Redis:** Remove view in redis , use other software install (c5d3378)

### Style
- **EnvironmentLoader:** Use Dotenv to load Loads environment variables (1fea316)
- **Redis:** rewrite namespace of cache keys (0c4e1a2)


Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ edit in Admin Panel.
5. Run Test by `php bin/rid-httpd service start -u` , And Congratulation If you see those output **without error throwout**.

```bash
root@ridpt:/data/wwwroot/ridpt.rhilip.info# php rid-httpd service start
root@ridpt:/data/wwwroot/ridpt.rhilip.info# php bin/rid-httpd service start
____ __ ____ ______
/\ _`\ __ /\ \/\ _`\ /\__ _\
\ \ \L\ \/\_\ \_\ \ \ \L\ \/_/\ \/
Expand Down
2 changes: 1 addition & 1 deletion apps/controllers/CaptchaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function actionIndex()
$captcha = new Captcha([
'width' => 150,
'height' => 40,
'fontFile' => app()->getPublicPath() . '/static/fonts/Times New Roman.ttf',
'fontFile' => RIDPT_ROOT . '/public/static/fonts/Times New Roman.ttf', // FIXME
'fontSize' => 20,
'wordNumber' => 6,
'angleRand' => [-20, 20],
Expand Down
9 changes: 6 additions & 3 deletions rid-httpd → bin/rid-httpd
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @author Rhilip <rhilipruan@gmail.com>
*/

define('RIDPT_ROOT', dirname(__DIR__));
define('RIDPT_START', microtime(true));

/*
Expand All @@ -20,7 +21,7 @@ define('RIDPT_START', microtime(true));
* loading any of our classes later on. It feels great to relax.
*
*/
require __DIR__ . '/vendor/autoload.php';
require RIDPT_ROOT . '/vendor/autoload.php';

/*
* --------------------------------------------------------------------------
Expand All @@ -35,14 +36,16 @@ if (!PHP_SAPI === 'cli')
* Load Environment variables
* --------------------------------------------------------------------------
*/
$dotenv = Dotenv\Dotenv::create(__DIR__);
$dotenv = Dotenv\Dotenv::create(RIDPT_ROOT);
$dotenv->load();

env();

/*
* --------------------------------------------------------------------------
* Start Swoole Server
* --------------------------------------------------------------------------
*/
$config = require __DIR__ . '/apps/config/httpd.php';
$config = require RIDPT_ROOT . '/apps/config/httpd.php';
$exitCode = (new Rid\Console\Application($config))->run();
exit($exitCode);
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
},
"autoload": {
"psr-4": {
"Rid\\": "Framework/",
"Rid\\": "framework/",
"apps\\": "apps/"
},
"files": [
"Framework/Rid.php",
"Framework/functions.php"
"framework/Rid.php",
"framework/functions.php"
]
},
"repositories": {
Expand Down
12 changes: 6 additions & 6 deletions migration/ridpt.nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ server
#listen [::]:80;
server_name ridpt.top ridpt.rhilip.info;
index index.html index.htm index.php default.html default.htm default.php;
root /data/wwwroot/ridpt.top/apps/public/;
root /data/wwwroot/ridpt.top/public/;

#error_page 404 /404.html;

# Deny access to PHP files in specific directory
location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }

# Don't Log the access log of robots.txt or favicon.ico
location = /robots.txt { allow all; log_not_found off; access_log off; }
location = /favicon.ico { allow all; log_not_found off; access_log off; }

# security headers
#add_header X-Frame-Options "SAMEORIGIN" always;
#add_header X-XSS-Protection "1; mode=block" always;
#add_header X-Content-Type-Options "nosniff" always;
#add_header Referrer-Policy "no-referrer-when-downgrade" always;
#add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'" always;
#add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;

location = / {
rewrite ^(.*)$ /index last;
}
Expand All @@ -38,7 +38,7 @@ server
proxy_pass http://127.0.0.1:9501;
}
}

# assets, media
location ~* \.(?:css(\.map)?|js(\.map)?|jpe?g|png|gif|ico|cur|heic|webp|tiff?|mp3|m4a|aac|ogg|midi?|wav|mp4|mov|webm|mpe?g|avi|ogv|flv|wmv)$ {
expires 7d;
Expand All @@ -51,7 +51,7 @@ server
expires 7d;
access_log off;
}

# ACME-challenge
location ~ /.well-known {
allow all;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes

0 comments on commit cb3beae

Please sign in to comment.