Skip to content

Instantly share code, notes, and snippets.

View i-amolo's full-sized avatar

Innocent J. Blacius i-amolo

View GitHub Profile
@i-amolo
i-amolo / centos_php7_fresh.sh
Created November 20, 2018 17:10 — forked from nunorbatista/centos_php7_fresh.sh
PHP7 Centos 7 fresh install script
#/!/bin/bash
# update system
yum update -y
# install bind-utils
sudo yum install bind-utils
# Apache
yum install nano wget curl vim git httpd -y
@i-amolo
i-amolo / php7_build_ubuntu15.04.sh
Created November 28, 2018 11:09 — forked from tuanpmt/php7_build_ubuntu15.04.sh
Compiling PHP 7 on Ubuntu 15.04 with LDAP Support
#! /bin/bash
## PHP 7 Initial Compile ##
## Some help from the various places like these. ##
# http://www.zimuel.it/install-php-7/
# http://www.hashbangcode.com/blog/compiling-and-installing-php7-ubuntu
## Setup Ubuntu 15.04 ##
# I like the speed of Apt-Fast. Will check for installs some other day.
sudo apt-get install apt-fast
@i-amolo
i-amolo / ClientInfo.java
Created December 14, 2018 07:29 — forked from c0rp-aubakirov/ClientInfo.java
How to get full client info using servlet request, including client IP, browser, os, use-agent and referer
public void printClientInfo(HttpServletRequest request) {
final String referer = getReferer(request);
final String fullURL = getFullURL(request);
final String clientIpAddr = getClientIpAddr(request);
final String clientOS = getClientOS(request);
final String clientBrowser = getClientBrowser(request);
final String userAgent = getUserAgent(request);
logger.info("\n" +
@i-amolo
i-amolo / README.markdown
Last active February 18, 2019 07:20 — forked from marijn/README.markdown
List of countries in YAML, CSV and TXT format
@i-amolo
i-amolo / README.markdown
Created February 18, 2019 07:21 — forked from marijn/README.markdown
List of nationalities in YAML, CSV and TXT format

List of nationalities

It's time someone compiled a list of nationalities to use within a web application. This gist attempts to make a first move at that.

List of countries

I've also compiled a list of countries

<?xml version="1.0"?>
<tomcat-users>
<role rolename="tomcat" />
<role rolename="manager-gui" />
<role rolename="manager-script" />
<role rolename="manager-jmx" />
<role rolename="manager-status" />
<user
password="tomcat"
roles="tomcat,manager-gui,manager-script,manager-jmx,manager-status"
@i-amolo
i-amolo / tomcatmultihost.md
Created November 26, 2019 12:56 — forked from esfand/tomcatmultihost.md
Tomcat with Multiple Virtual Host

I configured my single tomcat to host 2 services at different connector port like this :-

<!-- WebApp 1-->
<Service name="webapps1">
    <Connector port="7001" 
               maxThreads="150" 
               minSpareThreads="25" 
               maxSpareThreads="75" 
 enableLookups="false" 
@i-amolo
i-amolo / httpd.vhosts.conf
Created November 26, 2019 12:57 — forked from mhulse/httpd.vhosts.conf
Apache Tomcat 8.0: How to get “Virtual hosting” to work with port removed on OS X Yosemite?
# http://tomcat.apache.org/tomcat-7.0-doc/proxy-howto.html
# https://gerrydevstory.com/2013/06/29/tomcat-apache-reverse-proxy/
# http://www.latko.org/2009/02/12/installing-tomcat-60x-behind-apache-22x/
# http://stackoverflow.com/a/20584597/922323
# https://raajasoft.wordpress.com/2011/11/27/to-shorten-the-tomcat-application-url/
# http://www.christianroessler.net/tech/2012/apache-vhost-proxy-and-static-files.html
# http://sysadminnotebook.blogspot.com/2011/08/apache-reverse-proxy-of-virtual-hosts.html
# http://stackoverflow.com/a/8823415/922323
<VirtualHost *:80>
ServerName tomcat.local
@i-amolo
i-amolo / apache-tomcat-ajp-boot.md
Created November 26, 2019 12:59 — forked from heme/apache-tomcat-ajp-boot.md
OSX: Apache & Tomcat Auto Start Port 80 thru AJP
@i-amolo
i-amolo / apache-tomcat.md
Created November 26, 2019 13:00 — forked from canujohann/apache-tomcat.md
Tomcat+Apacheの連動

TOMCAT-APACHEの連動

apacheとtomcatを連動させるにはモジュール(connector)を利用します。

alt text

いくつかのモジュールが存在しますが、基本的に一番使われているものは

  1. mod_ajp
  2. mod_jk