Advertisement
GWibisono

vhost apache

Mar 11th, 2016
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.44 KB | None | 0 0
  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. <VirtualHost *:80>
  17. ServerName localhost
  18. DocumentRoot "C:/php_folder/php"
  19. </VirtualHost>
  20. #
  21. # Use name-based virtual hosting.
  22. #
  23. ##NameVirtualHost *:80
  24. #
  25. # VirtualHost example:
  26. # Almost any Apache directive may go into a VirtualHost container.
  27. # The first VirtualHost section is used for all requests that do not
  28. # match a ##ServerName or ##ServerAlias in any <VirtualHost> block.
  29. #
  30. ##<VirtualHost *:80>
  31.    ##ServerAdmin webmaster@dummy-host.example.com
  32.    ##DocumentRoot "C:/app/htdocs/dummy-host.example.com"
  33.    ##ServerName dummy-host.example.com
  34.    ##ServerAlias www.dummy-host.example.com
  35.    ##ErrorLog "logs/dummy-host.example.com-error.log"
  36.    ##CustomLog "logs/dummy-host.example.com-access.log" common
  37. ##</VirtualHost>
  38.  
  39. ##<VirtualHost *:80>
  40.    ##ServerAdmin webmaster@dummy-host2.example.com
  41.    ##DocumentRoot "C:/app/htdocs/dummy-host2.example.com"
  42.    ##ServerName dummy-host2.example.com
  43.    ##ErrorLog "logs/dummy-host2.example.com-error.log"
  44.    ##CustomLog "logs/dummy-host2.example.com-access.log" common
  45. ##</VirtualHost>
  46.  
  47. ####################################
  48.            
  49. #### site1.local VirtualHost ####
  50. <VirtualHost site1.local:80>
  51. <Directory "C:/tmp/site001">
  52. Require all granted
  53. Options FollowSymLinks Indexes
  54. AllowOverride All
  55. Order deny,allow
  56. allow from All
  57. </Directory>
  58. ServerName site1.local
  59. ServerAlias site1.local
  60. ScriptAlias /cgi-bin/ "C:/tmp/site001/cgi-bin/"
  61. DocumentRoot "C:/tmp/site001"
  62. ErrorLog "c:/logs/site1.local.err"
  63. CustomLog "c:/logs/site1.local.log" combined
  64. </VirtualHost>
  65.  
  66. ####################################
  67.            
  68. #### site2.local VirtualHost ####
  69. <VirtualHost site2.local:80>
  70. <Directory "C:/tmp/site002">
  71. Options FollowSymLinks Indexes
  72. AllowOverride All
  73. Order deny,allow
  74. allow from All
  75. </Directory>
  76. ServerName site2.local
  77. ServerAlias site2.local
  78. ScriptAlias /cgi-bin/ "C:/tmp/site002/cgi-bin/"
  79. DocumentRoot "C:/tmp/site002"
  80. ErrorLog "c:/logs/site2.local.err"
  81. CustomLog "c:/logs/site2.local.log" combined
  82. </VirtualHost>
  83.  
  84. ####################################
  85.            
  86. #### site3.local VirtualHost ####
  87. <VirtualHost 127.0.0.1:80>
  88. <Directory "C:/tmp/site003">
  89. Options FollowSymLinks Indexes
  90. AllowOverride All
  91. Order deny,allow
  92. allow from All
  93. </Directory>
  94. ServerName site3.local
  95. ServerAlias site3.local
  96. ScriptAlias /cgi-bin/ "C:/tmp/site003/cgi-bin/"
  97. DocumentRoot "C:/tmp/site003"
  98. ErrorLog "c:/logs/site3.local.err"
  99. CustomLog "c:/logs/site3.local.log" combined
  100. </VirtualHost>
  101.  
  102. ####################################
  103.            
  104. #### site4.local VirtualHost ####
  105. <VirtualHost 127.0.0.1:80>
  106. <Directory "C:/tmp/others">
  107. Options FollowSymLinks Indexes
  108. AllowOverride All
  109. Order deny,allow
  110. allow from All
  111. </Directory>
  112. ServerName site4.local
  113. ServerAlias site4.local
  114. ScriptAlias /cgi-bin/ "C:/tmp/others/cgi-bin/"
  115. DocumentRoot "C:/tmp/others"
  116. ErrorLog "c:/logs/site4.local.err"
  117. CustomLog "c:/logs/site4.local.log" combined
  118. </VirtualHost>
  119.  
  120. ####################################           
  121. #### clinic.local VirtualHost (PARKED) ####        
  122.  
  123. <VirtualHost 127.0.0.1:80>
  124. <Directory "C:/tmp/site002">
  125. Options FollowSymLinks Indexes
  126. AllowOverride All
  127. Order deny,allow
  128. allow from All
  129. </Directory>
  130. ServerName clinic.local
  131. ServerAlias clinic.local
  132. ScriptAlias /cgi-bin/ "C:/tmp/site002/cgi-bin/"
  133. DocumentRoot "C:/tmp/site002"
  134. ErrorLog "c:/logs/clinic.local.err"
  135. CustomLog "c:/logs/clinic.local.log" combined
  136. </VirtualHost>
  137.  
  138. ####################################
  139.            
  140. #### isenk.local VirtualHost (parked) ####
  141. <VirtualHost 127.0.0.1:80>
  142. <Directory "C:/tmp/others">
  143. Options FollowSymLinks Indexes
  144. AllowOverride All
  145. Order deny,allow
  146. allow from All
  147. </Directory>
  148. ServerName isenk.local
  149. ServerAlias isenk.local
  150. ScriptAlias /cgi-bin/ "C:/tmp/others/cgi-bin/"
  151. DocumentRoot "C:/tmp/others"
  152. ErrorLog "c:/logs/isenk.local.err"
  153. CustomLog "c:/logs/isenk.local.log" combined
  154. </VirtualHost>
  155.  
  156. ####################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement