Apache runs wsgi module twice in case of public router ip and internal server ip ?

29 views
Skip to first unread message

HEMENDRA SINGH HADA

unread,
Aug 17, 2018, 5:36:12 AM8/17/18
to Django users
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.
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

Apache configuration 
Listen localhost:80
Listen 192.168.153.120:443 ( Configuration in SSL file)

<VirtualHost 192.168.153.120:80 localhost:80>

WSGIDaemonProcess abcadmin python-path=/usr/local/abc/webservice/abcadmin/abcadmin:/usr/local/lib/python3.4/site-package user=abc group=abc processes=1 threads=20 display-name=%{GROUP}
WSGIProcessGroup abcadmin
WSGIScriptAlias / /usr/local/abc/webservice/abcadmin/abcadmin/wsgi.py

</VirtualHost>
apache_config.JPG
Reply all
Reply to author
Forward
0 new messages