Pastebin

From Alpine Linux
Revision as of 07:59, 2 August 2011 by Fcolista (talk | contribs) (Created page with "= How To Install Pastebin Service = A quick'n dirty doc about how to install a provate pastebin service. There are a lot of pastebin service (http://en.wikipedia.org/wiki/Compa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

How To Install Pastebin Service

A quick'n dirty doc about how to install a provate pastebin service.

There are a lot of pastebin service (http://en.wikipedia.org/wiki/Comparison_of_pastebins). We're going to use the oldest pastebin service.

Requirements:

  • An up-and-running Web server (here are quoted apache, nginx and lighttpd configuration) with modules:
  • PHP
  • vhosts
  • mod_rewrite (for Apache and lighttpd, or NginxHttpRewriteModule for nginx)


Download Pastebin setup file

wget http://pastebin.dixo.net/pastebin.tar.gz

Web Server Configuration to host pastebin

Apache

Unzip the downloaded file in the apache vhosts dir:

tar -zxvf pastebin.tar.gz -C /var/www/vhosts

Rename vhosts dir:

mv /var/www/vhosts/pastebin-0.60 /var/www/vhosts/pastebin

  • Edit /etc/apache/httpd.conf and add the following:
       <VirtualHost *:80>
               ServerName  pastebin.my.domain
               DocumentRoot /var/www/vhosts/pastebin/public_html
               ErrorLog /var/log/apache2/pastebin-error.log
               CustomLog /var/log/apache2/pastebin-access.log common
               php_value include_path .:/var/www/vhosts/pastebin/lib
               php_value register_globals off
               DirectoryIndex pastebin.php
               RewriteEngine on
               RewriteLog /var/log/apache2/pastebin-rewrite.log
               RewriteRule /([a-z0-9]+)$ /pastebin.php?show=$1 [L]
       </VirtualHost>

nginx