Skip to content

Instantly share code, notes, and snippets.

@muhafazakar
muhafazakar / PHP5_spawn_cgi_starter_initiation.conf
Last active December 5, 2015 06:29
PHP5 spawn cgi starter initiation
#!/bin/bash
#
# nano /usr/bin/php-fastcgi
#
FASTCGI_USER=www-data
FASTCGI_GROUP=www-data
SOCKET=/var/run/php-fastcgi/php-fastcgi.socket
PIDFILE=/var/run/php-fastcgi/php-fastcgi.pid
CHILDREN=6
@muhafazakar
muhafazakar / NGINX virtual server example - NGINX virtüel sucunu örnegi
Created December 5, 2015 06:24
NGINX virtual server example - NGINX virtüel sucunu örnegi
server {
listen 80;
server_name ornek.de www.ornek.de;
access_log /srv/www/logs/ornek.de/access.log;
error_log /srv/www/logs/ornek.de/error.log;
root /usr/local/nginx/html/ornek.de;
location / {
if ($request_method !~ ^(GET|HEAD|POST)$ ){
@muhafazakar
muhafazakar / fireHOL example service port mongoweb
Created December 5, 2015 06:19
fireHOL example service port mongoweb
#FHVER: 1:213
server_mongoweb_ports="tcp/28017"
client_mongoweb_ports="default"
@muhafazakar
muhafazakar / FireHOL example firehol.conf high secure burst connection limition
Created December 5, 2015 06:18
FireHOL example firehol.conf high secure burst connection limition
#
# $Id: client-all.conf,v 1.2 2002/12/31 15:44:34 ktsaou Exp $
#
# This configuration file will allow all requests originating from the
# local machine to be send through all network interfaces.
#
# No requests are allowed to come from the network. The host will be
# completely stealthed! It will not respond to anything, and it will
# not be pingable, although it will be able to originate anything
# (even pings to other hosts).
@muhafazakar
muhafazakar / NGINX init.d start stop script debian
Created December 5, 2015 06:14
NGINX init.d start stop script debian
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
@muhafazakar
muhafazakar / high secure & perfornce debian sysctl.conf setting - debian sysctl yüksek güven ve performas ayarlari
Created December 5, 2015 06:10
high secure & perfornce debian sysctl.conf setting - debian sysctl yüksek güven ve performas ayarlari
# Kernel sysctl configuration file for Linux
# Version 1.11 - 2015-07-07
# Aysad Kozanoglu Aysad K.
# This file should be saved as /etc/sysctl.conf and can be activated using the command:
# sysctl -e -p /etc/sysctl.conf
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and sysctl.conf(5) for more details.
#
@muhafazakar
muhafazakar / Cordova Notification de.appplant.cordova.plugin.local-notification
Created December 5, 2015 06:06
Cordova Notification de.appplant.cordova.plugin.local-notification
<!DOCTYPE html>
<html>
<head>
<title>Device Ready Example</title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8">
// Wait for device API libraries to load
//
function onLoad() {
@muhafazakar
muhafazakar / Cordova plugin camera foto cek kayit et server e jquery ajax ile yükle
Created December 5, 2015 05:57
Cordova Camera Plugin cordova-plugin-camera upload jquery ajax to server request
<!DOCTYPE html>
<!-- Aysad Kozanoglu -->
<html>
<head>
<title>foto cek</title>
<style>
html {
-webkit-user-select: none;
}
</style>
@muhafazakar
muhafazakar / Nginx block unwanted open proxy - istenmedik acik proxy yi bloke et
Created December 5, 2015 05:52
Nginx block unwanted open proxy, allow only POST, GET HEAD methods, No iframe embed - istenmedik acik proxy yi bloke et ve sadece POST GET HEAD methodlarine izin ver Iframe yerlestirmeyi yasakla
http{
...
#hide server version
server_tokens off;
# config to don't allow the browser to render the page inside an frame or iframe
add_header X-Frame-Options SAMEORIGIN;
server {
listen 80;
# don't send the nginx version number in error pages and Server header
server_tokens off;
# config to don't allow the browser to render the page inside an frame or iframe
# if you need to allow [i]frames, you can use SAMEORIGIN or even set an uri with ALLOW-FROM uri
add_header X-Frame-Options SAMEORIGIN;