Advertisement
Guest User

Untitled

a guest
Sep 7th, 2015
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. > @jvnadr said:
  2. > Thanks but that's not what I am asking. I (of course) already have port forwarding for accessing the NAT boxes and a nginx reverse proxy to point external domain names directly to the internal vm's ip for http. I want to do forwarding based on the domain thru nginx proxy or other method, for other ports/services (mainly ssh and mail server). So, a request for mail should point to the internal virtual machine's postfix/exim passing thru the proxy to the normal ports (e.g. 25) and not using different ports on the main node.
  3.  
  4. In order to do that, you have to use the directives "server_name <yourdomain>" and "listen 25" - for example:
  5.  
  6. ---
  7.  
  8. server {
  9. listen 25;
  10. server_name google.ca;
  11. ...
  12. location / {
  13. ...
  14. }
  15. }
  16.  
  17. ---
  18.  
  19. The above will listen on port 25 only for the domain "google.ca," rather than 127.0.0.1:25. Just add the postfix directives and it should work. Sorry for the other comment :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement