Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/configs
diff options
context:
space:
mode:
authorddash@mozilla.com <ddash@mozilla.com@4eb1ac78-321c-0410-a911-ec516a8615a5>2009-08-10 19:16:26 (GMT)
committer ddash@mozilla.com <ddash@mozilla.com@4eb1ac78-321c-0410-a911-ec516a8615a5>2009-08-10 19:16:26 (GMT)
commite359f3f5b253958d5e5a6fbc44b08844ba428bb6 (patch)
treee1e683abde75e42b7ac8e1e19ed4c7db264f9d8f /configs
parent4e2c33d9464be2b079a9a5a1d89cb33d50077dcf (diff)
Copy of my development vhost conf
git-svn-id: http://svn.mozilla.org/addons/trunk@48892 4eb1ac78-321c-0410-a911-ec516a8615a5
Diffstat (limited to 'configs')
-rw-r--r--configs/apache/amo.dev79
1 files changed, 79 insertions, 0 deletions
diff --git a/configs/apache/amo.dev b/configs/apache/amo.dev
new file mode 100644
index 0000000..a2842f2
--- /dev/null
+++ b/configs/apache/amo.dev
@@ -0,0 +1,79 @@
+<VirtualHost *:80>
+ ServerName addons.mozilla.dev
+ DocumentRoot /Users/dash/Projects/Addons/code/site/app/webroot
+ DirectoryIndex index.php index.html
+
+ <Directory /Users/dash/Projects/Addons/code/site/app/webroot>
+ <IfModule mod_rewrite.c>
+ RewriteEngine On
+
+ # Rewrites for services, since using .htaccess broke them.
+ RewriteRule ^update/VersionCheck.php(.*)$ services/update.php$1 [L]
+ RewriteRule ^plugins/PluginFinderService.php(.*)$ services/pfs.php$1 [L]
+ RewriteRule ^blocklist/1/([^/]+)/([^/]+)[/]{0,1}$ services/blocklist.php?reqVersion=1&appGuid=$1&appVersion=$2 [L]
+ RewriteRule ^blocklist/([23])/([^/]+)/([^/]+)/(.+)$ services/blocklist.php?reqVersion=$1&appGuid=$2&appVersion=$3&params=$4 [L]
+
+ # robots.txt, generated by cake
+ RewriteRule ^robots.txt$ en-US/firefox/pages/robots.txt [L]
+
+ # take that, shitty https: handling!
+ RewriteCond %{HTTP:Moz-Req-Method} ^HTTPS$ [NC]
+ RewriteRule ^.*$ - [env=HTTPS:on,env=force-no-vary:hellsyes]
+ # discussions are no more, woo!
+ RewriteRule ^(.*)?discussions(/.*)?$ /$1 [R=permanent,L]
+ # The old v1 urls used query strings.
+ # I can't be bothered with any of it except the id=$addon part.
+ # We have to be careful to avoid matching vid=$version
+ # Example old urls
+ # /extensions/moreinfo.php?application=thunderbird&id=123
+ # /extensions/moreinfo.php?id=123
+ # /themes/moreinfo.php?id=321
+ # /themes/moreinfo.php?id=321&vid=1234
+ # /themes/moreinfo.php?vid=1234&id=321
+ # with ssl
+ RewriteCond %{HTTP:Moz-Req-Method} ^HTTPS$ [NC]
+ RewriteCond %{QUERY_STRING} (^|&)id=([0-9]+)(&|$)
+ RewriteRule ^(extensions|themes)/moreinfo.php$ https://%{SERVER_NAME}/firefox/addon/%2 [R=permanent,L]
+ # without ssl
+ RewriteCond %{QUERY_STRING} (^|&)id=([0-9]+)(&|$)
+ RewriteRule ^(extensions|themes)/moreinfo.php$ /firefox/addon/%2 [R=permanent,L]
+ # Handle the trickier v2 URLs
+ # /firefox/$addon
+ # with ssl
+ RewriteCond %{HTTP:Moz-Req-Method} ^HTTPS$ [NC]
+ RewriteRule ^(firefox|thunderbird|sunbird|seamonkey)/(\d+)/?$ https://%{SERVER_NAME}/$1/addon/$2 [QSA,R=permanent,L]
+ # without ssl
+ RewriteRule ^(firefox|thunderbird|sunbird|seamonkey)/(\d+)/?$ /$1/addon/$2 [QSA,R=permanent,L]
+ # /firefox/$user/author/
+ # with ssl
+ RewriteCond %{HTTP:Moz-Req-Method} ^HTTPS$ [NC]
+ RewriteRule ^(firefox|thunderbird|sunbird|seamonkey)/(\d+)/author/?$ https://%{SERVER_NAME}/$1/user/$2 [QSA,R=permanent,L]
+ # without ssl
+ RewriteRule ^(firefox|thunderbird|sunbird|seamonkey)/(\d+)/author/?$ /$1/user/$2 [QSA,R=permanent,L]
+ # legacy RSS feeds
+ # with ssl
+ RewriteCond %{HTTP:Moz-Req-Method} ^HTTPS$ [NC]
+ RewriteRule ^rss/(firefox|thunderbird|sunbird|seamonkey)/extensions/(popular|updated|rated|newest)/?$ https://%{SERVER_NAME}/$1/browse/type:1/cat:all/sort:$2/format:rss [R=permanent,L]
+ RewriteCond %{HTTP:Moz-Req-Method} ^HTTPS$ [NC]
+ RewriteRule ^rss/(firefox|thunderbird|sunbird|seamonkey)/themes/(popular|updated|rated|newest)/?$ https://%{SERVER_NAME}/$1/browse/type:2/cat:all/sort:$2/format:rss [R=permanent,L]
+ # without ssl
+ RewriteRule ^rss/(firefox|thunderbird|sunbird|seamonkey)/extensions/(popular|updated|rated|newest)/?$ /$1/browse/type:1/cat:all/sort:$2/format:rss [R=permanent,L]
+ RewriteRule ^rss/(firefox|thunderbird|sunbird|seamonkey)/themes/(popular|updated|rated|newest)/?$ /$1/browse/type:2/cat:all/sort:$2/format:rss [R=permanent,L]
+
+ # do everything else cakey
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
+ </IfModule>
+
+ <FilesMatch "(jquery.addons.min.js|style.min.css|\.(gif|jpe?g|png))$">
+ ExpiresActive On
+ ExpiresDefault "access plus 10 years"
+ </FilesMatch>
+
+ # Added to fix our favicon
+ AddType image/x-icon ico
+
+
+ </Directory>
+</VirtualHost> \ No newline at end of file