diff --git a/etc/apache2/pdfview.conf b/etc/apache2/pdfview.conf index fe7ae31..d2f8fbb 100644 --- a/etc/apache2/pdfview.conf +++ b/etc/apache2/pdfview.conf @@ -1,5 +1,5 @@ - ServerHostname pdf.0x2620.org + ServerName pdf.0x2620.org LogLevel warn ErrorLog /var/log/apache2/pdfvideo.org_error.log @@ -19,20 +19,27 @@ Alias /.bzr /srv/pdfvideo/.bzr + Alias /static/admin /srv/pdfvideo/src/django/django/contrib/admin/static/admin Alias /static /srv/pdfvideo/static Alias /robots.txt /srv/pdfvideo/pdfvideo/static/robots.txt Alias /favicon.ico /srv/pdfvideo/pdfvideo/static/favicon.ico Alias /data /srv/pdfvideo/data Alias /admin/media /srv/pdfvideo/src/django/django/contrib/admin/media - Alias /static/js/jquery.js /srv/pdfvideo/src/django/django/contrib/admin/media/js/jquery.min.js - RewriteEngine on - RewriteCond %{REQUEST_URI} !^/favicon.ico - RewriteCond %{REQUEST_URI} !^/robots.txt - RewriteCond %{REQUEST_URI} !^/.bzr - RewriteCond %{REQUEST_URI} !^/static - RewriteCond %{REQUEST_URI} !^/data - RewriteCond %{REQUEST_URI} !^/admin/media - RewriteRule ^/(.*) http://127.0.0.1:2688/$1 [P] - ServerSignature Off + ProxyPass /static ! + ProxyPass /favicon.ico ! + ProxyPass /robots.txt ! + ProxyPass /admin/media ! + ProxyPass /data ! + ProxyPass /.bzr ! + + ProxyRequests Off + + Order deny,allow + Allow from all + + ProxyPreserveHost On + ProxyPass / http://127.0.0.1:2688/ + ProxyPassReverse / http://127.0.0.1:2688/ + ServerSignature Off diff --git a/pdfvideo/settings.py b/pdfvideo/settings.py index a111647..2130ede 100644 --- a/pdfvideo/settings.py +++ b/pdfvideo/settings.py @@ -52,7 +52,7 @@ USE_TZ = True # Absolute filesystem path to the directory that will hold user-uploaded files. # Example: "/home/media/media.lawrence.com/media/" -MEDIA_ROOT = join(PROJECT_ROOT, 'media') +MEDIA_ROOT = join(PROJECT_ROOT, 'data') # URL that handles the media served from MEDIA_ROOT. Make sure to use a # trailing slash.