This file contains 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
#!/bin/bash | |
# To use: | |
# wget https://gist.githubusercontent.com/indapublic/11370314/raw/7cf3d956a02d90679988a1f1ca660104ec8e1fbc/amazon-install-redis.sh | |
# chmod 777 amazon-install-redis.sh | |
# ./amazon-install-redis.sh | |
############################################### | |
echo "*****************************************" | |
echo " 1. Prerequisites: Install updates, set time zones, install GCC and make" | |
echo "*****************************************" | |
#sudo yum -y update |
This file contains 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
upstream php-fpm { | |
server unix:/var/run/php-fpm/php-fpm.sock; | |
} | |
proxy_connect_timeout 900; | |
proxy_send_timeout 900; | |
proxy_read_timeout 900; | |
fastcgi_send_timeout 900; | |
fastcgi_read_timeout 900; | |
proxy_buffer_size 128k; |
This file contains 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
listen.owner = nginx | |
listen.group = nginx | |
listen.mode = 0664 | |
listen.allowed_clients = 127.0.0.1 | |
pm = dynamic | |
pm.max_children = 50 | |
pm.start_servers = 15 | |
pm.min_spare_servers = 5 | |
pm.max_spare_servers = 25 | |
pm.process_idle_timeout = 60s |
This file contains 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
#!/bin/bash | |
# | |
# validate nginx config | |
# | |
# depends upon a symbolic link from /var/apps/redirector to dist directory | |
# and a build of nginx which supports real_ip and other extensions | |
# | |
# probably best to build a chroot'd tree containing a complete nginx server | |
# though that's a lot of work to copy in shared libraries, etc |
This file contains 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
worker_processes 1; | |
error_log /var/log/nginx/error.log debug; | |
events { | |
worker_connections 30; | |
} | |
http { | |
include mime.types; |
This file contains 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
location ~ \.php$ { | |
try_files $uri = 404; | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} |
This file contains 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
server { | |
listen 80; | |
server_name localhost; | |
root /var/www/default/; | |
access_log /var/log/nginx/default.access.log main; | |
location / { | |
include /usr/local/etc/nginx/conf.d/php-fpm; | |
} |
This file contains 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
server { | |
listen 443; | |
server_name localhost; | |
root /var/www/default/; | |
access_log /var/log/nginx/default-ssl.access.log main; | |
ssl on; | |
ssl_certificate ssl/localhost.crt; | |
ssl_certificate_key ssl/localhost.key; |
This file contains 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
server { | |
listen 306; | |
server_name localhost; | |
root /usr/local/share/phpmyadmin; | |
error_log /var/log/nginx/phpmyadmin.error.log; | |
access_log /var/log/nginx/phpmyadmin.access.log main; | |
ssl on; | |
ssl_certificate ssl/phpmyadmin.crt; |
This file contains 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
// IE7 support for querySelectorAll in 274 bytes. Supports multiple / grouped selectors and the attribute selector with a "for" attribute. http://www.codecouch.com/ | |
(function(d,s){d=document,s=d.createStyleSheet();d.querySelectorAll=function(r,c,i,j,a){a=d.all,c=[],r=r.replace(/\[for\b/gi,'[htmlFor').split(',');for(i=r.length;i--;){s.addRule(r[i],'k:v');for(j=a.length;j--;)a[j].currentStyle.k&&c.push(a[j]);s.removeRule(0)}return c}})() |
OlderNewer