ProxyPassを使用した「Multiple Web サーバ構築」 Ubuntu版

<前提条件>

1.Ubuntu Server
2.Apache2及び関連モジュールをインストール済

1. Apache2 proxy modulesを有効する

# a2enmod proxy
# a2enmod proxy_http
# ls proxy* /etc/apache2/mods-enabled
proxy.conf proxy_http.load proxy.load
# /etc/init.d/apache2 restart

2. Example1: http://www.domain.com

<VirtualHost IP:80>
ServerAdmin admin@domain.com
ServerName domain.com
ServerAlias www.domain.com
ProxyPass / http://localhost:8080/
# Uncomment the line below if your site uses SSL.
#SSLProxyEngine On
</VirtualHost>

3. Example2: http://www.domain.com/mypage

<VirtualHost IP:80>
ServerAdmin admin@domain.com
ServerName domain.com
ServerAlias www.domain.com
DocumentRoot /srv/www/domain.com/public_html/
ErrorLog /srv/www/domain.com/logs/error.log
CustomLog /srv/www/domain.com/logs/access.log combined
ProxyPass /mypage http://localhost:8080/
</VirtualHost>

Share Button

コメントを残す


6 + 9 =

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>