Welcome to WebmasterWorld Guest from 54.167.22.37

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Virtual hosts through SSH

     

Dobrev

4:00 pm on Jan 12, 2013 (gmt 0)



Hello everyone. I have a little trouble with my Apache configurations and I really hope someone can help me with that. I have two computers with Ubuntu and Apache 2.2 - let's call them Home (192.168.1.2) and Server (192.168.1.3) connected with a router. I am working on Home, connecting to Server via ssh and mounting the web root directory of Server to Home via sshfs -> Server's /var/www becomes Home's /home/username/www. The problem is I can't really setup my Apache virtual hosts. I have a project in Server's /var/www/project, respectively Home's /home/username/www/project, and I want to create a virtual host on Home that lets me view the remote contents.

This is what I am adding to Home's /etc/hosts:
192.168.1.3 project

This is what I am adding to Home's /etc/apache2/sites-available/project:
<VirtualHost 192.168.1.3:80>
DocumentRoot /home/username/www/project
ServerName project
</VirtualHost>

After all this, when I open [project...] in Home's browser, I just see the default apache page of Server (the one in /var/www). Any help would be much appreciated!
 

Featured Threads

Hot Threads This Week

Hot Threads This Month