Removing /public/ from Snipe-IT URL when installing with Softaculous

Softaculous is great. It makes the installation of web-based applications [almost] as easy as downloading an app on your phone. This plug-and-play method can have disadvantages though…

Snipe-IT is built to use the /public subdirectory as the document root, but I’m not sure Softaculous can change the document root, so it makes a few other changes to keep things working instead. This is how to undo those changes and return equilibrium.

  1. Change your web server’s document root to the /public directory within your Snipe-IT installation directory.
  2. Edit the .env file to remove /public from the APP_URL key pair. Don’t leave a trailing slash.
  3. Edit the .htaccess file (the one in the installation directory, not in /public) and remove the following from the end:
    
    RedirectMatch 301 ^/$ https://your.domain.here
    
    
  4. SSH into your server, cd to the installation directory and run php artisan config:clear. This makes sure Snipe-IT knows where to find Javascript and image assets and sets the base URL used when generating 3D barcodes.
  5. Sign in to Snipe-IT as a super admin, navigate to Admin > Barcodes and choose delete barcode cache.

If, like me, you made a 404 file in the installation folder to redirect to Snipe-IT’s 404 page in the /public directory, you can delete that.

 
1
Kudos
 
1
Kudos

Now read this

An open letter to universities: Why ‘doing your best’ isn’t always doing enough

I am a second-year production management student (theatre, not factory). My higher education experience costs 9,250 per year, plus accommodation, food, transport, bills and general living costs. I am not particularly happy. There seems... Continue →