Deployment of Yanel behind a reverse proxy

Using aptitude

  • sudo apt-get update
  • sudo apt-get install apache2
  • netstat -nt -l
  • http://PROXY_HOSTNAME:80
  • sudo /etc/init.d/apache2 stop
  • sudo a2enmod proxy
  • sudo a2enmod proxy_http
  • sudo /etc/init.d/apache2 start
  • http://PROXY_HOSTNAME:80
  • sudo vi /etc/apache2/sites-available/yanel.org
<VirtualHost *:80>
    ServerAdmin michael.wechner@wyona.com
    ServerName www.yanel.org
    ServerAlias yanel.org
    ServerAlias yanel.wyona.org
    ErrorLog ${APACHE_LOG_DIR}/yanel.org-error_log
    CustomLog ${APACHE_LOG_DIR}/yanel.org-access_log combined

    ProxyPassReverseCookiePath /yanel /

    ProxyPass           /javadoc  http://YANEL_HOSTNAME:PORT/yanel/yanel-website/javadoc/
    ProxyPassReverse    /javadoc  http://YANEL_HOSTNAME:PORT/yanel/yanel-website/javadoc/
    ProxyPass           /  http://YANEL_HOSTNAME:PORT/yanel/yanel-website/
    ProxyPassReverse    /  http://YANEL_HOSTNAME:PORT/yanel/yanel-website/
</VirtualHost>
  • sudo a2ensite yanel.org
  • ls -l /etc/apache2/sites-enabled
  • sudo /etc/init.d/apache2 reload
  • Update DNS accordingly
  • http://www.yanel.org

From source

  • Requirements for Ubuntu
    • apt-get install gcc
    • apt-get install libc6-dev
    • apt-get install make
  • Download the latest Apache httpd 2.2.x (e.g. httpd-2.2.13)
  • Install as proxy: ./configure --prefix=/usr/local/httpd-2.2.13 --enable-proxy --enable-proxy-http --enable-proxy-balancer
  • make
  • make install
  • Configure virtual hosts within /usr/local/httpd-2.2.13/conf/extra/httpd-vhosts.conf
  • Add proxy settings to realm configuration (realms.xml), e.g.:
    • <realm id="...
      <reverse-proxy>
      <host-name>www.yulup.org</host-name>
      <port>80</port>
      <ssl-port>443</ssl-port>
      <prefix>/yanel/yulup-website</prefix>
      </reverse-proxy>
      </realm>
  • Activate vhosts config within /usr/local/httpd-2.2.13/conf/httpd.conf:
    • Include conf/extra/httpd-vhosts.conf
  • UNIX: Add apachectl to various runlevels:
    • Copy bin/apachtctl to /etc/init.d/apachectl
    • Create symbolic link at /etc/rc0.d/K91apachectl
    • Create symbolic link at /etc/rc1.d/K91apachectl
    • Create symbolic link at /etc/rc2.d/S91apachectl
    • Create symbolic link at /etc/rc3.d/S91apachectl
    • Create symbolic link at /etc/rc4.d/S91apachectl
    • Create symbolic link at /etc/rc5.d/S91apachectl
    • Create symbolic link at /etc/rc6.d/K91apachectl


Your comments are much appreciated

Is the content of this page unclear or you think it could be improved? Please add a comment and we will try to improve it accordingly.