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 | |
# CentOS6 Auto Install Nginx MySQL PHP-FPM memcached and iptables setting | |
# Argument is "YoursiteDomain" | |
# Use ex. ./startup.sh example.com | |
if [ $# -ne 1 ]; then | |
echo "argument is missing" | |
exit 1 | |
fi |
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
<!--OGP--> | |
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#"> | |
<meta property="og:type" content="article" /> | |
<meta property="og:title" content="タイトル" /> | |
<meta property="og:description" content="要約" /> | |
<meta property="og:image" content="http://example.com/foo.png" /> | |
<meta property="og:site_name" content="タイトル" /> | |
<meta property="og:url" content="http://example.com/hogehoge/" /> | |
<!--Twitter Card--> | |
<meta property="twitter:card" content="summary" /> |
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
<?php | |
$port = @$parts['port'] = 443; // At iLne 383 | |
?> |
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 ssl; | |
server_name example.com; | |
ssl_certificate /etc/ssl/certs/hogehoge; | |
ssl_certificate_key /etc/ssl/certs/hogehoge; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; | |
ssl_prefer_server_ciphers on; | |
} |
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 /foo/bar/ { | |
root /hoge/; | |
proxy_pass http://example.com/foo/bar/; | |
proxy_cache_valid 200 302 60m; | |
expires 7d; | |
} |
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$ { | |
root /hoge/; | |
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
if ($request_uri ~* "(png|jpg$|css|js)") { | |
expires 7d; | |
break; | |
} |
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
#/etc/sysctl.conf | |
kernel.panic=15 | |
vm.overcommit_memory=2 | |
#Source:http://passingloop.tumblr.com/post/11957331420/overcommit-and-oom-killer |
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
[root@hoge ~]# ulimit -a | |
core file size (blocks, -c) 0 | |
data seg size (kbytes, -d) unlimited | |
scheduling priority (-e) 0 | |
file size (blocks, -f) unlimited | |
pending signals (-i) 63896 | |
max locked memory (kbytes, -l) 32 | |
max memory size (kbytes, -m) unlimited | |
open files (-n) 1024 | |
pipe size (512 bytes, -p) 8 |
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 | |
echo 3 > /proc/sys/vm/drop_caches; | |
echo 0 > /proc/sys/vm/drop_caches; | |
#cronで回せばいいんじゃないかな? |
OlderNewer