Advertisement
Guest User

config apache yii2

a guest
Jul 20th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <VirtualHost *:80>
  2.     ServerName localy.dev
  3.     #ErrorLog /dev/null
  4.     #LogLevel emerg
  5.     #CustomLog /dev/null combined
  6.     DocumentRoot "C:\xampp\htdocs\localy.dev/frontend/web"
  7.  
  8.     Alias /admin "C:\xampp\htdocs\localy.dev/backend/web"
  9.  
  10.     <Directory />
  11.         Options FollowSymLinks
  12.         AllowOverride None
  13.         AddDefaultCharset utf-8
  14.     </Directory>
  15.     <Directory "C:\xampp\htdocs\localy.dev/frontend/web/">
  16.         RewriteEngine on
  17.         # if a directory or a file exists, use the request directly
  18.         RewriteCond %{REQUEST_FILENAME} !-f
  19.         RewriteCond %{REQUEST_FILENAME} !-d
  20.         # otherwise forward the request to index.php
  21.         RewriteRule . index.php
  22.  
  23.         Order Allow,Deny
  24.         Allow from all
  25.     </Directory>
  26.     <Directory "C:\xampp\htdocs\localy.dev/backend/web/">
  27.         RewriteEngine on
  28.         # if a directory or a file exists, use the request directly
  29.         RewriteCond %{REQUEST_FILENAME} !-f
  30.         RewriteCond %{REQUEST_FILENAME} !-d
  31.         # otherwise forward the request to index.php
  32.         RewriteRule . index.php
  33.  
  34.         Order Allow,Deny
  35.         Allow from all
  36.     </Directory>
  37.     <FilesMatch \.(htaccess|htpasswd|svn|git)>
  38.         Deny from all
  39.         Satisfy All
  40.     </FilesMatch>
  41. </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement