Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The shipped 04proxy.conf file if you have one, should be removed and replaced with a new one as it will not work alongside new entries.   

We already have several vHosts Location entries in operation for normal operation of OMK modules find these entries in the 04proxy.conf or in a similar file.

Code Block
 

 

 

To extend the current ones we should 

??  Extend the currernt

conf 

We should replace that configuration file with a new which specifies the URLs used by the master and by the slaves.

Code Block
themeEmacs
titleOMKproxy.conf example
collapsetrue
##  Centos /etc/httpd/conf.d/OMK-proxy.conf
##  Debian /etc/apache2/sites-enabled/OMK-proxy.config

<IfModule mod_proxy.c>
ProxyRequests off
#LogLevel Debug

<IfModule mod_headers.c>
# if you are using the Opmantek applications behind an ssl-terminating apache vhost,
# then you should adjust the vhost configuration to add this header but with
# protocol "https".
# The Opmantek applications are location- and protocol-independent in almost all cases.
RequestHeader set X-Forwarded-Proto "http"
</IfModule>
<VirtualHost *:80>
## This should match the servername of the master.
ServerName masterserver.example.com
    <Location "/omk">
        ProxyPass http://localhost:8042/omk retry=5
        ProxyPassReverse http://localhost:8042/omk
    </Location>
    <Location "/es">
        ProxyPass http://localhost:8042/es retry=5
        ProxyPassReverse http://localhost:8042/es
    </Location>
    <Location "/en">
        ProxyPass http://localhost:8042/en retry=5
        ProxyPassReverse http://localhost:8042/en
    </Location>
    <Location "/pt">
        ProxyPass http://localhost:8042/pt retry=5
        ProxyPassReverse http://localhost:8042/pt
    </Location>
</VirtualHost>

## This section is only used if you are using this server as a Master server which is proxying to slaves.
<VirtualHost *:*>
    ## This server ServerName should match 'host' entry in /usr/local/nmis8/conf/Servers.nmis
    ServerName external-name-poller-1.example.com
    
    ProxyRequests on
    ProxyHTMLDoctype XHTML
    ## This URL should point to the internal name of the poller server so this Master can create it's own connection to the slave
    ProxyPass / http://external-name-poller-1.example.com/ retry=5
    ProxyPassReverse / http://external-name-poller-1.example.com/
    
</VirtualHost>

## The second slave again these should match what is in Servers.nmis
<VirtualHost *:*>
    ServerName external-name-poller-2.example.com
    ProxyRequests on
    ProxyHTMLDoctype XHTML
    ProxyPass / http://external-name-poller-2.example.com/ retry=5
    ProxyPassReverse / http://external-name-poller-2.example.com/
</VirtualHost>
</IfModule>

 

 

 ??  Create new ones and add them to the current location see "Where are the configuration files"