Skip to content

Instantly share code, notes, and snippets.

@patrickallaert
Created May 13, 2013 09:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patrickallaert/7d6fcd9a2b7f7f74d658 to your computer and use it in GitHub Desktop.
Save patrickallaert/7d6fcd9a2b7f7f74d658 to your computer and use it in GitHub Desktop.
<VirtualHost 128.39.140.28>
<Directory /var/www/example/web>
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
+
+ # Environment.
+ # Possible values: "prod", "dev", "staging",...
+ # Defaults to "prod" if omitted
+ SetEnv ENVIRONMENT "prod"
+
+ # Whether to use Symfony's ApcClassLoader.
+ # Possible values: 0 or 1
+ # Defaults to 0 if omitted
+ #SetEnv USE_APC_CLASSLOADER 0
+
+ # Prefix used when USE_APC_CLASSLOADER is set to 1.
+ # Use a unique prefix in order to prevent cache key conflicts
+ # with other applications also using APC.
+ # Defaults to "ezpublish" if omitted
+ #SetEnv APC_CLASSLOADER_PREFIX "ezpublish"
+
+ # Whether to use debugging.
+ # Possible values: 0 or 1
+ # Defaults to 0 if omitted, unless ENVIRONMENT is set to: "dev"
+ #SetEnv USE_DEBUGGING 0
+
+ # Whether to use Symfony's HTTP Caching.
+ # Disable it if you are using an external reverse proxy (e.g. Varnish)
+ # Possible values: 0 or 1
+ # Defaults to 1 if omitted, unless ENVIRONMENT is set to: "dev"
+ #SetEnv USE_HTTP_CACHE 1
+
+ # Defines the proxies to trust.
+ # Separate entries by a comma
+ # Example: "proxy1.example.com,proxy2.example.org"
+ # By default, no trusted proxies are set
+ #SetEnv TRUSTED_PROXIES "127.0.0.1"
<IfModule mod_rewrite.c>
RewriteEngine On
# CVE-2012-6432
RewriteRule ^/_internal - [R=403,L]
# Uncomment in FastCGI mode, to get basic auth working.
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# v1 rest API is on Legacy
RewriteRule ^/api/[^/]+/v1/ /index_rest.php [L]
# If using cluster, uncomment the following two lines:
#RewriteRule ^/var/([^/]+/)?storage/images(-versioned)?/.* /index_cluster.php [L]
#RewriteRule ^/var/([^/]+/)?cache/(texttoimage|public)/.* /index_cluster.php [L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment