Thursday, January 1, 2015

host a shorten url provider like and with Polr

1- Download the polr application from

2- unzip the package to to

3- enable apache2 rewrite mode
~$ sudo a2enmod rewrite

4- create name virtualhost for the it with our domain name: sho.rt
create file in /etc/apache2/sites-enabled/short.conf with the following content

<VirtualHost *:80>
    ServerName sho.rt
    DocumentRoot  /var/www/html/short/Cydrobolt-polr-9f58dfb
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    <Directory /var/www/html/short/Cydrobolt-polr-9f58dfb>
        Options Indexes FollowSymLinks MultiViews
                AllowOverride All
        Order allow,deny
        Allow from all

5- create databases for the application
~$ mysql -u root -p
mysql> create database polr1;
Query OK, 1 row affected (0.00 sec)

6- access it from web browser to install "http://sho.rt"

or use the following content of config.php

    $wsa = "sho.rt"
    $wsn = "Polr"
    $wsb = "January 01 2015"
    $ppass = '$2y$10$YmipE8fkUtqx93JFsIdNTe.lv78QncXqn1Apa5lG4j9Kh736KV6I6'
    $hp = "870e5f96a79978e0b7d2610ac5b83ee46e19b807"
    $regtype = "none"
    $path = "/"
    $fpass = false
    $li_shorten_only = false
    $theme = ""
    $ip = $_SERVER['REMOTE_ADDR']
    $unstr = "kZ6E9KGftJOpW0qX47wejHAhLQmaxbUPg3BVu851ndFszNCrly"

7- how it ready for the service

No comments:

Post a Comment