Advertisement
Guest User

mediagoblin apache vhost conf

a guest
Dec 19th, 2012
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  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>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement