Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

some more cleanup

  • Loading branch information...
commit dad2f0200140485211f0acb7afce606d01bb67ba 1 parent 4ae7e78
@JoeGermuska authored
View
2  README.rst
@@ -1,4 +1,4 @@
This is a simple application demonstrating basics of GeoDjango and Google Maps.
For instructions on how to install it, see
-http://blog.apps.chicagotribune.com/hello-newsroom-a-simple-geodjango-application/
+http://blog.apps.chicagotribune.com/2010/02/17/hello-newsroom-a-simple-geodjango-application/
View
36 hello_newsroom/configs/production/apache
@@ -1,42 +1,24 @@
<VirtualHost *:80>
- ServerName hello_newsroom.chicagotribune.com
- ServerAlias hello_newsroom.apps.chicagotribune.com
- ServerAlias www.hello_newsroom.chicagotribune.com
- ServerAlias www.hello_newsroom.apps.chicagotribune.com
- ServerAlias hello_newsroom-new.tribapps.com
-
- SetEnvIf X-Forwarded-For "^163\.192\..*\..*" trib
- <Location /> # until launch
- Order Deny,Allow
- Allow from all
- # Allow from env=trib
- </Location>
+ ServerName hello_newsroom.tribapps.com
+ ServerAlias your-ec2-instance-dns-name.amazonaws.com
WSGIScriptAlias / /home/newsapps/sites/hello_newsroom/repository/hello_newsroom/configs/production/production.wsgi
- <Directory /home/newsapps/sites/hello_newsroom/repository/hello_newsroom>
- Order deny,allow
- Allow from all
- </Directory>
- Redirect permanent /favicon.ico http://media.apps.chicagotribune.com/hello_newsroom/na_media/favicon.ico
+ Redirect permanent /favicon.ico http://your-bucket-name.s3.amazonaws.com/hello_newsroom/site_media/favicon.ico
Alias /robots.txt /home/newsapps/sites/hello_newsroom/repository/hello_newsroom/assets/robots.txt
-
+
ErrorLog /home/newsapps/logs/hello_newsroom.error.log
LogLevel warn
- SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" is-forwarder
- LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
- LogFormat "[%h] %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio2
- CustomLog /home/newsapps/logs/hello_newsroom.access.log combinedio env=is-forwarder
- CustomLog /home/newsapps/logs/hello_newsroom.access.log combinedio2 env=!is-forwarder
-
+ CustomLog /home/newsapps/logs/hello_newsroom.access.log combined
+
ServerSignature Off
RewriteEngine on
- # canonical hostname
- RewriteCond %{HTTP_HOST} !^hello_newsroom.chicagotribune.com [NC]
- RewriteRule ^/(.*) http://hello_newsroom.chicagotribune.com/$1 [L,R]
+ # canonical hostname -- remove 'www'
+ RewriteCond %{HTTP_HOST} ^www [NC]
+ RewriteRule ^/(.*) http://hello_newsroom.tribapps.com/$1 [L,R]
RewriteCond %{REQUEST_URI} /maintenance.html$
RewriteRule $ / [R=302,L]
View
13 hello_newsroom/configs/production/settings.py
@@ -4,27 +4,20 @@
DEBUG = False
TEMPLATE_DEBUG = DEBUG
-# Database
-DATABASE_HOST = 'db.tribapps.com'
-DATABASE_PORT = '5433'
-
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
-MEDIA_URL = 'http://media.tribapps.com/hello_newsroom/'
+MEDIA_URL = 'http://your-bucket-name.s3.amazonaws.com/hello_newsroom/'
# Predefined domain
-MY_SITE_DOMAIN = 'hello_newsroom.tribapps.com'
+MY_SITE_DOMAIN = 'your-ec2-instance-dns-name.amazonaws.com'
# Email
-EMAIL_HOST = 'mail.tribapps.com'
+EMAIL_HOST = 'mail'
# Caching
CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
-# S3
-AWS_S3_URL = 's3://media.tribapps.com/hello_newsroom/'
-
# logging
import logging.config
LOG_FILENAME = os.path.join(os.path.dirname(__file__), 'logging.conf')
View
4 hello_newsroom/configs/staging/apache
@@ -4,7 +4,7 @@
WSGIScriptAlias / /home/newsapps/sites/hello_newsroom/repository/hello_newsroom/configs/staging/staging.wsgi
- Redirect permanent /favicon.ico http://media-beta.tribapps.com/hello_newsroom/na_media/favicon.ico
+ Redirect permanent /favicon.ico http://your-bucket-name.s3.amazonaws.com/hello_newsroom/site_media/favicon.ico
Alias /robots.txt /home/newsapps/sites/hello_newsroom/repository/hello_newsroom/assets/robots.txt
@@ -16,7 +16,7 @@
ServerSignature Off
RewriteEngine on
- # canonical hostname
+ # canonical hostname -- remove 'www'
RewriteCond %{HTTP_HOST} ^www [NC]
RewriteRule ^/(.*) http://hello_newsroom.beta.tribapps.com/$1 [L,R]
View
2  hello_newsroom/configs/staging/apache_maintenance
@@ -2,7 +2,7 @@
ServerName hello_newsroom.beta.tribapps.com
ServerAlias www.hello_newsroom.beta.tribapps.com
- Redirect permanent /favicon.ico http://media-beta.tribapps.com/hello_newsroom/na_media/favicon.ico
+ Redirect permanent /favicon.ico http://your-bucket-name.s3.amazonaws.com/hello_newsroom/na_media/favicon.ico
Alias /robots.txt /home/newsapps/sites/hello_newsroom/repository/hello_newsroom/assets/robots.txt
View
15 hello_newsroom/configs/staging/settings.py
@@ -3,17 +3,13 @@
DEBUG = True
TEMPLATE_DEBUG = DEBUG
-# Database
-DATABASE_HOST = 'localhost'
-DATABASE_PORT = '5433'
-
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
-MEDIA_URL = 'http://media-beta.tribapps.com/hello_newsroom/'
+MEDIA_URL = 'http://your-bucket-name.s3.amazonaws.com/hello_newsroom/'
# Predefined domain
-MY_SITE_DOMAIN = 'ec2-204-236-246-222.compute-1.amazonaws.com'
+MY_SITE_DOMAIN = 'your-ec2-instance-dns-name.amazonaws.com'
# Email
EMAIL_HOST = 'localhost'
@@ -21,13 +17,10 @@
# Caching
CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
-# S3
-AWS_S3_URL = 's3://media-beta.tribapps.com/hello_newsroom/'
-
# GOOGLE_MAPS_API_KEY = 'ABQIAAAA3uGjGrzq3HsSSbZWegPbIhSMhkig1Gd5B_2j4H1Xz7hsATFBFhSnBeYqZ7F7xlyJh-_KEClsWgAO6Q' # all amazonaws.com
-# Trib IPs for security
-INTERNAL_IPS = ('163.192.12.84','163.192.12.108','163.192.12.32')
+# If you want to use Django Debug Toolbar, you need to list your IP address here
+INTERNAL_IPS = ('0.0.0.0')
# logging
import logging.config
Please sign in to comment.
Something went wrong with that request. Please try again.