--------------------- Apache เริ่มเลย -------------------------
กำหนด ชื่อเครื่อง หรือ DNS ให้เรียบร้อยก่อนติดตั้ง
# ee /etc/hosts
::1 localhost localhost.name.com
127.0.0.1 localhost localhost.name.com
192.168.1.10 host.name.com
#ee /etc/resolve.conf
nameserver 127.0.0.1
1 # cd /usr/ports/www/apache22
2 # make WITH_SSL_MODULES=yes WITH_THREADS=yes WITH_AUTHN_ALIAS=yes WITH_LOG_FORENSIC=yes WITH_CGI=yes WITH_USERTRACK=yes WITH_CERN_META=yes WITH_EXPIRES=yes WITH_MIME_MAGIC=yes WITH_REWRITE=yes WITH_VHOST_ALIAS=yes WITH_HEADERS=yes install clean
====== หรือ force to install
# make WITH_FORCE_PKG_REGISTER=yes WITH_SSL_MODULES=yes WITH_THREADS=yes WITH_AUTHN_ALIAS=yes WITH_LOG_FORENSIC=yes WITH_CGI=yes WITH_USERTRACK=yes WITH_CERN_META=yes WITH_EXPIRES=yes WITH_MIME_MAGIC=yes WITH_REWRITE=yes WITH_VHOST_ALIAS=yes WITH_HEADERS=yes install clean
======
3 # rehash
5 # ee /etc/rc.conf
apache22_enable="YES"
apache22_http_accept_enable="YES"
6 # cp /usr/local/etc/apache22/httpd.conf /usr/local/etc/apache22/httpd.conf-original
7 # ee /usr/local/etc/apache22/httpd.conf
ServerAdmin noomloveu@name.com ;(~140)
ServerName n1.name.com:80 ;(~149),
Include etc/apache22/extra/httpd-ssl.conf ;(~451)
!Remark
Include etc/apache22/extra/httpd-ssl.conf
¶éÒ config äÁè¶Ù¡·ÓãËé error wanning fail to start ä´é
# ee /usr/local/etc/apache22/extra/httpd-ssl.conf
ServerName host.example.com:443 ;(~78)
ServerAdmin you@example.com
SSLCertificateFile /usr/local/openssl/certs/orchid3.siamnk.net-cert.pem ;(~99)
SSLCertificateKeyFile /usr/local/openssl/certs/orchid3.siamnk.net-unencrypted-key.pem ;(~107)
== Loading the accf_http module
On FreeBSD you must load the accf_module before you can start apache,
otherwise you are sure to get an httpready error.
# kldload accf_http
If it loaded successfully then it will not give any errors or output.
To have it load on boot
#ee /boot/loader.conf
accf_http_load="YES"
== Starting Apache
ก่อน restarting หรือ starting Apache ควรใช้คำสั่ง configtest เพื่อ check errors ใน httpd.conf
# apachectl configtest
Apache is controlled with apachectl
# apachectl start
# apachectl restart
# apachectl graceful
# apachectl stop
# /usr/local/etc/rc.d/apache22 onestart
# /usr/local/etc/rc.d/apache22 restart
== Test
# telnet localhost 80
# openssl s_client -connect localhost:443
ไม่มีความคิดเห็น:
แสดงความคิดเห็น