2

We've below netwrok setup Internal server ip : 192.168.153.20:443 Public router ip : 111.93.87.11:26060

We've port forwarding in router : 111.93.87.11:26060 to 192.168.153.20:443

So when we first access 192.168.153.20:443(Internal server ip) it runs/execute django application ( First time ) Now when we access 111.93.87.11:26060 (Public router ip) - due to port forwarding it comes to internal server ip but as apache receives host:111.93.87.11:26060,apache execute/run whole django application second time.

So ulimately our application is being run two times for ip i.e internal ip and public router ip. This is creating very critical issue. This is may be due to Apache configuration. We need to run single instance for both internal and external IP. But it seems Apache parsing host name and running different instance for new external IP

For reference Apache configuration attached in image Apache configuration

Bhavik
  • 59
  • 5

1 Answers1

0

Actually we've to add/provide Public IP in server name as when any request comes it checks and matches with server name if is found then it will execute the same and to pass a request we've to use ProxyPass

Final public router ip working with SSL Added below lines in httpd-ssl.conf file

ServerName 111.93.87.11 SSLEngine on SSLProxyEngine on SSLCertificateFile "/usr/local/vcs/cert/certs/DefaultServerCert_VCS.pem" SSLCertificateKeyFile "/usr/local/vcs/cert/certs/key/DefaultServerCert_VCS.key" ProxyPass "/" "https://192.168.153.120:443/"

Bhavik
  • 59
  • 5