Thursday, January 12, 2017

how to get apache build options

change directory to your apache directory

/usr/local/Cellar/httpd24/2.4.23_2

then go to build directory

cd build

see the config.nice file
$ cat config.nice
#! /bin/sh
#
# Created by configure

CC="clang"; export CC
"./configure" \
"--enable-layout=Homebrew" \
"--enable-mods-shared=all" \
"--enable-unique-id" \
"--enable-ssl" \
"--enable-dav" \
"--enable-cache" \
"--enable-logio" \
"--enable-deflate" \
"--enable-cgi" \
"--enable-cgid" \
"--enable-suexec" \
"--enable-rewrite" \
"--with-apr=/usr/local/opt/apr" \
"--with-apr-util=/usr/local/opt/apr-util" \
"--with-pcre=/usr/local/opt/pcre" \
"--with-ssl=/usr/local/opt/openssl" \
"--with-z=/usr/local/opt/zlib" \
"--with-mpm=prefork" \
"--with-port=8080" \
"--with-sslport=8443" \
"CC=clang" \
"$@"

you can see the build options

you can check by httpd -V also.
cd ../bin

$ ./httpd -V
Server version: Apache/2.4.23 (Unix)
Server built:   Sep 27 2016 15:41:45
Server's Module Magic Number: 20120211:61
Server loaded:  APR 1.5.2, APR-UTIL 1.5.4
Compiled using: APR 1.5.2, APR-UTIL 1.5.4
Architecture:   64-bit
Server MPM:     prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT="/usr/local/Cellar/httpd24/2.4.23_2"
-D SUEXEC_BIN="/usr/local/Cellar/httpd24/2.4.23_2/bin/suexec"
-D DEFAULT_PIDLOG="/usr/local/var/run/apache2/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="/usr/local/etc/apache2/2.4/mime.types"
-D SERVER_CONFIG_FILE="/usr/local/etc/apache2/2.4/httpd.conf"

Wednesday, May 4, 2016

With my two sons

2nd son is crying

1st son is also crying

by my macbook camera

Thursday, April 7, 2016

Install apache2 on OSX with Homebrew

Installation
brew tap homebrew/apache
brew install httpd24

or

brew install homebrew/apache/httpd24
(if you want to use apache 2.2, then use httpd22 instead of httpd24)

It works! (default port is 8080)

info
brew info httpd24

remove
brew remove httpd22

go to configuration directory
$(brew --prefix)/etc/apache2/2.4

restart
brew services restart httpd24
(but it's not work in tmux environment. why?)

start
brew services start httpd24

stop
brew services stop httpd24

log directory
/usr/local/var/log/apache2

references