Apache to front end a set of IPS repository daemons

To allow reverse proxying, so that apache could front end the pkg.depotd daemons, perform the following:
  • Enable the following modules in <apache-install>/etc/httpd.conf.

    LoadModule proxy_module libexec/mod_proxy.so LoadModule proxy_http_module libexec/mod_proxy_http.so

  • Add proxy entries to <apache-install>/etc/httpd.conf corresponding to the pkg.depotd ports.

    # Reverse Proxy Setup
    ProxyRequests off
    # sparc
    ProxyPass /dev/solaris-sparc/gf3000_2000/ http://localhost:10000/
    ProxyPassReverse /dev/solaris-sparc/gf3000_2000/ http://localhost:10000/
    # linux
    ProxyPass /dev/linux/gf3000_2000/ http://localhost:10001/
    ProxyPassReverse /dev/linux/gf3000_2000/ http://localhost:10001/
    # mac
    ProxyPass /dev/mac/gf3000_2000/ http://localhost:10002/
    ProxyPassReverse /dev/mac/gf3000_2000/ http://localhost:10002/
    # solaris x86
    ProxyPass /dev/solaris-x86/gf3000_2000/ http://localhost:10003/
    ProxyPassReverse /dev/solaris-x86/gf3000_2000/ http://localhost:10003/
    # windows
    ProxyPass /dev/windows/gf3000_2000/ http://localhost:10004/
    ProxyPassReverse /dev/windows/gf3000_2000/ http://localhost:10004/
    # default
    ProxyPass / http://localhost:10000/
    ProxyPassReverse / http://localhost:10000/
    
  • Change the custom log to combined format.

    Comment the following line

    # CustomLog var/log/access_log common
    

    Uncomment the following line

    CustomLog var/log/access_log combined
    

The apache httpd can be setup as Solaris SMF service so that the process is monitored by SMF. Here are the steps:

  • Create service manifest /var/svc/manifest/application/apache2/httpd.xml. Replace the location of apache httpd script appropriately.

    Download httpd.xml

  • Validate and import the service manifest using svccfg(1M).

    bash-3.00# svccfg
    svc:> validate /var/svc/manifest/application/apache2/httpd.xml
    svc:> import /var/svc/manifest/application/apache2/httpd.xml
    svc:> quit
    
  • Enable the service using the svcadm command.

    svcadm enable -t svc:/application/apache2/httpd

  • Verify that the service is online.

    bash-3.00# svcs -a | grep -i apache online May_02 svc:/application/apache2/httpd:default

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

msreddy

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today