-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Example ezpedia.org.conf Apache Virtual Host Configuration Rules
- Loading branch information
1 parent
b9a0180
commit 6d9797b
Showing
1 changed file
with
169 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
<VirtualHost 184.105.182.109:80> | ||
ServerAdmin [email protected] | ||
ServerName ezpedia.org | ||
ServerAlias *.ezpedia.org www.ezpedia.org admin.ezpedia.org soap.ezpedia.org soap.ezpedia.org | ||
DocumentRoot /home/brookins/ezpedia/doc | ||
|
||
ErrorLog /nobackup/logs/ezpedia.org.log | ||
CustomLog /nobackup/logs/ezpedia.org.log combined | ||
|
||
<IfModule mod_expires.c> | ||
ExpiresActive On | ||
# ExpiresDefault "access plus 300 seconds" | ||
# ExpiresDefault "access plus 1 hour" | ||
ExpiresDefault "access plus 1 days" | ||
|
||
# ExpiresByType image/gif "access plus 2 years" | ||
# ExpiresByType image/ico "access plus 2 years" | ||
# ExpiresByType image/png "access plus 2 years" | ||
# ExpiresByType image/jpg "access plus 2 years" | ||
# ExpiresByType image/jpeg "access plus 2 years" | ||
|
||
# ExpiresByType text/css "access plus 8 hour" | ||
# ExpiresByType application/javascript "access plus 8 hour" | ||
# ExpiresByType application/x-javascript "access plus 8 hour" | ||
</IfModule> | ||
|
||
<Location /> | ||
<IfModule mod_expires.c> | ||
# ExpiresActive off | ||
ExpiresByType image/gif "access plus 2 years" | ||
ExpiresByType image/ico "access plus 2 years" | ||
ExpiresByType image/png "access plus 2 years" | ||
ExpiresByType image/jpg "access plus 2 years" | ||
ExpiresByType image/jpeg "access plus 2 years" | ||
|
||
ExpiresByType text/css "access plus 8 hour" | ||
ExpiresByType application/javascript "access plus 8 hour" | ||
ExpiresByType application/x-javascript "access plus 8 hour" | ||
</IfModule> | ||
</Location> | ||
|
||
<LocationMatch "/(design|var|extension|share)/"> | ||
<IfModule mod_expires.c> | ||
# ExpiresActive off | ||
ExpiresByType image/gif "access plus 2 years" | ||
ExpiresByType image/ico "access plus 2 years" | ||
ExpiresByType image/png "access plus 2 years" | ||
ExpiresByType image/jpg "access plus 2 years" | ||
ExpiresByType image/jpeg "access plus 2 years" | ||
|
||
ExpiresByType text/css "access plus 8 hour" | ||
ExpiresByType application/javascript "access plus 8 hour" | ||
ExpiresByType application/x-javascript "access plus 8 hour" | ||
</IfModule> | ||
</LocationMatch> | ||
<LocationMatch "/(extension/wikidesign/design/wiki/stylesheets/core.css|design/standard/javascript/tools/ezjsselection.js)"> | ||
<IfModule mod_expires.c> | ||
# ExpiresActive off | ||
ExpiresByType image/gif "access plus 2 years" | ||
ExpiresByType image/ico "access plus 2 years" | ||
ExpiresByType image/png "access plus 2 years" | ||
ExpiresByType image/jpg "access plus 2 years" | ||
ExpiresByType image/jpeg "access plus 2 years" | ||
|
||
ExpiresByType text/css "access plus 8 hour" | ||
ExpiresByType application/javascript "access plus 8 hour" | ||
ExpiresByType application/x-javascript "access plus 8 hour" | ||
</IfModule> | ||
</LocationMatch> | ||
|
||
# <Location /share/icons/flags> | ||
# <IfModule mod_expires.c> | ||
# ExpiresDefault "access plus 300 seconds" | ||
# ExpiresByType image/gif "access plus 2 years" | ||
# </IfModule> | ||
# </Location> | ||
|
||
<Directory /home/brookins/ezpedia/vhosts/www.ezpedia.org/ezpublish_legacy> | ||
Options FollowSymlinks Indexes | ||
AllowOverride None | ||
FileETag none | ||
</Directory> | ||
|
||
<IfModule mod_rewrite.c> | ||
RewriteEngine On | ||
|
||
### Advice the loadbalancer to not use the server if the storage is not mounted //start | ||
## Include /etc/apache2/ymc/errorpagesRewrite.rules | ||
## Include /nobackup/logs/rewrite.ezpedia.org.rules | ||
RewriteCond %{DOCUMENT_ROOT}/var/storage !-d [OR] | ||
RewriteCond %{DOCUMENT_ROOT}/var/plain_site/storage !-d | ||
RewriteRule /ezinfo/is_alive - [F,L,NS] | ||
### Advice the loadbalancer to not use the server if the storage is not mounted //end | ||
|
||
# Note: The ezpedia.ymc.ch redirect should only be disabled in event of a dns outage. | ||
# Note: This redirect two lines could be improved by adding mod_proxy/transparent redirect and or moving it to a separate docroot/robots.txt/vhost | ||
RewriteCond %{HTTP_HOST} ^www\.ezpedia\.org* | ||
RewriteRule ^/(.*)$ http:https://ezpedia.org/$1 [L,R=302] | ||
|
||
# SOAP | ||
RewriteCond %{HTTP_HOST} ^soap\..* | ||
RewriteRule .* /nusoap.php [L] | ||
|
||
# RewriteRule ^/sitemap[^/]+.xml - [L] | ||
# RewriteRule ^/sitemap_.*.xml - [L] | ||
# RewriteRule ^/sitemap_en\.xml - [L] | ||
# RewriteRule ^/sitemap_en.xml - [L] | ||
# RewriteRule ^/sitemap.* - [L] | ||
# RewriteRule ^/sitemap\_en\.xml - [L] | ||
|
||
RewriteRule ^/sitemap\.xml - [L] | ||
RewriteRule ^/sitemap_.* - [L] | ||
|
||
# eZpedia used to be located at /wiki on the website | ||
# since the move to the YMC cluster we have put it at the root though | ||
RewriteRule ^/wiki/(.*)$ /$1 [L,R=301] | ||
|
||
RewriteRule ^/download - [L] | ||
RewriteRule ^/icons - [L] | ||
|
||
# eZ Publish Community Project 2014.07 Legacy Default Rewrite Rules | ||
|
||
# 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|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:https://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> | ||
|
||
#<IfModule sapi_apache2.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 | ||
php_flag display_errors On | ||
php_value error_reporting 2047 | ||
php_admin_flag allow_url_fopen On | ||
#</IfModule> | ||
</VirtualHost> |