|
| 1 | +# Add host in: C:\Windows\System32\drivers\etc |
| 2 | +# 127.0.0.100 dev.atomjoy.test www.dev.atomjoy.test |
| 3 | + |
| 4 | +<VirtualHost 127.0.0.100:80> |
| 5 | + DocumentRoot "D:/www/dev.atomjoy.test/public" |
| 6 | + DirectoryIndex index.php |
| 7 | + ServerName dev.atomjoy.test |
| 8 | + ServerAlias www.dev.atomjoy.test |
| 9 | + |
| 10 | + #ErrorLog "D:/www/dev.atomjoy.test/storage/logs/dev.atomjoy.test.error.log" |
| 11 | + #CustomLog "D:/www/dev.atomjoy.test/storage/logs/dev.atomjoy.test.access.log" common |
| 12 | + |
| 13 | + # Redirect ssl |
| 14 | + #RewriteEngine On |
| 15 | + #RewriteCond %{HTTPS} off |
| 16 | + #RewriteRule (.*) https://%{SERVER_NAME}$1 [R,L] |
| 17 | + |
| 18 | + <Directory "D:/www/dev.atomjoy.test/public"> |
| 19 | + #Options -Indexes -MultiViews +SymLinksIfOwnerMatch |
| 20 | + Options -Indexes -MultiViews +FollowSymLinks |
| 21 | + AllowOverride all |
| 22 | + Order Deny,Allow |
| 23 | + Allow from all |
| 24 | + Require all granted |
| 25 | + </Directory> |
| 26 | + |
| 27 | + <Files .env> |
| 28 | + Order allow,deny |
| 29 | + Deny from all |
| 30 | + </Files> |
| 31 | + |
| 32 | + <FilesMatch "^\."> |
| 33 | + Order allow,deny |
| 34 | + Deny from all |
| 35 | + </FilesMatch> |
| 36 | + |
| 37 | + <FilesMatch ".(jpg|jpeg|png|gif|ico|webp)$"> |
| 38 | + Header set Cache-Control "max-age=86400, public" |
| 39 | + </FilesMatch> |
| 40 | +</VirtualHost> |
| 41 | + |
| 42 | +<VirtualHost 127.0.0.100:443> |
| 43 | + DocumentRoot "D:/www/dev.atomjoy.test/public" |
| 44 | + ServerName dev.atomjoy.test |
| 45 | + ServerAlias www.dev.atomjoy.test |
| 46 | + |
| 47 | + SSLEngine on |
| 48 | + SSLCertificateFile "conf/ssl.crt/server.crt" |
| 49 | + SSLCertificateKeyFile "conf/ssl.key/server.key" |
| 50 | + |
| 51 | + <Directory "D:/www/dev.atomjoy.test/public"> |
| 52 | + #Options -Indexes -MultiViews +SymLinksIfOwnerMatch |
| 53 | + Options -Indexes -MultiViews +FollowSymLinks |
| 54 | + AllowOverride all |
| 55 | + Order Deny,Allow |
| 56 | + Allow from all |
| 57 | + Require all granted |
| 58 | + </Directory> |
| 59 | + |
| 60 | + <Files .env> |
| 61 | + Order allow,deny |
| 62 | + Deny from all |
| 63 | + </Files> |
| 64 | + |
| 65 | + <FilesMatch "^\."> |
| 66 | + Order allow,deny |
| 67 | + Deny from all |
| 68 | + </FilesMatch> |
| 69 | + |
| 70 | + <FilesMatch ".(jpg|jpeg|png|gif|ico|webp)$"> |
| 71 | + Header set Cache-Control "max-age=86400, public" |
| 72 | + </FilesMatch> |
| 73 | +</VirtualHost> |
0 commit comments