Advertisement
Guest User

httpd-vhosts.conf

a guest
Oct 1st, 2019
929
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Virtual Hosts
  2. #
  3. # Required modules: mod_log_config
  4.  
  5. # If you want to maintain multiple domains/hostnames on your
  6. # machine you can setup VirtualHost containers for them. Most configurations
  7. # use only name-based virtual hosts so the server doesn't need to worry about
  8. # IP addresses. This is indicated by the asterisks in the directives below.
  9. #
  10. # Please see the documentation at
  11. # <URL:http://httpd.apache.org/docs/2.4/vhosts/>
  12. # for further details before you try to setup virtual hosts.
  13. #
  14. # You may use the command line option '-S' to verify your virtual host
  15. # configuration.
  16.  
  17. #
  18. # VirtualHost example:
  19. # Almost any Apache directive may go into a VirtualHost container.
  20. # The first VirtualHost section is used for all requests that do not
  21. # match a ServerName or ServerAlias in any <VirtualHost> block.
  22. #
  23. <VirtualHost *:80>
  24.     ServerAdmin webmaster@site1.com
  25.     DocumentRoot "${SRVROOT}/docs/site1.com"
  26.     ServerName site1.com
  27.     ServerAlias www.site1.com
  28.     ErrorLog "logs/site1.com-error.log"
  29.     CustomLog "logs/site1.com-access.log" common
  30.     <Directory "${SRVROOT}/docs/site1.com">
  31.         Options Indexes FollowSymLinks
  32.         AllowOverride None
  33.         Require all granted
  34.     </Directory>
  35.     <IfModule dir_module>
  36.       DirectoryIndex index.php index.html
  37.     </IfModule>
  38. </VirtualHost>
  39.  
  40. <VirtualHost *:80>
  41.     ServerAdmin webmaster@site2.com
  42.     DocumentRoot "${SRVROOT}/docs/site2.com"
  43.     ServerName site2.com
  44.     ServerAlias www.site2.com
  45.     ErrorLog "logs/site2.com-error.log"
  46.     CustomLog "logs/site2.com-access.log" common
  47.     <Directory "${SRVROOT}/docs/site2.com">
  48.         Options Indexes FollowSymLinks
  49.         AllowOverride None
  50.         Require all granted
  51.     </Directory>
  52.         <IfModule dir_module>
  53.       DirectoryIndex index.php index.html
  54.     </IfModule>
  55. </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement