Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-15-2005, 03:32 PM   #1
Registered: Apr 2004
Location: Canada
Distribution: Debian
Posts: 124

Rep: Reputation: 15
Apache, same ip two doc root, two ports and a tunnel

I have one ip address (xx.xx.xx.50) and need it to answer normally on 80 and 443 (no problem, done). However, I have a php program (we'll call Sugar) in /var/www/Sugar/ I need Apache to allow /Sugar ONLY on port 3035 (could be any port, I just picked that one) That works too. HOWEVER, I need port 3035 closed to the outside world, and need to be able to create an ssh tunnel to my localhost so I can just browse to localhost:3035 and connect to the remote machine on port 3035. I've done this with Zope and it works great, but trying the same setup now results in a "channel 3: open failed: connect failed: Connection refused"

The following is the last part of my httpd.conf

Listen xx.xx.xx.50:80
Listen xx.xx.xx.50:3035

NameVirtualHost xx.xx.xx.50:80
NameVirtualHost xx.xx.xx.50:3035

<VirtualHost xx.xx.xx.50:80>
DocumentRoot /var/www/html/

<VirtualHost xx.xx.xx.50:3035>
DocumentRoot /var/www/Sugar/

I know this works as I can connect locally via lynx
Perhaps my tunnel command is wrong? I'm using
ssh user@xx.xx.xx.50 -L 3035:localhost:3035

Any help would be great. Thanks.

Last edited by korozion; 03-15-2005 at 04:29 PM.
Old 03-15-2005, 05:29 PM   #2
Registered: Apr 2004
Location: Canada
Distribution: Debian
Posts: 124

Original Poster
Rep: Reputation: 15
Well, I got it, I just had to tell the service on :3035 to bind to instead of xx.xx.xx.50:3035


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
Apache 1.3.33 (debian built) and Apache SSL does not respond to the proper ports lqorg_user Linux - Networking 0 11-06-2005 04:11 PM
trouble finding policy doc as pdf in doc mirrors stardotstar Debian 2 05-12-2005 10:56 PM
Script to check Doc-BBB against Doc-AAA for inconsistence satimis Programming 2 11-09-2004 01:43 AM
Problem accessing subdirs from doc root on Apache server ph0ngwh0ng Linux - Newbie 4 04-24-2004 12:02 PM
opening ports below 1024 without being root? meks Linux - Networking 2 12-25-2003 06:05 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:07 PM.

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