SHARE
TWEET

vhost

a guest Jan 14th, 2020 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [root@archlinux arch]# cat /etc/httpd/conf/extra/httpd-vhosts.conf
  2. # Virtual Hosts
  3. #
  4. # Required modules: mod_log_config
  5.  
  6. # If you want to maintain multiple domains/hostnames on your
  7. # machine you can setup VirtualHost containers for them. Most configurations
  8. # use only name-based virtual hosts so the server doesn't need to worry about
  9. # IP addresses. This is indicated by the asterisks in the directives below.
  10. #
  11. # Please see the documentation at
  12. # <URL:http://httpd.apache.org/docs/2.4/vhosts/>
  13. # for further details before you try to setup virtual hosts.
  14. #
  15. # You may use the command line option '-S' to verify your virtual host
  16. # configuration.
  17.  
  18. #
  19. # VirtualHost example:
  20. # Almost any Apache directive may go into a VirtualHost container.
  21. # The first VirtualHost section is used for all requests that do not
  22.  match a ServerName or ServerAlias in any <VirtualHost> block.
  23.  
  24. <VirtualHost *:80>
  25.     DirectoryIndex index.html
  26.     ServerAdmin webmaster@sitio1.local
  27.     DocumentRoot "/srv/http/sitio1"
  28.     ServerName sitio1.local
  29.     ServerAlias www.sitio1.local
  30.     ErrorLog "/var/log/httpd/sitio1.local-error_log"
  31.     CustomLog "/var/log/httpd/sitio1.local-access_log" common
  32.         <Directory /srv/http/sitio1>
  33.                 Options -Indexes
  34.                 AllowOverride All
  35.                 Order allow,deny
  36.                 Allow from all
  37.         </Directory>
  38. </VirtualHost>
  39.  
  40. <VirtualHost *:80>
  41.     DirectoryIndex index.php
  42.     ServerAdmin webmaster@sitio2.local          
  43.     DocumentRoot "/srv/http/sitio"
  44.     ServerName sitio2.local          
  45.     ServerAlias www.sitio2.local          
  46.     ErrorLog "/var/log/httpd/sitio2.local-error_log"
  47.     CustomLog "/var/log/httpd/sitio2.local-access_log" common
  48.         <Directory /srv/http/sitio>
  49.                 Options -Indexes
  50.                 AllowOverride All
  51.                 Order allow,deny
  52.                 Allow from all
  53.         </Directory>
  54. </VirtualHost>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top