Don't like ads? PRO users don't see any ads ;-)
Guest

Named Virtual Hosts Configuration

By: a guest on Jun 8th, 2012  |  syntax: None  |  size: 0.69 KB  |  hits: 65  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #
  2. # Use name-based virtual hosting.
  3. #
  4. NameVirtualHost *:80
  5. #
  6. # NOTE: NameVirtualHost cannot be used without a port specifier
  7. # (e.g. :80) if mod_ssl is being used, due to the nature of the
  8. # SSL protocol.
  9. #
  10. #
  11. # VirtualHost example:
  12. # Almost any Apache directive may go into a VirtualHost container.
  13. # The first VirtualHost section is used for requests without a known
  14. # server name.
  15. #
  16. #
  17. <VirtualHost *:80>
  18.     DocumentRoot "/path/to/public_html/abroad"
  19.     ServerName abroad.domain.ac.uk
  20.     ServerAlias abroad.domain.ac.uk
  21. </VirtualHost>
  22.  
  23. <VirtualHost *:80>
  24.     DocumentRoot "/path/to/public_html/hub"
  25.     ServerName hub.domain.ac.uk
  26.     ServerAlias hub.domain.ac.uk
  27. </VirtualHost>