Skip to content

Instantly share code, notes, and snippets.

server {
listen 80;
server_name youdomainname.com www.yourdomainname.com;
root /path/to/your/web/directory;
charset utf-8;
index index.php index.html;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php7.0-fpm.sock;
server {
listen 80;
root /path/to/your/application;
index index.html index.htm;
server_name yourdomain.com;
}
/*
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
#!/bin/sh
php /srv/multicraft/scripts/run.php "RestartServer:server=$SERVER_ID,time=7"
[RestartServer]
servers=all
command={BASE_DIR}/scripts/restartServer.sh
[Test]
servers=all
command={BASE_DIR}/scripts/test.sh
@brianmcdo
brianmcdo / image-proxy.php
Last active March 12, 2019 20:56
Image Proxy PHP
<?php
class Proxy {
protected $allowed = [];
public function __construct()
{
if(!isset($_GET['url'])) {
header("HTTP/1.0 404 Not Found");
@brianmcdo
brianmcdo / nginx-ssl
Created April 17, 2016 04:36
nginx-ssl
ssl_session_cache shared:ssl_session_cache:10m;
ssl_certificate /path/to/bundle.crt;
ssl_certificate_key /path/to/certificate.key;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
include sslconfig/conf;
@brianmcdo
brianmcdo / preprocessor_fun.h
Created December 19, 2015 07:04 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
server {
listen 80; ## listen for ipv4; this line is default and implied
server_name munin.example.com;
location / {
alias /var/cache/munin/www/;
}
location ^~ /munin-cgi/munin-cgi-graph/ {
## To create a custom config for a mod create a file with the same name
## as the jar file and append ".conf", for craftbukkit this would be
## "craftbukkit.jar.conf".
## The following config is an example that lists all possible options,
## without actually changing anything (it remaps the commands on
## themselves)
##
## General configuration. If this contains a setting called "file" the
## [commands], [start] and [parse_*] sections will be loaded from this
## other file