Snipe-it: Brand new install from git clone, redirects to /setup which returns 404 not found

Created on 28 Aug 2018  Â·  20Comments  Â·  Source: snipe/snipe-it

This is more kind of a question after reading the install docs here:

https://snipe-it.readme.io/v4.6.3/docs/downloading

It says to "pick from one of the following". I picked the git clone method and I am having an issue where I am getting redirected to /setup and getting a 404 file not found.

Am I supposed to be running the install.sh that came with the git clone? The directions for the git download method don't mention it, but I've done everything else in the install/config guide now twice from fresh install and have had this same problem.

Thanks.

stale

All 20 comments

Can you enable debugging and share it with the community?

Enabled debugging yesterday. No error logs in Apache and no logs generated
in storage/logs.

On Wed, Aug 29, 2018, 2:47 AM Earl Ramirez notifications@github.com wrote:

Can you enable debugging and share it with the community?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/snipe/snipe-it/issues/6140#issuecomment-416843724,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AO7ukQV8ptq7LI-mSFcyTkr1ZmzTQEeLks5uVjkVgaJpZM4WQTd3
.

--

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed. If you have received this email in error please notify the
system manager. This message contains confidential information and is
intended only for the individual named. If you are not the named addressee
you should not disseminate, distribute or copy this e-mail. Please notify
the sender immediately by e-mail if you have received this e-mail by
mistake and delete this e-mail from your system. If you are not the
intended recipient you are notified that disclosing, copying, distributing
or taking any action in reliance on the contents of this information is
strictly prohibited.

What OS are you using? Can you confirm the document root for Snipe-IT in the virtual host? Apologies for the questions, unfortunately, the template was not completed.

If you need to get this up and running immediately, you can checkout https://github.com/EarlRamirez/snipeit_iso

Earl, I didn't fill out the template because I only had a question. Are you able to answer that question? Everything has been verified. If the document root wasn't working, I am assuming the redirect to /setup wouldn't even be working as I am 100% sure it isn't Apache doing that redirect.

OS is Ubuntu.

I looked at the install.sh and resulting snipeit.sh and that definitely isn't what I want to run haha. Looking through the setup though compared to the instructions for configuration in the doc, as far as I can tell I have done everything listed. I was just hoping someone would recognize the problem and be able to answer quickly. I am trying to migrate a working snipeit install (though just slightly older) to a new server.

Below I am including my .env (passwords/keys/emails/hostnames obfuscated for security reasons). Thanks.

