LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-16-2014, 02:34 PM   #1
enkrypted
LQ Newbie
 
Registered: Apr 2013
Posts: 22

Rep: Reputation: Disabled
Port forwarding


I have a VPS with a single IP which is already running apache on port 80. I am also running WEBrick on a different port, 8080 for instance. the Apache on port 80 already serves abc.domain.com, now I want to serve xyz.domain.com using WEBrick. WEBrick is running on port 8080, so setting up an A record requires me to append a :8080 to the end of the subdomain, which is undesirable. I have tried setting up an A record to the IP, and then setting up an SRV record to the subdomain to the A record with the port in it, apparently it doesn't work that way. I guess I should be able to do this using iptables then? I am using jekyll btw, if that helps. Not entirely sure if jekyll uses WEBrick. I cannot get any more IPs on this VPS. and abc.domain.com:8080 does show the jekyll page, because apache virtual hosting doesn't work on ports apache isn't running on( obviously).
 
Old 05-17-2014, 01:39 AM   #2
Ygrex
Member
 
Registered: Nov 2004
Location: Russia (St.Petersburg)
Distribution: Debian
Posts: 666

Rep: Reputation: 68
iptables does not work with HTTP hostnames, I guess you need Apache proxy:
http://httpd.apache.org/docs/current/rewrite/proxy.html
 
Old 05-17-2014, 02:17 AM   #3
enkrypted
LQ Newbie
 
Registered: Apr 2013
Posts: 22

Original Poster
Rep: Reputation: Disabled
I used Virtual Hosts and mod_proxy and it worked. Apparently I was wrong.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] IPtables : ssh port forwarding one port to another port issue routers Linux - Networking 7 08-07-2018 08:41 AM
Shorewall: port forwarding problem, port is closed even after forwarding Synt4x_3rr0r Linux - Networking 2 12-13-2009 04:36 PM
port forwarding on Belkin 4-port Cable/DSL Gateway Router sycamorex Linux - Networking 5 03-05-2007 03:27 PM
IPCHAINS port forwarding and IPTABLES port forwarding ediestajr Linux - Networking 26 01-14-2007 07:35 PM
Simple Port Forwarding Firewall - not forwarding MadTurki Linux - Security 14 04-09-2006 12:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration