Custom domain certificate issue: Bad request & etc...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 安装zsh | |
| brew install zsh | |
| 设置zsh为默认shell | |
| mate /etc/shells | |
| 在文末增加: | |
| /usr/local/bin/zsh | |
| 将zsh设置为默认的Shell: |
Prereq:
apt-get install zsh
apt-get install git-coreGetting zsh to work in ubuntu is weird, since sh does not understand the source command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
- Issue the following commands from the command line in your Yii application directory:
chmod +x psyiimkdir extensions/yiishellwget -O extensions/yiishell/psysh psysh.org/psyshchmod +x extensions/yiishell/psysh
- Copy the file
init.phpbelow topsysh/init.phpand update any paths to work with your application configuration - Copy the file
config.phpbelow topsysh/config.php. Change or add to the config array with the options you'd like to use (available options) - Now you can start PsySH with the command
./psyii psysh/init.php --config psysh/config.php
Reference: RFC 2616 - HTTP Status Code Definitions
- 400 BAD REQUEST: The request was invalid or cannot be otherwise served. An accompanying error message will explain further. For security reasons, requests without authentication are considered invalid and will yield this response.
- 401 UNAUTHORIZED: The authentication credentials are missing, or if supplied are not valid or not sufficient to access the resource.
- 403 FORBIDDEN: The request has been refused. See the accompanying message for the specific reason (most likely for exceeding rate limit).
- 404 NOT FOUND: The URI requested is invalid or the resource requested does not exists.
- 406 NOT ACCEPTABLE: The request specified an invalid format.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| exports.handler = (event, context, callback) => { | |
| // Get request and request headers | |
| const request = event.Records[0].cf.request; | |
| const headers = request.headers; | |
| // Configure authentication | |
| const authUser = 'user'; | |
| const authPass = 'pass'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Uncomment to print commands being executed | |
| # set -x | |
| pid=0 | |
| # SIGTERM-handler | |
| term_handler() { | |
| echo "Handler INT"; | |
| if [ $pid -ne 0 ]; then | |
| kill -SIGTERM "$pid" | |
| wait "$pid" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Playbook - http://play.golang.org/p/3wFl4lacjX | |
| package main | |
| import ( | |
| "bytes" | |
| "crypto/aes" | |
| "crypto/cipher" | |
| "crypto/rand" | |
| "encoding/base64" |
OlderNewer