Difference between revisions of "IPv6 Server: Webserver Apache2 (httpd2)"

From OnnoWiki
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
22.3. Webserver Apache2 (httpd2)
+
Apache web server mendukung IPv6 secara native oleh maintainer sejak 2.0.14.
  
Apache web server supports IPv6 native by maintainers since 2.0.14. Available patches for the older 1.3.x series are not current and shouldn't be used in public environment, but available at KAME / Misc.
+
==Instalasi Apache2==
  
==22.3.1. Listening on IPv6 addresses==
+
apt-get install apache2 mysql-server libmysqlclient15-dev libphp-adodb libgd2-xpm libgd2-xpm-dev \
 +
php5-mysql php5-gd php5-curl php-pear unzip php5-xmlrpc
  
Note: virtual hosts on IPv6 addresses are broken in versions until 2.0.28 (a patch is available for 2.0.28). But always try latest available version first because earlier versions had some security issues.
+
Atau jika hanya ingin menginstalasi apache2 dan PHP saja
  
===22.3.1.1. Virtual host listen on an IPv6 address only===
+
apt-get install apache2 libphp-adodb libgd2-xpm-dev \
 +
php5-mysql php5-gd php5-curl php-pear unzip php5-xmlrpc
 +
 
 +
 
 +
==Listening address IPv6==
 +
 
 +
Catatan: Virtual Host dengan address IPv6 tidak baik sampai dengan versi 2.0.28. Sebaiknya coba versi terakhir untuk memastikan tidak ada masalah security.
 +
 
 +
===Virtual host listen ke IPv6 address saja===
  
 
  Listen [2001:0db8:100::1]:80
 
  Listen [2001:0db8:100::1]:80
Line 15: Line 24:
 
  </VirtualHost>
 
  </VirtualHost>
  
===22.3.1.2. Virtual host listen on an IPv6 and on an IPv4 address===
+
===Virtual host listen ke IPv6 dan IPv4 address===
  
 
  Listen [2001:0db8:100::2]:80  
 
  Listen [2001:0db8:100::2]:80  
Line 24: Line 33:
 
  </VirtualHost>
 
  </VirtualHost>
  
This should result after restart in e.g.
+
Setelah di restart, coba lakukan
  
 
  # netstat -lnptu |grep "httpd2\W*$"  
 
  # netstat -lnptu |grep "httpd2\W*$"  
 +
 
  tcp 0 0 1.2.3.4:80          0.0.0.0:* LISTEN 12345/httpd2  
 
  tcp 0 0 1.2.3.4:80          0.0.0.0:* LISTEN 12345/httpd2  
 
  tcp 0 0 2001:0db8:100::1:80 :::*      LISTEN 12345/httpd2  
 
  tcp 0 0 2001:0db8:100::1:80 :::*      LISTEN 12345/httpd2  
Line 33: Line 43:
 
For simple tests use the telnet example already shown.
 
For simple tests use the telnet example already shown.
  
===22.3.1.3. Additional notes===
+
===Tambahan Catatan===
  
 
Apache2 supports a method called “sendfile” to speedup serving data. Some NIC drivers also support offline checksumming. In some cases, this can lead to connection problems and invalid TCP checksums. In this cases, disable “sendfile” either by recompiling using configure option “--without-sendfile” or by using the "EnableSendfile off" directive in configuration file.
 
Apache2 supports a method called “sendfile” to speedup serving data. Some NIC drivers also support offline checksumming. In some cases, this can lead to connection problems and invalid TCP checksums. In this cases, disable “sendfile” either by recompiling using configure option “--without-sendfile” or by using the "EnableSendfile off" directive in configuration file.

Latest revision as of 17:24, 27 June 2015

Apache web server mendukung IPv6 secara native oleh maintainer sejak 2.0.14.

Instalasi Apache2

apt-get install apache2 mysql-server libmysqlclient15-dev libphp-adodb libgd2-xpm libgd2-xpm-dev \
php5-mysql php5-gd php5-curl php-pear unzip php5-xmlrpc

Atau jika hanya ingin menginstalasi apache2 dan PHP saja

apt-get install apache2 libphp-adodb libgd2-xpm-dev \
php5-mysql php5-gd php5-curl php-pear unzip php5-xmlrpc


Listening address IPv6

Catatan: Virtual Host dengan address IPv6 tidak baik sampai dengan versi 2.0.28. Sebaiknya coba versi terakhir untuk memastikan tidak ada masalah security.

Virtual host listen ke IPv6 address saja

Listen [2001:0db8:100::1]:80
<VirtualHost [2001:0db8:100::1]:80>
        ServerName ipv6only.yourdomain.yourtopleveldomain
        # ...sure more config lines
</VirtualHost>

Virtual host listen ke IPv6 dan IPv4 address

Listen [2001:0db8:100::2]:80 
Listen 1.2.3.4:80
<VirtualHost [2001:0db8:100::2]:80 1.2.3.4:80>
        ServerName ipv6andipv4.yourdomain.yourtopleveldomain
        # ...sure more config lines
</VirtualHost>

Setelah di restart, coba lakukan

# netstat -lnptu |grep "httpd2\W*$" 
tcp 0 0 1.2.3.4:80          0.0.0.0:* LISTEN 12345/httpd2 
tcp 0 0 2001:0db8:100::1:80 :::*      LISTEN 12345/httpd2 
tcp 0 0 2001:0db8:100::2:80 :::*      LISTEN 12345/httpd2

For simple tests use the telnet example already shown.

Tambahan Catatan

Apache2 supports a method called “sendfile” to speedup serving data. Some NIC drivers also support offline checksumming. In some cases, this can lead to connection problems and invalid TCP checksums. In this cases, disable “sendfile” either by recompiling using configure option “--without-sendfile” or by using the "EnableSendfile off" directive in configuration file.