Travis stuff aint needed anymore
This commit is contained in:
parent
d5bbed1eac
commit
4f464af605
6 changed files with 0 additions and 191 deletions
|
@ -1,39 +0,0 @@
|
||||||
fastcgi_param QUERY_STRING $query_string;
|
|
||||||
fastcgi_param REQUEST_METHOD $request_method;
|
|
||||||
fastcgi_param CONTENT_TYPE $content_type;
|
|
||||||
fastcgi_param CONTENT_LENGTH $content_length;
|
|
||||||
|
|
||||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
|
||||||
fastcgi_param REQUEST_URI $request_uri;
|
|
||||||
fastcgi_param DOCUMENT_URI $document_uri;
|
|
||||||
fastcgi_param DOCUMENT_ROOT $document_root;
|
|
||||||
fastcgi_param SERVER_PROTOCOL $server_protocol;
|
|
||||||
fastcgi_param HTTPS $https if_not_empty;
|
|
||||||
|
|
||||||
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
|
|
||||||
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
|
|
||||||
|
|
||||||
fastcgi_param REMOTE_ADDR $remote_addr;
|
|
||||||
fastcgi_param REMOTE_PORT $remote_port;
|
|
||||||
fastcgi_param SERVER_ADDR $server_addr;
|
|
||||||
fastcgi_param SERVER_PORT $server_port;
|
|
||||||
fastcgi_param SERVER_NAME $server_name;
|
|
||||||
|
|
||||||
# PHP only, required if PHP was built with --enable-force-cgi-redirect
|
|
||||||
fastcgi_param REDIRECT_STATUS 200;
|
|
||||||
|
|
||||||
fastcgi_split_path_info ^(.+\.php)(.*)$;
|
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
||||||
#fastcgi_index index.php;
|
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
||||||
|
|
||||||
# fastcgi_intercept_errors on;
|
|
||||||
fastcgi_ignore_client_abort off;
|
|
||||||
fastcgi_connect_timeout 60;
|
|
||||||
fastcgi_send_timeout 1800;
|
|
||||||
fastcgi_read_timeout 1800;
|
|
||||||
fastcgi_buffer_size 128k;
|
|
||||||
fastcgi_buffers 4 256k;
|
|
||||||
fastcgi_busy_buffers_size 256k;
|
|
||||||
fastcgi_temp_file_write_size 256k;
|
|
||||||
fastcgi_keep_conn on;
|
|
|
@ -1,47 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
set -x
|
|
||||||
|
|
||||||
DIR=$(realpath $(dirname "$0"))
|
|
||||||
USER=$(whoami)
|
|
||||||
PHP_VERSION=$(phpenv version-name)
|
|
||||||
ROOT=$(realpath "$DIR/..")
|
|
||||||
HTTP_PORT=8000
|
|
||||||
PHP_PORT=9000
|
|
||||||
SERVER="/tmp/php.sock"
|
|
||||||
|
|
||||||
function tpl {
|
|
||||||
sed \
|
|
||||||
-e "s|{DIR}|$DIR|g" \
|
|
||||||
-e "s|{USER}|$USER|g" \
|
|
||||||
-e "s|{PHP_VERSION}|$PHP_VERSION|g" \
|
|
||||||
-e "s|{ROOT}|$ROOT|g" \
|
|
||||||
-e "s|{HTTP_PORT}|$HTTP_PORT|g" \
|
|
||||||
-e "s|{PHP_PORT}|$PHP_PORT|g" \
|
|
||||||
-e "s|{SERVER}|$SERVER|g" \
|
|
||||||
< $1 > $2
|
|
||||||
}
|
|
||||||
|
|
||||||
# Make some working directories.
|
|
||||||
mkdir "$DIR/nginx"
|
|
||||||
mkdir "$DIR/nginx/sites-enabled"
|
|
||||||
mkdir "$DIR/var"
|
|
||||||
|
|
||||||
PHP_FPM_BIN="$HOME/.phpenv/versions/$PHP_VERSION/sbin/php-fpm"
|
|
||||||
PHP_FPM_CONF="$DIR/nginx/php-fpm.conf"
|
|
||||||
|
|
||||||
# Build the php-fpm.conf.
|
|
||||||
tpl "$DIR/php-fpm.tpl.conf" "$PHP_FPM_CONF"
|
|
||||||
|
|
||||||
# Start php-fpm
|
|
||||||
"$PHP_FPM_BIN" --fpm-config "$PHP_FPM_CONF"
|
|
||||||
|
|
||||||
# Build the default nginx config files.
|
|
||||||
tpl "$DIR/nginx.tpl.conf" "$DIR/nginx/nginx.conf"
|
|
||||||
tpl "$DIR/fastcgi.tpl.conf" "$DIR/nginx/fastcgi.conf"
|
|
||||||
tpl "$DIR/longurl.tpl.conf" "$DIR/nginx/sites-enabled/longurl.conf"
|
|
||||||
tpl "$DIR/shorturl.tpl.conf" "$DIR/nginx/sites-enabled/shorturl.conf"
|
|
||||||
|
|
||||||
# Start nginx.
|
|
||||||
nginx -c "$DIR/nginx/nginx.conf"
|
|
|
@ -1,21 +0,0 @@
|
||||||
server {
|
|
||||||
listen {HTTP_PORT} default_server;
|
|
||||||
listen [::]:{HTTP_PORT} default_server ipv6only=on;
|
|
||||||
server_name jonnybarnes.localhost;
|
|
||||||
|
|
||||||
root {ROOT}/public;
|
|
||||||
index index.php;
|
|
||||||
|
|
||||||
access_log /tmp/access.log;
|
|
||||||
error_log /tmp/error.log;
|
|
||||||
|
|
||||||
location / {
|
|
||||||
# First attempt to serve request as file, then as directory, then fall back to index.php.
|
|
||||||
try_files $uri $uri/ /index.php$is_args$args;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~* "\.php(/|$)" {
|
|
||||||
include fastcgi.conf;
|
|
||||||
fastcgi_pass php;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,53 +0,0 @@
|
||||||
worker_processes 1;
|
|
||||||
error_log /tmp/error.log;
|
|
||||||
pid /tmp/nginx.pid;
|
|
||||||
|
|
||||||
|
|
||||||
events {
|
|
||||||
worker_connections 1024;
|
|
||||||
}
|
|
||||||
|
|
||||||
http {
|
|
||||||
# Set an array of temp and cache file options that will otherwise default to restricted locations accessible only to root.
|
|
||||||
client_body_temp_path /tmp/client_body;
|
|
||||||
fastcgi_temp_path /tmp/fastcgi_temp;
|
|
||||||
proxy_temp_path /tmp/proxy_temp;
|
|
||||||
scgi_temp_path /tmp/scgi_temp;
|
|
||||||
uwsgi_temp_path /tmp/uwsgi_temp;
|
|
||||||
|
|
||||||
##
|
|
||||||
# Basic Settings
|
|
||||||
##
|
|
||||||
sendfile on;
|
|
||||||
tcp_nopush on;
|
|
||||||
tcp_nodelay on;
|
|
||||||
keepalive_timeout 65;
|
|
||||||
types_hash_max_size 2048;
|
|
||||||
# server_tokens off;
|
|
||||||
# server_names_hash_bucket_size 64;
|
|
||||||
# server_name_in_redirect off;
|
|
||||||
include /etc/nginx/mime.types;
|
|
||||||
default_type application/octet-stream;
|
|
||||||
|
|
||||||
##
|
|
||||||
# Logging Settings
|
|
||||||
##
|
|
||||||
access_log /tmp/access.log;
|
|
||||||
error_log /tmp/error.log;
|
|
||||||
|
|
||||||
##
|
|
||||||
# Gzip Settings
|
|
||||||
##
|
|
||||||
gzip on;
|
|
||||||
gzip_disable "msie6";
|
|
||||||
|
|
||||||
##
|
|
||||||
# Virtual Host Configs
|
|
||||||
##
|
|
||||||
# include {DIR}/nginx/conf.d/*.conf;
|
|
||||||
include {DIR}/nginx/sites-enabled/*;
|
|
||||||
|
|
||||||
upstream php {
|
|
||||||
server 127.0.0.1:{PHP_PORT};
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
[global]
|
|
||||||
error_log = /tmp/php-fpm.error.log
|
|
||||||
|
|
||||||
[travis]
|
|
||||||
user = {USER}
|
|
||||||
listen = {PHP_PORT}
|
|
||||||
listen.mode = 0666
|
|
||||||
pm = static
|
|
||||||
pm.max_children = 5
|
|
||||||
php_admin_value[memory_limit] = 32M
|
|
|
@ -1,21 +0,0 @@
|
||||||
server {
|
|
||||||
listen {HTTP_PORT};
|
|
||||||
listen [::]:{HTTP_PORT};
|
|
||||||
server_name jmb.localhost;
|
|
||||||
|
|
||||||
root {ROOT}/public;
|
|
||||||
index index.php;
|
|
||||||
|
|
||||||
access_log /tmp/access.log;
|
|
||||||
error_log /tmp/error.log;
|
|
||||||
|
|
||||||
location / {
|
|
||||||
# First attempt to serve request as file, then as directory, then fall back to index.php.
|
|
||||||
try_files $uri $uri/ /index.php$is_args$args;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~* "\.php(/|$)" {
|
|
||||||
include fastcgi.conf;
|
|
||||||
fastcgi_pass php;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue