The purpose of configuring Nginx is to avoid having to enter port number for URL on web interface when acessing Microservices web pages.
PORT_ADMINSRVR=1000, PORT_DISTSRVR=10002, PORT_RCVRSRVR=10003, PORT_PMSRVR=10004, UDP_PORT_PMSRVR=10005
Example of having to specify port number.
Just wanted to document the process as I was struggling with nginx.
Don’t forget to enable autostart for when host is rebooted.
I used: baseurl=http://nginx.org/packages/rhel/7/$basearch versus baseurl=http://nginx.org/packages/mainline/centos/7/$basearch How to install and use Nginx on CentOS 7 / RHEL 7
[root@localhost ~]# vi /etc/yum.repos.d/nginx.repo
[root@localhost ~]# cat /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/rhel/7/$basearch/
gpgcheck=0
enabled=1
[root@localhost ~]# yum install nginx -y
Installed:
nginx.x86_64 1:1.24.0-1.el7.ngx
Dependency Installed:
pcre2.x86_64 0:10.23-2.el7
Complete!
[root@localhost ~]#
==================================================
oracle@localhost::/home/oracle
$ export OGG_HOME=/opt/oracle/goldengate/ogg21c_ma
oracle@localhost::/home/oracle
$ cd $OGG_HOME/lib/utl/reverseproxy
oracle@localhost::/opt/oracle/goldengate/ogg21c_ma/lib/utl/reverseproxy
$ ./ReverseProxySettings -u oggadmin -P X#tpdZdm2wMt -o ogg.conf http://localhost:10000
oracle@localhost::/opt/oracle/goldengate/ogg21c_ma/lib/utl/reverseproxy
$ ls -l ogg.conf
-rw-r--r--. 1 oracle oinstall 73480 Apr 20 02:57 ogg.conf
oracle@localhost::/opt/oracle/goldengate/ogg21c_ma/lib/utl/reverseproxy
[root@localhost ~]# export OGG_HOME=/opt/oracle/goldengate/ogg21c_ma
[root@localhost ~]# cd $OGG_HOME/lib/utl/reverseproxy
[root@localhost reverseproxy]# ls -l ogg.conf
-rw-r--r--. 1 oracle oinstall 73480 Apr 20 02:57 ogg.conf
[root@localhost reverseproxy]# mv -v ogg.conf /etc/nginx/conf.d/
‘ogg.conf’ -> ‘/etc/nginx/conf.d/ogg.conf’
[root@localhost reverseproxy]#
[root@localhost reverseproxy]# /etc/ssl/certs/make-dummy-cert /etc/nginx/ogg.pem
[root@localhost reverseproxy]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
[root@localhost reverseproxy]#
==================================================
[root@localhost reverseproxy]# systemctl status nginx
● nginx.service - nginx - high performance web server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Docs: http://nginx.org/en/docs/
[root@localhost reverseproxy]#
[root@localhost reverseproxy]# systemctl start nginx.service
[root@localhost reverseproxy]# systemctl status nginx
● nginx.service - nginx - high performance web server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2023-04-20 03:06:25 UTC; 2s ago
Docs: http://nginx.org/en/docs/
Process: 6250 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS)
Main PID: 6251 (nginx)
CGroup: /system.slice/nginx.service
├─6251 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
├─6252 nginx: worker process
└─6253 nginx: worker process
Apr 20 03:06:25 localhost.localdomain systemd[1]: Starting nginx - high performance web server...
Apr 20 03:06:25 localhost.localdomain systemd[1]: Started nginx - high performance web server.
[root@localhost reverseproxy]#
[root@localhost reverseproxy]# systemctl list-unit-files|grep nginx
nginx-debug.service disabled
nginx.service disabled
[root@localhost reverseproxy]#
[root@localhost reverseproxy]# systemctl enable nginx.service
Created symlink from /etc/systemd/system/multi-user.target.wants/nginx.service to /usr/lib/systemd/system/nginx.service.
[root@localhost reverseproxy]# systemctl list-unit-files|grep nginx
nginx-debug.service disabled
nginx.service enabled
[root@localhost reverseproxy]#
[root@localhost reverseproxy]# cat /etc/os-release | grep PRE
PRETTY_NAME="Oracle Linux Server 7.9"
[root@localhost reverseproxy]#
==================================================
$ firefox localhost:443
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libEGL initialize failed (t=12.206) [GFX1-]: glxtest: libEGL initialize failed
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libEGL initialize failed (t=12.206) |[1][GFX1-]: glxtest: libEGL initialize failed (t=12.206) [GFX1-]: glxtest: libEGL initialize failed
Missing chrome or resource URL: resource://gre/modules/UpdateListener.jsm
Missing chrome or resource URL: resource://gre/modules/UpdateListener.sys.mjs
==================================================
[root@localhost ~]# curl localhost
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>
<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>
<p><em>Thank you for using nginx.</em></p>
</body>
</html>
[root@localhost ~]#