forked from ezsystems/ezpublish-legacy
-
Notifications
You must be signed in to change notification settings - Fork 5
/
legacy.conf
105 lines (88 loc) · 4.34 KB
/
legacy.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
NameVirtualHost [IP_ADDRESS]
<VirtualHost [IP_ADDRESS]:[PORT]>
DocumentRoot [PATH_TO_EZPUBLISH]
ServerName [SERVER_NAME]
ServerAlias [SERVER_ALIAS]
<Directory [PATH_TO_EZPUBLISH]>
Options FollowSymLinks
AllowOverride None
</Directory>
<IfModule mod_php5.c>
php_admin_flag safe_mode Off
php_admin_value register_globals 0
php_value magic_quotes_gpc 0
php_value magic_quotes_runtime 0
php_value allow_call_time_pass_reference 0
</IfModule>
DirectoryIndex index.php
# Rewrite rules to enable virtual host mode of eZ Publish
# Secures eZ Publish by making sure only certain folders is accessible directly
<IfModule mod_rewrite.c>
RewriteEngine On
# REST API
RewriteRule ^/api/ /index_rest.php [L]
RewriteRule ^/([^/]+/)?content/treemenu.* /index_treemenu.php [L]
RewriteRule ^/var/([^/]+/)?storage/images(-versioned)?/.* - [L]
RewriteRule ^/var/([^/]+/)?cache/(texttoimage|public)/.* - [L]
RewriteRule ^/design/[^/]+/(stylesheets|images|javascript|fonts)/.* - [L]
RewriteRule ^/share/icons/.* - [L]
RewriteRule ^/extension/[^/]+/design/[^/]+/(stylesheets|flash|images|lib|fonts|javascripts?)/.* - [L]
RewriteRule ^/packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]
RewriteRule ^/packages/styles/.+/thumbnail/.* - [L]
RewriteRule ^/var/storage/packages/.* - [L]
# Makes it possible to placed your favicon at the root of your
# eZ Publish instance. It will then be served directly.
RewriteRule ^/favicon\.ico - [L]
# Uncomment the line below if you want you favicon be served from the standard design.
# You can customize the path to favicon.ico by replacing design/standard/images/favicon.ico
# by the adequate path.
#RewriteRule ^/favicon\.ico /design/standard/images/favicon.ico [L]
RewriteRule ^/design/standard/images/favicon\.ico - [L]
# Give direct access to robots.txt for use by crawlers (Google, Bing, Spammers..)
RewriteRule ^/robots\.txt - [L]
# Platform for Privacy Preferences Project ( P3P ) related files for Internet Explorer
# More info here : http://en.wikipedia.org/wiki/P3p
RewriteRule ^/w3c/p3p\.xml - [L]
# Uncomment the following lines when using popup style debug.
# RewriteRule ^/var/cache/debug\.html.* - [L]
# RewriteRule ^/var/[^/]+/cache/debug\.html.* - [L]
RewriteRule .* /index.php
</IfModule>
# Everything below is optional to improve performance by forcing clients to cache
# image and design files, change the expires time to suite project needs.
<IfModule mod_expires.c>
<LocationMatch "^/var/[^/]+/storage/images/.*">
# eZ Publish appends the version number to image URL (ezimage datatype)
# so when an image is updated, its URL changes to
ExpiresActive on
ExpiresDefault "now plus 10 years"
</LocationMatch>
<LocationMatch "^/extension/[^/]+/design/[^/]+/(stylesheets|images|fonts|javascripts?|flash)/.*">
# A good optimization if you normally don't change your design often
ExpiresActive on
ExpiresDefault "now plus 5 days"
</LocationMatch>
<LocationMatch "^/extension/[^/]+/design/[^/]+/lib/.*">
# Libraries get a new url (version number) on updates
ExpiresActive on
ExpiresDefault "now plus 90 days"
</LocationMatch>
<LocationMatch "^/design/[^/]+/(stylesheets|images|javascripts?|lib|flash)/.*">
# Same as above for bundled eZ Publish designs
ExpiresActive on
ExpiresDefault "now plus 7 days"
</LocationMatch>
<LocationMatch "^/share/icons/.*">
# Icons as used by admin interface, barly change
ExpiresActive on
ExpiresDefault "now plus 7 days"
</LocationMatch>
# Depends on ezjscore.ini/[Packer]/AppendLastModifiedTime=enabled
# so that file names change when source files are modified
#<LocationMatch "^/var/[^/]+/cache/public/.*">
# Force ezjscore packer js/css files to be cached 30 days at client side
#ExpiresActive on
#ExpiresDefault "now plus 30 days"
#</LocationMatch>
</IfModule>
</VirtualHost>