4

I've installed YOURLS on my server and it has public interface installed by default. There's no log-in option when I access it (shortening interface - not the admin area which is password protected). I checked the settings and they all look OK to me, I'm just not sure how to create a private url shortener with no public access.

Is this possible at all? How to set it up to have URLs shortened only for my purposes, without possible spam etc caused by for instance various bots.

Many thanks for any answer.

My settings:

define( 'YOURLS_DB_PREFIX', 'n1hf_' );
define( 'YOURLS_SITE', 'http://****.net/s' );
define( 'YOURLS_HOURS_OFFSET', 0 ); 
define( 'YOURLS_LANG', '' ); 
define( 'YOURLS_UNIQUE_URLS', true );
define( 'YOURLS_PRIVATE', true );
define( 'YOURLS_COOKIEKEY', '*******' );
$yourls_user_passwords = array( 
'admin' => 'phpass:*******************',  
'userX' => 'phpass:*******************'
);
define( 'YOURLS_DEBUG', false );
define( 'YOURLS_URL_CONVERT', 36 );

Rafał
  • 39
  • 3
  • According to the [YOURLS documentation](https://yourls.org/#Config), you have to define `true` as a string, not a boolean, e.g. `define( 'YOURLS_PRIVATE', 'true' );` – does that work? – digijay Nov 21 '19 at 13:50
  • Thank you for response. I have not changed settings since fresh install, however changing boolean to string doesn't make a difference. – Rafał Nov 21 '19 at 14:52
  • Public interface is *not* enabled by default. See for instance http://ozh.in, I just made a simple `index.html`. The interface at /admin is password protected. All default settings. – Ozh Mar 30 '20 at 07:35
  • @Ozh it isnt enabled yet I have the same problem! on 1.9.1 my 'YOURLS_PRIVATE' is true yet anyone can shorten links! any clue where this is coming from ? – Julien Denos Sep 19 '22 at 17:32
  • @JulienDenos most likely from the public interface you've set up – Ozh Sep 20 '22 at 19:56
  • @ozh thank you for this really productive comment! as I explained before YOURLS_PRIVATE is set to true. yet a public interface is available! Any idea what other parameters could create this ? – Julien Denos Jul 18 '23 at 10:35

1 Answers1

0

Just use a redirect via your hosting or cloudflare to redirect from your where your YOURLS is installed, like in http://****.net/s Redirect it to other website