From: Maxious Date: Sun, 20 Mar 2011 04:48:28 +0000 Subject: AWS fixes and js google analytics X-Git-Url: https://maxious.lambdacomplex.org/git/?p=busui.git&a=commitdiff&h=9ca11cc377fd0fad2461fe74c4718d4dc089f939 --- AWS fixes and js google analytics --- --- a/about.php +++ b/about.php @@ -4,9 +4,14 @@ ?>

Busness Time - An ACT bus timetable webapp
-Based on the maxious-canberra-transit-feed (download, last updated download, +last updated )
-Source code for the transit feed and this site @ http://maxious.lambdacomplex.org/git
+Source code for the transit +feed and this +site available from github.
Uses jQuery Mobile, PHP, Ruby, Python, Google Transit Feed Specification tools, OpenTripPlanner, OpenLayers, OpenStreetMap, Cloudmade Geocoder and Tile Service

Feedback encouraged; contact maxious@lambdacomplex.org
--- a/aws/awsStartup.sh +++ b/aws/awsStartup.sh @@ -4,7 +4,6 @@ #screen php-cli php-gd tomcat6-webapps tomcat6-admin-webapps svn maven2 #http://www.how2forge.org/installing-lighttpd-with-php5-and-mysql-support-on-fedora-12 -cp -rfv /tmp/busui/* /var/www cp /root/aws.php /tmp/ chcon -h system_u:object_r:httpd_sys_content_t /var/www chcon -R -h root:object_r:httpd_sys_content_t /var/www/* @@ -14,7 +13,8 @@ -O /var/www/cbrfeed.zip easy_install transitfeed easy_install simplejson -screen -d -m /var/www/view.sh +screen -S viewsh -X quit +screen -S viewsh -d -m /var/www/view.sh wget http://s3-ap-southeast-1.amazonaws.com/busresources/Graph.obj \ -O /tmp/Graph.obj --- /dev/null +++ b/aws/compress.conf @@ -1,1 +1,33 @@ +####################################################################### +## +## Output Compression +## -------------------- +## +## see http://www.lighttpd.net/documentation/compress.html +## +server.modules += ( "mod_compress" ) +## +## where should the compressed files be cached? +## see the base config for the declaration of the variable. +## +## This directory should be changed per vhost otherwise you can +## run into trouble with overlapping filenames +## +compress.cache-dir = cache_dir + "/compress" + +## +## FileTypes to compress. +## +#compress.filetype = ("text/plain", "text/html") +compress.filetype = ("text/plain", "text/html", "text/javascript", "text/css", "text/xml") + +## +## Maximum filesize that will be compressed. +## Default is 0, which means unlimited file size. +## +#compress.max-filesize = 0 + +## +####################################################################### + --- /dev/null +++ b/aws/expire.conf @@ -1,1 +1,29 @@ +####################################################################### +## +## Expire Module +## --------------- +## +## See http://www.lighttpd.net/documentation/expire.html +## +server.modules += ( "mod_expire" ) +## +## assignes a expiration to all files below the specified path. The +## specification of the time is made up of: +## +## +## +#expire.url = ( +# "/buggy/" => "access 2 hours", +# "/images/" => "access plus 1 seconds 2 minutes" +#) +etag.use-mtime = "enable" +etag.use-inode = "disable" +static-file.etags = "enable" +$HTTP["url"] =~ "\.(css|js|png|jpg|ico|gif)$" { + expire.url = ( "" => "access 7 days" ) +} + +## +####################################################################### + --- a/aws/modules.conf +++ b/aws/modules.conf @@ -76,7 +76,7 @@ ## ## mod_compress ## -#include "conf.d/compress.conf" +include "conf.d/compress.conf" ## ## mod_userdir @@ -106,7 +106,7 @@ ## ## mod_expire ## -#include "conf.d/expire.conf" +include "conf.d/expire.conf" ## ## mod_secdownload --- a/aws/php.ini +++ b/aws/php.ini @@ -1,4 +1,6 @@ [PHP] + +date.timezone = "Australia/Sydney" ;;;;;;;;;;;;;;;;;;; ; About php.ini ; @@ -288,7 +290,7 @@ ; Note: You need to use zlib.output_handler instead of the standard ; output_handler, or otherwise the output will be corrupted. ; http://www.php.net/manual/en/zlib.configuration.php#ini.zlib.output-compression -zlib.output_compression = Off +zlib.output_compression = on ; http://www.php.net/manual/en/zlib.configuration.php#ini.zlib.output-compression-level ;zlib.output_compression_level = -1 @@ -1264,7 +1266,7 @@ ; where MODE is the octal representation of the mode. Note that this ; does not overwrite the process's umask. ; http://www.php.net/manual/en/session.configuration.php#ini.session.save-path -session.save_path = "/var/lib/php/session" +session.save_path = "/tmp" ; Whether to use cookies. ; http://www.php.net/manual/en/session.configuration.php#ini.session.use-cookies --- a/common-template.inc.php +++ b/common-template.inc.php @@ -30,8 +30,9 @@ - ' . $pageTitle . ''; - + ' . $pageTitle . ' + '; if ($datepicker) echo ''; if (isDebugServer()) echo ' @@ -128,7 +129,23 @@ "; } - echo ' + echo ' +