Re: Add a Alias

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On October 4, 2011 4:32 , Josu Lazkano <josu.lazkano@xxxxxxxxxxxxxxxxxx> 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
  mark@xxxxxxxxxxx


---------------------------------------------------------------------
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-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux