Welcome to WebmasterWorld Guest from 54.145.213.148

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Virtual hosts through SSH

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

New User

joined:Jan 12, 2013
posts: 1
votes: 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!
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members