LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 03-15-2005, 03:32 PM   #1
korozion
Member
 
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>
ServerName oliver2.domain.com
DocumentRoot /var/www/html/
</VirtualHost>

<VirtualHost xx.xx.xx.50:3035>
ServerName cane.domain.com
DocumentRoot /var/www/Sugar/
</VirtualHost>

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
korozion
Member
 
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 127.0.0.1:3035 instead of xx.xx.xx.50:3035
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:24 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