WebFaction
Community site: login faq

I've got two separate python/mod-wsgi applications running on a single Webfaction server. Application A is a public facing website and application B basically takes a requested URL containing variables from A, processes some stuff then returns a JSON object to A.

At the moment application A will send a http request to something like:

http://mysite.webfactional.com/variableX/variableY

and B responds with the JSON object accordingly.

Obviously the above request gets shoved through DNS servers and routed over the internet but I was wondering if there was any way of getting the two applications to talk to each other directly/internally? On our development test machine we just had two apache virtualhosts with application B on localhost. Any best practice advice for this kind of setup gladly accepted too.

asked 22 Aug '14, 12:31

zilog8bit
271718
accept rate: 0%


Hello,

Actually the request does not get routed over the internet as this is a single server - all the routing is done internally on the machine.

If you examine your application B's Apache configuration file, you will see that the Apache is listening on a specific port on localhost to which the front end Nginx is proxying external requests. See details on our hosting setup here. As such, you can simply send your requests to http://localhost:1234 where 1234 is the port of your Apache.

If you need specific assistance with your setup then please submit a support ticket with your username, so we can check both applications' configurations.

Sincerely,

Valentin I.
WebFaction Support
--
WebFaction - Smarter web hosting
http://webfaction.com
http://twitter.com/webfaction - http://facebook.com/webfaction

permanent link

answered 22 Aug '14, 14:10

valentini
2614
accept rate: 28%

edited 22 Aug '14, 14:11

Far easier than I thought it would be, thanks Valentini, works well.

(22 Aug '14, 16:36) zilog8bit
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×337
×57
×25
×5

question asked: 22 Aug '14, 12:31

question was seen: 1,674 times

last updated: 22 Aug '14, 16:36

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM