LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache, same ip two doc root, two ports and a tunnel (https://www.linuxquestions.org/questions/linux-software-2/apache-same-ip-two-doc-root-two-ports-and-a-tunnel-302005/)

korozion 03-15-2005 03:32 PM

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.

korozion 03-15-2005 05:29 PM

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


All times are GMT -5. The time now is 12:02 PM.