```user@host:/var/www/snipe-it# cat .env

--------------------------------------------

REQUIRED: BASIC APP SETTINGS

--------------------------------------------

APP_ENV=production
APP_DEBUG=true
APP_KEY=base64:NOPENOPENOPENOPENOPENOPENOPENOPE
APP_URL=https://inventory.nope.com
APP_TIMEZONE='US/Eastern'
APP_LOCALE=en

--------------------------------------------

REQUIRED: DATABASE SETTINGS

--------------------------------------------

DB_CONNECTION=mysql
DB_HOST=something.in.rds.at.aws.amazon.com
DB_DATABASE=snipeitdb
DB_USERNAME=snipeit
DB_PASSWORD=NOPENOPENOPENOPE
DB_PREFIX=null
DB_DUMP_PATH='/usr/bin'
DB_CHARSET=utf8mb4
DB_COLLATION=utf8mb4_unicode_ci

--------------------------------------------

OPTIONAL: SSL DATABASE SETTINGS

--------------------------------------------

DB_SSL=false
DB_SSL_KEY_PATH=null
DB_SSL_CERT_PATH=null
DB_SSL_CA_PATH=null
DB_SSL_CIPHER=null

--------------------------------------------

REQUIRED: OUTGOING MAIL SERVER SETTINGS

--------------------------------------------

MAIL_DRIVER=smtp
MAIL_HOST=127.0.0.1
MAIL_PORT=25
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
[email protected]
MAIL_FROM_NAME='Inventory'
[email protected]
MAIL_REPLYTO_NAME='Inventory'

--------------------------------------------

REQUIRED: IMAGE LIBRARY

This should be gd or imagick

--------------------------------------------

IMAGE_LIB=gd

--------------------------------------------

OPTIONAL: SESSION SETTINGS

--------------------------------------------

SESSION_LIFETIME=12000
EXPIRE_ON_CLOSE=false
ENCRYPT=false
COOKIE_NAME=snipeit_session
COOKIE_DOMAIN=null
SECURE_COOKIES=false

--------------------------------------------

OPTIONAL: SECURITY HEADER SETTINGS

--------------------------------------------

REFERRER_POLICY=same-origin
ENABLE_CSP=false

--------------------------------------------

OPTIONAL: CACHE SETTINGS

--------------------------------------------

CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

--------------------------------------------

OPTIONAL: REDIS SETTINGS

--------------------------------------------

REDIS_HOST=null
REDIS_PASSWORD=null
REDIS_PORT-null

--------------------------------------------

OPTIONAL: AWS S3 SETTINGS

--------------------------------------------

AWS_SECRET=null
AWS_KEY=null
AWS_REGION=null
AWS_BUCKET=null

--------------------------------------------

OPTIONAL: LOGIN THROTTLING

--------------------------------------------

LOGIN_MAX_ATTEMPTS=6
LOGIN_LOCKOUT_DURATION=30

--------------------------------------------

OPTIONAL: MISC

--------------------------------------------

APP_LOG=single
APP_LOG_MAX_FILES=10
APP_LOCKED=false
FILESYSTEM_DISK=local
APP_TRUSTED_PROXIES=192.168.1.1,10.0.0.1
ALLOW_IFRAMING=false
APP_CIPHER=AES-256-CBC
GOOGLE_MAPS_API=
BACKUP_ENV=true

To answer your question, yes, after you use git clone you will need to run ./install.sh to install and configure Snipe-IT for you, it will also run composer for you. Hope this answer your question.

Earl,

That is incorrect. If I run install.sh it's going to install and configure
a bunch of stuff on the system that I DO NOT want. The composer install was
in the base set of install instructions.

On Wed, Aug 29, 2018 at 10:23 AM Earl Ramirez notifications@github.com
wrote:

To answer your question, yes, after you use git clone you will need to run
./install.sh to install and configure Snipe-IT for you, it will also run
composer for you. Hope this answer your question.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/snipe/snipe-it/issues/6140#issuecomment-416971662,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AO7ukUGYZJLcBb0XeEghIeKfNfriApsfks5uVqPFgaJpZM4WQTd3
.

--

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed. If you have received this email in error please notify the
system manager. This message contains confidential information and is
intended only for the individual named. If you are not the named addressee
you should not disseminate, distribute or copy this e-mail. Please notify
the sender immediately by e-mail if you have received this e-mail by
mistake and delete this e-mail from your system. If you are not the
intended recipient you are notified that disclosing, copying, distributing
or taking any action in reliance on the contents of this information is
strictly prohibited.

Let me understand, you install Snipe-IT by simply cloning the directory? To the best of my knowledge, you need to run the install.sh, did you configure the DB already? The ./install.sh will download and run snipeit.sh this script will then do the work for you, create the DB, create the virtual host, clone into /var/www/html/, run composer and install all of the vendor's packages which are required by Snipe-IT.

So you are trying to spin up a Snipe-IT installation to migrate to that new server or are you trying to upgrade from an existing installation on the same box?

No Earl. Like I said, I did the git clone install method. It is a FRESH install. I don't want it to create the database for me, I already have a database in AWS RDS. Running the script is going to muck up the system installing a bunch of stuff I don't need.

So you are running Ubuntu on AWS? This is why it is recommended to complete the template so that it will not create all this confusion.

What does it matter where I am running Ubuntu!? The only confusion here is with you. You told me with installing via doing a git clone that I need to run install.sh, that is false.

Like I know you're trying to help, but you're providing false information.

I realise the confusion is with me, but all I am trying to do is simply help with the information that you provided, based on your question you reference the doc, step

  1. Clone the directory git clone https://github.com/snipe/snipe-it your-folder
    Set 3 downloads the installer, and the reason why you will download the installer is to execute it
    wget https://raw.githubusercontent.com/snipe/snipe-it/master/install.sh
    chmod 744 install.sh
    ./install.sh

So forgive me for trying to help you, but seems that I am not able to assist you further.

Have a pleasant day and hope a member of a community will be able to assist you.

Earl,

No where in the git clone install does it say to run install.sh. Read the documentation:

https://snipe-it.readme.io/v4.6.3/docs/downloading

Each one of those four numbers are different install options. The install.sh is only if you want the script to automatically make changes to your system which I do _NOT_ want it to do.

If I were to follow all four of those "steps" as you call them, I would have four installs of SnipeIT. One with git clone, one with the source package, one with the install script and one with Docker.

Also why it says before those "steps":

We offer a few different ways to download Snipe-IT. Pick one of the following:

You are using the manual method

  • Clone into the directory
  • Create and configure the DB
  • Configure Snipe-IT
  • Install dependencies via composer
  • Generate API keys
  • Configure web server
  • Access preflight page (this is where you are currently)

Which step from the manual process you did?

I did all of those except the pre-flight page isn't loading.

I went through all the steps here as you saw from me posting my .env above:

https://snipe-it.readme.io/v4.6.3/docs/configuration

I did the global composer install from here, installed composer via apt package so it will stay up to date:

https://snipe-it.readme.io/v4.6.3/docs/install-dependencies

Generated the app key, which is obfuscated in my .env that I posted above:

https://snipe-it.readme.io/docs/generate-your-app-key

Database was created in AWS RDS, MySQL. The server can access it because I connected to it from there to create the database and create the database user. I also tested the database user I created using the mysql client on the system I am trying to install SnipeIT on and it worked.

@roberthurricane
Looks like a classic case of url rewriting problem. Please check whether url rewrite is enabled and working.

If using apache, use phpinfo() and look for mod_rewrite. You can also add some invalid code in .htaccess to check if your rewrite rules are being loaded at all. The following should give you server error 500.
<IfModule mod_rewrite.c>invalid code blah blah</IfModule>.

@roberthurricane there's been a bit of back and forth in this issue - can you confirm that you're still seeing the 404 issue? If that's correct, I believe @SeriousMatters is likely correct, and it may be a rewrite issue.
https://snipe-it.readme.io/docs/installation-issues#section-the-requested-url-setup-was-not-found-on-this-server

Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!

This issue has been automatically closed because it has not had recent activity. If you believe this is still an issue, please confirm that this issue is still happening in the most recent version of Snipe-IT and reply to this thread to re-open it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ArchdukeNavaron picture ArchdukeNavaron  Â·  4Comments

ericdude101 picture ericdude101  Â·  5Comments

laTruffe79 picture laTruffe79  Â·  4Comments

Rungea96 picture Rungea96  Â·  4Comments

sbenoit89 picture sbenoit89  Â·  5Comments