On October 4, 2011 4:32 , Josu Lazkano <josu.lazk...@barcelonamedia.org> wrote:
Hello, I am trying to configure a site, I want to add a Alias. This way
it works well:

<VirtualHost *:80>
        ServerAdmin mymail
        ServerName site1.mydomain.com
[...]
But I want to get my web from http://site1.domain.com and
http://server/site1, so I add this line:

        Alias /site1 /usr/share/site1

But it doesn't work, how could I do that?

You could add the directive

ServerAlias server

so that your name-based virtual host will respond to requests for http://server/ and serve the same content for that URL as for http://site1.domain.com/

If you then also add the alias you give above, then http://server/site1 and http://site1.domain.com/site1 will both serve the same content as http://site1.domain.com/ Note the overlap here.

If this is not what you want -- if you want the two sites to not overlap at all -- then you'd have to use multiple virtual hosts (without the ServerAlias directive) to serve http://server/ and http://site1.domain.com You would give the virtual host for http://server/ a different document root (something other than /usr/share/site1) and then use the Alias directive you give above to map the content in /usr/share/site1 to http://server/site1

--
  Mark Montague
  m...@catseye.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to