Want more features on Pastebin? Sign Up, it's FREE!
Guest

mediagoblin apache vhost conf

By: a guest on Dec 19th, 2012  |  syntax: None  |  size: 0.90 KB  |  views: 35  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <VirtualHost *:80>
  2. ServerName www.yourdomain.tld
  3. DocumentRoot /var/www/
  4.  
  5. # Serve static and media files via alias
  6. Alias /mediagoblin/mgoblin_static/ /path/to/mediagoblin/mediagoblin/static/
  7. Alias /mediagoblin/mgoblin_media/ /path/to/mediagoblin/user_dev/media/public/
  8.  
  9. # Rewrite all URLs to fcgi, except for static and media urls
  10. RewriteEngine On
  11. RewriteRule ^mediagoblin/(mgoblin_static|mgoblin_media)($|/) - [L]
  12. RewriteCond %{REQUEST_FILENAME} !-f
  13. RewriteRule ^/mediagoblin/(.*)$ /mediagoblin/mg.fcgi/$1 [QSA,L]
  14.  
  15. # Allow access to static and media directories
  16. <Directory /path/to/mediagoblin/mediagoblin/static>
  17.   Order allow,deny
  18.   Allow from all
  19. </Directory>
  20. <Directory /path/to/mediagoblin/mediagoblin/user_dev/media/public>
  21.   Order allow,deny
  22.   Allow from all
  23. </Directory>
  24.  
  25. # Connect to fcgi server
  26. FastCGIExternalServer /var/www/mediagoblin/mg.fcgi -host 127.0.0.1:26543
  27. </VirtualHost>
clone this paste RAW Paste Data