Skip to content

Instantly share code, notes, and snippets.

Avatar
🇮🇩
aku ubuntu

Sugeng Tigefa tigefa4u

🇮🇩
aku ubuntu
View GitHub Profile
@tigefa4u
tigefa4u / redmine-unicorn-apache
Created Feb 5, 2016 — forked from danguita/redmine-unicorn-apache
Apache VirtualHost config with Unicorn workers proxy
View redmine-unicorn-apache
<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
ServerName redmine.yourdomain.com
DocumentRoot /home/service/apps/redmine/public
RewriteEngine On
<Proxy balancer://unicornservers>
@tigefa4u
tigefa4u / fonts-cdn.md
Last active Feb 5, 2016
Serving Fonts from CDN 👍
View fonts-cdn.md

The .htaccess or httpd.conf Code

The code can be placed with the .htaccess file or httpd.conf file:

# Apache config
<FilesMatch ".(eot|ttf|otf|woff)">
	Header set Access-Control-Allow-Origin "*"
</FilesMatch
@tigefa4u
tigefa4u / .explications_wp.md
Created Feb 5, 2016 — forked from Art2B/.explications_wp.md
Easy Wordpress with Apache2 on Ubuntu
View .explications_wp.md

#Easy Wordpress with Apache on Ubuntu

For the following instructions, I've use apache2 with ubuntu 14.04. The objective here is to setup quickly a wordpress site with a local domain name.

Create your Virtual host

Personnaly I follow this tutorial (french only). For your conf file, Copy the conf file I've uploaded.

##Setup Apache2 mod You need to enable mod_rewrite on apache to allow you to choose whatever url style you want. To do this run a2enmod rewrite then restart apache.

View apache2.conf.md

Setting up Apache on Ubuntu to proxy to Unicorn requires the following installation commands:

  • apt-get install apache2 -y
  • apt-get install libapache2-mod-proxy-html libxml2-dev -y
  • a2enmod headers
  • a2enmod proxy
  • a2enmod proxy_http
  • a2enmod proxy_balancer
  • a2enmod rewrite
  • a2enmod ssl
View apache-proxy-vhost
# Forward Proxy
<VirtualHost *:80>
ServerAdmin admin@localhost
RewriteEngine On
ProxyPreserveHost On
RewriteRule ^/(.*) http://<HOST-OR-IP>/$1 [P]
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
@tigefa4u
tigefa4u / post-receive
Last active Feb 3, 2016
Gitolite hooks/post-receive for jekyll
View post-receive
GIT_REPO=$HOME/repositories/nulldo.git
TMP_GIT_CLONE=$HOME/tmp/nulldo
PUBLIC_WWW=/var/www/html
git clone $GIT_REPO $TMP_GIT_CLONE
jekyll build -s $TMP_GIT_CLONE -d $PUBLIC_WWW
rm -Rf $TMP_GIT_CLONE
exit
@tigefa4u
tigefa4u / nulldo.conf
Last active Feb 2, 2016
👍 nulldo.xyz apache conf
View nulldo.conf
<VirtualHost *:80>
ServerName nulldo.xyz
ServerAlias www.nulldo.xyz
ServerAdmin prebuiltcode@gmail.com
DocumentRoot /var/www/html
<Directory /var/www/html>
AddHandler cgi-script .cgi
Options Indexes FollowSymLinks ExecCGI
@tigefa4u
tigefa4u / gist:f6393fc6e581a47362a8
Created Jan 27, 2016 — forked from faleev/gist:3435377
Compile FFmpeg on Ubuntu
View gist:f6393fc6e581a47362a8

Compile FFmpeg on Ubuntu

This guide supports Ubuntu Precise Pangolin 12.04, Ubuntu Oneiric Ocelot 11.10, Ubuntu Natty Narwhal 11.04, and Ubuntu Maverick Meerkat 10.10. Separate guides are available for Ubuntu Lucid Lynx 10.04 and Ubuntu Hardy Heron 8.04. This guide will enable several external encoding and decoding libraries: libfaac (AAC encoder), libfdk-aac (AAC encoder), libmp3lame (MP3 encoder), libopencore-amr (AMR encoder/decoder), librtmp (for additional RTMP protocols), libtheora (Theora encoder), libvorbis (Vorbis encoder), libvpx (VP8 encoder/decoder), and libx264 (H.264 encoder). These are optional and may be omitted if desired. This guide will also install many filters (see the filter list in the [Filtering Guide](https://ffmpeg.org/trac/ffmpeg/wiki/Fi

@tigefa4u
tigefa4u / ubuntu-server-setup.md
Last active Jan 27, 2016 — forked from jasperf/ubuntu-server-setup.md
Ubuntu Server Setup History installing Apache, mysql, PHP, git, SSH, WordPress using Backup buddy backup #lamp #ubuntu #wordpress
View ubuntu-server-setup.md

Ubuntu Server Setup

Installing LAMP Stack

Update All

sudo apt-get update
@tigefa4u
tigefa4u / maxmind_update.sh
Created Jan 8, 2016 — forked from vstoykov/maxmind_update.sh
Download MaxMind free database and place it in default location for pygeoip
View maxmind_update.sh
#!/bin/bash
if [ `whoami` != 'root' ]; then
echo "You must to be root"
exit
fi
DOWNLOAD_URL="http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz"
TEMPFILE="/tmp/GeoIPCity.dat"
TEMPFILEGZ="$TEMPFILE.gz"
GEOIP_DIR="/usr/local/share/GeoIP"