Guest User

Untitled

a guest
Mar 7th, 2018
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.06 KB | None | 0 0
  1. <VirtualHost *:80>
  2.  
  3. ServerAdmin 123@gmail.com
  4. DocumentRoot /var/www/site/public/
  5.  
  6. ServerName site.ru
  7. ServerAlias www.site.ru
  8.  
  9. <Directory /var/www/site/public>
  10. Allowoverride All
  11. Require all granted
  12. </Directory>
  13.  
  14. ErrorLog ${APACHE_LOG_DIR}/error.log
  15. CustomLog ${APACHE_LOG_DIR}/access.log combined
  16.  
  17. </VirtualHost>
  18.  
  19. <VirtualHost *:80>
  20.  
  21. ServerAdmin 123@gmail.com
  22. DocumentRoot /var/www/blog/public/
  23.  
  24. ServerName blog.site.ru
  25. ServerAlias www.blog.site.ru
  26.  
  27. <Directory /var/www/blog/public>
  28. Allowoverride All
  29. Require all granted
  30. </Directory>
  31.  
  32. ErrorLog ${APACHE_LOG_DIR}/error.log
  33. CustomLog ${APACHE_LOG_DIR}/access.log combined
  34.  
  35. </VirtualHost>
  36.  
  37. <IfModule mod_ssl.c>
  38. <VirtualHost *:443>
  39.  
  40. ServerAdmin 123@gmail.com
  41. DocumentRoot /var/www/site/public/
  42.  
  43. ServerName site.ru
  44. ServerAlias www.site.ru
  45.  
  46. SSLEngine on
  47. SSLCertificateFile /SSL/domain_name.crt
  48. SSLCertificateKeyFile /SSL/private.key
  49. SSLCertificateChainFile /SSL/chain.crt
  50.  
  51. ErrorLog ${APACHE_LOG_DIR}/error.log
  52. CustomLog ${APACHE_LOG_DIR}/access.log combined
  53.  
  54. <FilesMatch ".(cgi|shtml|phtml|php)$">
  55. SSLOptions +StdEnvVars
  56. </FilesMatch>
  57.  
  58. <Directory /var/www/site/public>
  59. Allowoverride All
  60. Require all granted
  61. </Directory>
  62.  
  63. </VirtualHost>
  64. </IfModule>
  65.  
  66. Listen 80
  67.  
  68. <IfModule ssl_module>
  69. Listen 443
  70. </IfModule>
  71.  
  72. <IfModule mod_gnutls.c>
  73. Listen 443
  74. </IfModule>
  75.  
  76. <IfModule mod_rewrite.c>
  77. <IfModule mod_negotiation.c>
  78. Options -MultiViews -Indexes
  79. </IfModule>
  80.  
  81. RewriteEngine On
  82. # http -> https
  83. RewriteCond %{HTTPS} !on
  84. RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  85.  
  86. # Handle Authorization Header
  87. RewriteCond %{HTTP:Authorization} .
  88. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  89.  
  90. # Redirect Trailing Slashes If Not A Folder...
  91. RewriteCond %{REQUEST_FILENAME} !-d
  92. RewriteCond %{REQUEST_URI} (.+)/$
  93. # RewriteRule ^ %1 [L,R=301]
  94. RewriteRule ^(.*)/$ /$1 [L,R=301]
  95.  
  96. # Handle Front Controller...
  97. RewriteCond %{REQUEST_FILENAME} !-d
  98. RewriteCond %{REQUEST_FILENAME} !-f
  99. RewriteRule ^ index.php [L]
  100. </IfModule>
  101.  
  102. Mutex file:${APACHE_LOCK_DIR} default
  103. PidFile ${APACHE_PID_FILE}
  104. Timeout 300
  105. KeepAlive On
  106. MaxKeepAliveRequests 100
  107. KeepAliveTimeout 5
  108. User ${APACHE_RUN_USER}
  109. Group ${APACHE_RUN_GROUP}
  110. HostnameLookups Off
  111. ErrorLog ${APACHE_LOG_DIR}/error.log
  112. LogLevel warn
  113. IncludeOptional mods-enabled/*.load
  114. IncludeOptional mods-enabled/*.conf
  115. Include ports.conf
  116. <Directory />
  117. Options FollowSymLinks
  118. AllowOverride None
  119. Require all denied
  120. </Directory>
  121.  
  122. <Directory /usr/share>
  123. AllowOverride None
  124. Require all granted
  125. </Directory>
  126.  
  127. <Directory /var/www/>
  128. Options Indexes FollowSymLinks
  129. AllowOverride None
  130. Require all granted
  131. </Directory>
  132. AccessFileName .htaccess
  133. <FilesMatch "^.ht">
  134. Require all denied
  135. </FilesMatch>
  136.  
  137. LogFormat "%v:%p %h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-
  138. Agent}i"" vhost_combined
  139. LogFormat "%h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i""
  140. combined
  141. LogFormat "%h %l %u %t "%r" %>s %O" common
  142. LogFormat "%{Referer}i -> %U" referer
  143. LogFormat "%{User-agent}i" agent
  144.  
  145. IncludeOptional conf-enabled/*.conf
  146. IncludeOptional sites-enabled/*.conf
Add Comment
Please, Sign In to add comment