Daily Dairy

Install YOURLS: Your Own URL Shortener

What is YOURLS?

YOURLS stands for Your Own URL Shortener. It is a small set of PHP scripts that will allow you to run your own URL shortening service (TinyURL or bitly).

How to install YOURLS.

  • First of all download YOURLS zip package :

YOURLS 1.7.1

  • Extract this .zip file:
$ unzip YOURLS 1.7.1.zip
  • Now directory to yourls:
$ mv YOURLS 1.7.1 yourls
  • Copy this Directory to Document Root of your server:
$ cp -r yourls/ var/www/html/
  • If you are not root user copy this to public_html directory.
  • Now open /var/www/html/yourls/user/
  • Copy config-sample.php to config.php
$ sudo cp config-sample.php config.php
  • Now open the config.php
$ sudo vim config.php
  • In this file you will find something like this:
/** MySQL database username */
define( 'YOURLS_DB_USER', 'root' );

/** MySQL database password */
define( 'YOURLS_DB_PASS', '*****' );

/** The name of the database for YOURLS */
define( 'YOURLS_DB_NAME', 'yourls' );

/** MySQL hostname.
 ** If using a non standard port, specify it like 'hostname:port', eg. 'localhost:9999' or '127.0.0.1:666' */
define( 'YOURLS_DB_HOST', 'localhost' );

/** MySQL tables prefix */
define( 'YOURLS_DB_PREFIX', 'yourls_' );

/*
 ** Site options
 */

/** YOURLS installation URL -- all lowercase and with no trailing slash.
 ** If you define it to "http://sho.rt", don't use "http://www.sho.rt" in your browser (and vice-versa) */
/** Browser will not load its CSS files if you dont write /yourls with localhost below.
** But you can also set virtual host or your document root to localhost/yourls from localhost. */
define( 'YOURLS_SITE', 'http://localhost/yourls' );
/** In case of experimental server this is */
define( 'YOURLS_SITE', 'http://202.164.53.202/~iamjagjeetubhi/yourls' );
  •  Enter your Database details in it. If you dont have then create it first.
  • Now things we have to do need root access.
  • Enabling mod_rewrite
 $ sudo a2enmod rewrite
  • Now Restart the apache:
$ sudo service apache2 restart
  •  Open /etc/apache2/
  • Edit the file apache2.conf
$ sudo vim apache2.conf
  • You will see something like this in that file:
        
	Options Indexes FollowSymLinks
	AllowOverride None
	Require all granted
         
  •  Change the: AllowOverride None to AllowOverride All
  • Again Restart the Apache:
$ sudo service apache2 restart
  • Now open directory /var/www/html/yourls/
  • Create a file .htaccess
  • Change it’s permission:
$ sudo chmod 777 .htaccess
  • If .htaccess file creation/updating failed because of file permission, you’ll have to manually make one. No worry, it’s simple.
# BEGIN YOURLS

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ /yourls-loader.php [L]

# END YOURLS
  •  It is last time you need to Restart apache:
$ sudo service apache2 restart
  • Now click on Install Yourls.
  • Enter your username and password that you have set in /yourls/user/config.php. By default username is username and password is password
  • Once your installation is completed Start creating short URL

Thanks 🙂

