logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Virtual hosts through SSH
Author
Dobrev



Joined: 12 Jan 2013
Posts: 1
Location: Bulgaria

PostPosted: Sat 12 Jan '13 23:45    Post subject: Virtual hosts through SSH Reply with quote

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 http://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!
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Thu 17 Jan '13 15:17    Post subject: Reply with quote

You have a create a symlink from /etc/apache2/sites-available/project to /etc/apache2/sites-enabled/project

only vhosts in sites-enabled are read by apache.
Back to top


Reply to topic   Topic: Virtual hosts through SSH View previous topic :: View next topic
Post new topic   Forum Index -> Apache