[Nottingham] Apache configs

Martin martin at ml1.co.uk
Sat Jan 4 14:36:27 UTC 2014

On 04/01/14 10:15, Jason Irwin wrote:
> On 3 January 2014 19:39, James Green <jkg at earth.li
> <mailto:jkg at earth.li>> wrote:
>     http://host/site1 and http://host/site2 aren't VirtualHosts, which I
>     think might be the root of your troubles there :-)
> Yup, but I'd expected "site1" and "site2" to appear as separate entries
> under "sites-available"/"sites-enabled" as all the app servers I have
> ever used deal with things that way. 'course, Apache isn't an app server
> - is it? Guess I should dig up a few more examples to make sure I have
> Apache's way of doing things straight in my head.

Apache "vhosts" are 'domains' and not necessarily 'sites'.

If you have multiple sites under the same domain, then they all go in
the one vhost.

Also note:


are all one domain and so all go under the one vhost.

However, you can instead have:


that could go as three separate vhosts...

(Also add the www. ... versions as aliases for those poor souls unaware
that "www" is not really needed...)

>     Still, as long as you got it working!
> Yeah, just about. If you year any loud swearing tomorrow, that's
> probably me trying to sort out the Rewrite rules and 40x/50x redirects. :-D
> Certainly as accessing my name redirects to "index.php" for no earthly
> reason I can fathom, but accessing by IP address does not.

Hope you're using general rules so that they all get bundled up into
just a few lines... ;-)

Good luck!

(I'll have my music playing real loud so as not to hear ;-) )


- ------------------ - ----------------------------------------
-    Martin Lomas    - OpenPGP (GPG/PGP) Public Key: 0xCEE1D3B7
- martin @ ml1 co uk - Import from   hkp://subkeys.pgp.net   or
- ------------------ - http:// ml1 .co .uk/martin_ml1_co_uk.gpg

More information about the Nottingham mailing list