# 만약 인증서 파일의 bundle(중간 인증서 혹은 보조 파일)이 있을 경우,
# 두 파일을 병합해서 사용한다.
# cat example.com.crt ca_bundle.crt > cert.pem
Work/Web
- https 인증서 파일 + 중간 인증서 2024.10.18
- APACHE HTTP SERVER 빌드 2019.07.10
- HTTP TRACE/TRACK Method Supported 2018.09.20
- get time zone 2017.06.14
- phpinfo() 빈화면 출력될 때!!!! 2017.01.02
https 인증서 파일 + 중간 인증서
APACHE HTTP SERVER 빌드
1. get files httpd, apr, apr-util
wget http://apache.mirror.cdnetworks.com//httpd/httpd-2.4.39.tar.gz
tar xzvf httpd-2.4.39.tar.gz
cd httpd-2.4.39/srclib
wget http://apache.tt.co.kr//apr/apr-1.7.0.tar.gz
tar xzvf apr-1.7.0.tar.gz
ln -s apr-1.7.0 apr
wget http://apache.tt.co.kr//apr/apr-util-1.6.1.tar.gz
tar xzvf apr-util-1.6.1.tar.gz
ln -s apr-util-1.6.1 apr-util
2. Perl-Compatible Regular Expressions Library (PCRE) This library is required but not longer bundled with httpd. Download the source code from http://www.pcre.org, or install a Port or Package. If your build system can't find the pcre-config script installed by the PCRE build, point to it using the --with-pcre parameter. On some platforms, you may have to install the corresponding -dev package to allow httpd to build against your installed copy of PCRE.
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz
tar xzvf pcre-8.43.tar.gz
cd pcre-8.43
./configure && make
3. apache build
cd ../..
./configure --with-included-apr --with-pcre=./srclib/pcre-8.43/pcre-config
configure: summary of build options: |
make
Making all in srclib |
sudo apt-get install libexpat1-dev
make
/work/httpd-2.4.39/srclib/apr/libtool --silent --mode=compile gcc -std=gnu99 -g -O2 -pthread -DLINUX -D_REENTRANT -D_GNU_SOURCE -I. -I/work/httpd-2.4.39/os/unix -I/work/httpd-2.4.39/include -I/work/httpd-2.4.39/srclib/apr/include -I/work/httpd-2.4.39/srclib/apr-util/include -I/usr/local/include -I/work/httpd-2.4.39/modules/aaa -I/work/httpd-2.4.39/modules/cache -I/work/httpd-2.4.39/modules/core -I/work/httpd-2.4.39/modules/database -I/work/httpd-2.4.39/modules/filters -I/work/httpd-2.4.39/modules/ldap -I/work/httpd-2.4.39/modules/loggers -I/work/httpd-2.4.39/modules/lua -I/work/httpd-2.4.39/modules/proxy -I/work/httpd-2.4.39/modules/http2 -I/work/httpd-2.4.39/modules/session -I/work/httpd-2.4.39/modules/ssl -I/work/httpd-2.4.39/modules/test -I/work/httpd-2.4.39/server -I/work/httpd-2.4.39/modules/md -I/work/httpd-2.4.39/modules/arch/unix -I/work/httpd-2.4.39/modules/dav/main -I/work/httpd-2.4.39/modules/generators -I/work/httpd-2.4.39/modules/mappers -prefer-non-pic -static -c util_pcre.c && touch util_pcre.lo util_pcre.c:58:18: fatal error: pcre.h: No such file or directory #include "pcre.h" ^ compilation terminated. make[2]: *** [util_pcre.lo] Error 1 make[2]: Leaving directory `/work/httpd-2.4.39/server' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/work/httpd-2.4.39/server' make: *** [all-recursive] Error 1 |
make CFLAGS=-I`pwd`/srclib/pcre-8.43/
/work/httpd-2.4.39/srclib/apr/libtool --silent --mode=link gcc -std=gnu99 -g -O2 -pthread -I/work/httpd-2.4.39/srclib/pcre-8.43/ -o htpasswd htpasswd.lo passwd_common.lo /work/httpd-2.4.39/srclib/apr-util/libaprutil-1.la /work/httpd-2.4.39/srclib/apr/libapr-1.la -lrt -lcrypt -lpthread -ldl -lcrypt /work/httpd-2.4.39/srclib/apr-util/.libs/libaprutil-1.so: undefined reference to `XML_GetErrorCode' /work/httpd-2.4.39/srclib/apr-util/.libs/libaprutil-1.so: undefined reference to `XML_SetEntityDeclHandler' /work/httpd-2.4.39/srclib/apr-util/.libs/libaprutil-1.so: undefined reference to `XML_ParserCreate' /work/httpd-2.4.39/srclib/apr-util/.libs/libaprutil-1.so: undefined reference to `XML_SetCharacterDataHandler' /work/httpd-2.4.39/srclib/apr-util/.libs/libaprutil-1.so: undefined reference to `XML_ParserFree' /work/httpd-2.4.39/srclib/apr-util/.libs/libaprutil-1.so: undefined reference to `XML_SetUserData' /work/httpd-2.4.39/srclib/apr-util/.libs/libaprutil-1.so: undefined reference to `XML_StopParser' /work/httpd-2.4.39/srclib/apr-util/.libs/libaprutil-1.so: undefined reference to `XML_Parse' /work/httpd-2.4.39/srclib/apr-util/.libs/libaprutil-1.so: undefined reference to `XML_ErrorString' /work/httpd-2.4.39/srclib/apr-util/.libs/libaprutil-1.so: undefined reference to `XML_SetElementHandler' collect2: error: ld returned 1 exit status make[2]: *** [htpasswd] Error 1 make[2]: Leaving directory `/work/httpd-2.4.39/support' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/work/httpd-2.4.39/support' make: *** [all-recursive] Error 1 |
cd srclib
wget expat-2.2.7.tar.lz
tar -xzf expat-2.2.7.tar.lz gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now |
tar --lzip -xf expat-2.2.7.tar.lz tar (child): lzip: Cannot exec: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now |
sudo apt install lzip |
tar --lzip -xf expat-2.2.7.tar.lz |
cd expat-2.2.7 && ./configure && make
cd ../..
./configure --with-included-apr --with-pcre=./srclib/pcre-8.43/pcre-config --with-expat=./srclib/expat-2.2.7
make
/work/httpd-2.4.39/srclib/apr/libtool --silent --mode=link gcc -std=gnu99 -g -O2 -pthread -L./srclib/expat-2.2.7/lib -o libmain.la -static config.lo log.lo main.lo vhost.lo util.lo util_fcgi.lo util_script.lo util_md5.lo util_cfgtree.lo util_ebcdic.lo util_time.lo connection.lo listen.lo util_mutex.lo mpm_common.lo mpm_unix.lo mpm_fdqueue.lo util_charset.lo util_cookies.lo util_debug.lo util_xml.lo util_filter.lo util_pcre.lo util_regex.lo exports.lo scoreboard.lo error_bucket.lo protocol.lo core.lo request.lo provider.lo eoc_bucket.lo eor_bucket.lo core_filters.lo util_expr_parse.lo util_expr_scan.lo util_expr_eval.lo /work/httpd-2.4.39/srclib/apr/libtool: line 7475: cd: ./srclib/expat-2.2.7/lib: No such file or directory libtool: error: cannot determine absolute directory name of './srclib/expat-2.2.7/lib' make[2]: *** [libmain.la] Error 1 make[2]: Leaving directory `/work/httpd-2.4.39/server' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/work/httpd-2.4.39/server' make: *** [all-recursive] Error 1 |
./configure --with-included-apr --with-pcre=./srclib/pcre-8.43/pcre-config --with-expat=`pwd`/srclib/expat-2.2.7
make
/work/httpd-2.4.39/srclib/apr/libtool --silent --mode=link gcc -std=gnu99 -g -O2 -pthread -L/work/httpd-2.4.39/srclib/expat-2.2.7/lib -o httpd modules.lo buildmark.o -export-dynamic server/libmain.la modules/core/libmod_so.la modules/http/libmod_http.la server/mpm/event/libevent.la os/unix/libos.la -L/usr/local/lib -lpcre /work/httpd-2.4.39/srclib/apr-util/libaprutil-1.la -lexpat /work/httpd-2.4.39/srclib/apr/libapr-1.la -lrt -lcrypt -lpthread -ldl /usr/bin/ld: cannot find -lpcre collect2: error: ld returned 1 exit status make[1]: *** [httpd] Error 1 make[1]: Leaving directory `/work/httpd-2.4.39' make: *** [all-recursive] Error 1 |
make CFLAGS=-I`pwd`/srclib/pcre-8.43/ LDFLAGS=-L`pwd`/srclib/pcre-8.43
./httpd
lt-httpd: Could not open configuration file /usr/local/apache2/conf/httpd.conf: No such file or directory |
-end-
HTTP TRACE/TRACK Method Supported
StackOverflow
https://stackoverflow.com/questions/10673306/disable-track-and-trace-in-apache
$ curl -v -X TRACE http://[id]:[password]@webserveraddress
* Rebuilt URL to: http://[id]:[password]@webserveraddress
* Hostname was NOT found in DNS cache
* Trying webserveraddress...
* Connected to webserveraddress (webserveraddress) port 80 (#0)
* Server auth using Basic with user 'id'
> TRACE / HTTP/1.1
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.35.0
> Host: webserveraddress
> Accept: */*
>
< HTTP/1.1 405 Method Not Allowed
< Date: Thu, 20 Sep 2018 02:40:25 GMT
* Server Apache/2.4.34 (Unix) mod_fcgid/2.3.9 is not blacklisted
< Server: Apache/2.4.34 (Unix) mod_fcgid/2.3.9
< Allow:
< Content-Length: 316
< Content-Type: text/html; charset=iso-8859-1
<
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>405 Method Not Allowed</title>
</head><body>
<h1>Method Not Allowed</h1>
<p>The requested method TRACE is not allowed for the URL /.</p>
<hr>
<address>Apache/2.4.34 (Unix) mod_fcgid/2.3.9 Server at webserveraddress Port 80</address>
</body></html>
* Connection #0 to host webserveraddress left intact
get time zone
<!DOCTYPE html>
<html>
<body>
<p id="demo"></p>
<script>
var d = new Date();
document.getElementById("demo").innerHTML = d;
alert(d.getTimezoneOffset()/-60);
</script>
</body>
</html>
phpinfo() 빈화면 출력될 때!!!!
와 미치겠네 ..;;;
phpinfo 출력안되서 뭐 잘못했나 하루죙일 뒤졌는데..
허무하네..ㅠㅠ
오메...황당한거..
이렇게 씀...절대 안나옴 ;;;v 5.3.1
<? phpinfo(); ?>
욜케 바꿈 -_-;;;;으아아아아아아...
<?php phpinfo(); ?>
출처..http://kernel-baramil.blogspot.kr/2014/02/phpinfo.html