54 thoughts on “Install YOURLS: Your Own URL Shortener”

  1. Excellent blog you have here but I was wanting to know if you knew of any discussion boards that cover the same topics talked about here? I’d really love to be a part of group where I can get advice from other experienced people that share the same interest. If you have any suggestions, please let me know. Cheers!

    Liked by 1 person

  2. Anyone that wants to read content with solid infitmaroon will want to read this article. I like how the points are stated. I share these views as well and I enjoyed this content. Thank you.

    Like

  3. Hi Gregory,This looks like a great program that will inevitably save me a tonne of time – as soon as I can get it working;) I’m having trouble loading my pat file into Revit. I’ve made a test hatch pattern, something very simple, and have been able to produce a successful hatch pattern definition in the white window – now how do I get this into Revit? I’ve saved the pat file to my computer but can’t figure out how to &#p;r62im8o1t’ it. Do I need to save the code for this hatch to Revit’s already existing pat file?I’m running Revit 2011. Thanks for any help you can provide.

    Like

  4. I’m amazed, I have to admit. Rarely do I encounter a blog that’s both equally educative and engaging, and let me tell you, you’ve hit the nail on the head. The problem is an issue that not enough men and women are speaking intelligently about. I’m very happy I came across this during my search for something concerning this.

    Like

  5. Wonderful items from you, man. I’ve consider your stuff prior to and you are simply extremely magnificent. I really like what you’ve received here, really like what you are saying and the way in which during which you say it. You are making it entertaining and you continue to take care of to keep it sensible. I can not wait to learn far more from you. That is really a tremendous web site.

    Like

  6. Hey terrific blog! Does running a blog like this take a massive amount work? I have absolutely no knowledge of programming however I was hoping to start my own blog in the near future. Anyway, if you have any suggestions or techniques for new blog owners please share. I know this is off subject however I simply needed to ask. Many thanks!

    Like

  7. Hello, I think your blog might be having browser compatibility issues. When I look at your blog in Opera, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, superb blog!

    Like

  8. Hi there very cool website!! Guy .. Excellent .. Superb .. I’ll bookmark your site and take the feeds additionally? I’m satisfied to search out numerous helpful info here in the put up, we need work out more strategies in this regard, thank you for sharing. . . . . .

    Like

  9. certainly like your website but you need to take a look at the spelling on several of your posts. Many of them are rife with spelling problems and I find it very troublesome to tell the truth on the other hand I’ll certainly come again again.

    Like

  10. You actually make it appear really easy along with your presentation but I find this topic to be really one thing which I believe I might by no means understand. It sort of feels too complicated and very large for me. I am having a look forward to your subsequent publish, I’ll try to get the hang of it!

    Like

  11. I like the valuable info you provide for your articles. I’ll bookmark your blog and take a look at again here frequently. I am somewhat certain I will learn lots of new stuff proper right here! Best of luck for the next!

    Like

  12. I think that everything published made a great deal of sense. However, think on this, what if you composed a catchier title? I am not saying your information isn’t good., however what if you added a post title that makes people want more? I mean Install YOURLS: Your Own URL Shortener is kinda vanilla. You should peek at Yahoo’s home page and note how they create post titles to get people interested. You might add a related video or a related pic or two to grab readers excited about everything’ve got to say. Just my opinion, it might bring your posts a little livelier.

    Like

  13. You’re so cool! I do not suppose I’ve truly read through something like this before. So great to find another person with a few original thoughts on this issue. Seriously.. many thanks for starting this up. This site is something that is needed on the internet, someone with a bit of originality!

    Like

  14. Fantastic items from you, man. I’ve remember your stuff previous to and you are simply too magnificent. I really like what you have received here, certainly like what you are stating and the way in which in which you say it. You are making it enjoyable and you still take care of to keep it smart. I can not wait to learn much more from you. This is actually a tremendous website.

    Like

  15. We are a gaggle of volunteers and starting a new scheme in our community. Your site provided us with useful information to work on. You’ve performed an impressive activity and our entire community will likely be thankful to you.

    Like

  16. I feel this is among the most vital info for me. And i am satisfied reading your article. But should observation on some general issues, The site style is ideal, the articles is actually nice : D. Excellent job, cheers

    Like

  17. Nice post. I learn something totally new and challenging on blogs I stumbleupon every day. It’s always interesting to read through articles from other authors and use something from their websites.

    Like

  18. Undeniably consider that which you said. Your favourite justification seemed to be at the net the easiest factor to consider of. I say to you, I certainly get irked even as people think about concerns that they just don’t know about. You managed to hit the nail upon the highest as well as outlined out the whole thing without having side effect , people could take a signal. Will likely be again to get more. Thanks

    Like

  19. Noxious chemicals can also more easily harm children and pets, who’re usually better the carpets. Tears, unraveled binding, and stains should be repaired and treated immediately. It makes sense that by using a professional carpet cleaner will give you the maximum advantages in rug cleaning but some prefer to invest in their very own steam cleaning equipment which really isn’t that bad of the idea.

    Like

  20. You are so interesting! I don’t think I’ve truly read something like that before. So wonderful to discover another person with a few original thoughts on this subject. Really.. many thanks for starting this up. This website is something that is required on the internet, someone with a little originality!

    Like

  21. First of all I want to say excellent blog! I had a quick question in which I’d like to ask if you do not mind. I was curious to know how you center yourself and clear your mind before writing. I have had trouble clearing my thoughts in getting my thoughts out there. I truly do enjoy writing however it just seems like the first 10 to 15 minutes are usually lost simply just trying to figure out how to begin. Any recommendations or tips? Many thanks!

    Like

  22. What i do not realize is actually how you are no longer actually a lot more neatly-appreciated than you may be right now. You are so intelligent. You understand thus considerably with regards to this topic, produced me in my opinion believe it from so many various angles. Its like women and men aren’t fascinated except it’s one thing to accomplish with Girl gaga! Your individual stuffs outstanding. At all times deal with it up!

    Like

  23. Aw, this was an extremely nice post. Taking the time and actual effort to generate a great article… but what can I say… I put things off a lot and don’t seem to get nearly anything done.

    Like

  24. We’re a gaggle of volunteers and opening a new scheme in our community. Your web site offered us with helpful information to work on. You’ve done a formidable activity and our entire community will be grateful to you.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s