snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

When trying to access The Snipe IT site from IIS, Getting the screen with folder structure.

Open hanamanthalli opened this issue 11 years ago • 22 comments

Hi All,

I am getting the attached screen while trying to access the Snipe IT site from IIS server.

I followed the steps as mentioned the Snipe IT manual Guide.

Everything was completed successfully..

But not able to open the site, Can someone Please help on what might be wrong here.

***********_The page displayed like this_ localhost - /snipe-it/


[To Parent Directory]

3/12/2015 12:17 PM 395 .bash_history 3/12/2015 12:17 PM 67 .dockerignore 3/12/2015 12:17 PM 11 .gitattributes 3/12/2015 12:17 PM 443 .gitignore 3/12/2015 12:17 PM 1570 .travis.yml 3/12/2015 4:12 PM

app 3/12/2015 12:17 PM 2451 artisan 3/16/2015 10:37 AM 97 auth.json 3/16/2015 10:37 AM bin 3/12/2015 4:12 PM bootstrap 3/12/2015 12:17 PM 25943 CHANGELOG.md 3/12/2015 6:25 PM 1561 composer.json 3/12/2015 12:17 PM 134044 composer.lock 3/12/2015 12:17 PM 1857 CONTRIBUTING.md 3/12/2015 4:12 PM docker 3/12/2015 12:17 PM 2484 Dockerfile 3/12/2015 12:17 PM 1655 gh-changelog.php 3/12/2015 12:17 PM 34519 LICENSE 3/12/2015 12:17 PM 567 phpunit.xml 3/12/2015 6:35 PM public 3/12/2015 12:17 PM 4443 README.md 3/12/2015 12:17 PM 522 server.php 3/16/2015 11:30 AM vendor


Your valuable inputs are appreciated a lot.

Thanks, Hanamant

hanamanthalli avatar Mar 16 '15 06:03 hanamanthalli

the physical path in the site settings should be pointed to the public directory

Site name: Snipe IT Physical path: C:\inetpub\wwwroot\snipe-it\public Binding Type: http IP address: All Unassigned or a specific IP if you have one you will be using Port: 80 or any you wish to use Host name: assets.portal.local (this can be changed to suit your needs)

madd15 avatar Mar 16 '15 10:03 madd15

madd15,

Thanks for the response.

I have followed all the steps as per the Spine IT installation Guide, which already mentions these above points shared by you

Once again i rechecked and everything was as per the guideline and is intact with above points.

Still facing the problem.. Please can someone respond if you know the solution.

Thanks, Hanamant

hanamanthalli avatar Mar 16 '15 11:03 hanamanthalli

What happens when you click on the index.php in that directory listing? This almost definitely sounds like your DocumentRoot is wrong (as @madd15 mentioned). The fact that you can see the public directory as a subdirectry in your display means for a fact that public is not set to your document root. Did you restart your web server after setting that document root? That's the only other thing I can think of.

snipe avatar Mar 16 '15 11:03 snipe

image

The Screen shown above is displayed and doesn't show up index.html... if i try to click on public and access index.html then i get this screen

image

Yes.. i restarted the web server and started.

What might be the reason?

hanamanthalli avatar Mar 16 '15 12:03 hanamanthalli

ok i see something odd with your setup. in your default site is snipe-it but you have set up assets.portal.local:8888 as another site. Please turn off the default site and try accessing assets.portal.local:8888 if you have the DNS setup.

ultimately you could delete the default site and set snipe it to use port 80 and localhost edit the binding on Snipe IT to

Type: http IP address: All Unassigned Port: 80 Host name: (leave blank)

edit: totally realise this my make no sense, sorry long day

madd15 avatar Mar 16 '15 12:03 madd15

FYI, there is no index.html in this app.

snipe avatar Mar 17 '15 03:03 snipe

Again I tried to setup the website as mentioned by @madd15 in his previous comment.

image

Am seeing this below screen after setting up everything and clicking on browse button as in the above screenshot.

image

In what times this screen appears

hanamanthalli avatar Mar 17 '15 06:03 hanamanthalli

Have you ran php artisan key:generate with --env=local or --env=production depending on what your environment. eg php artisan key:generate --env=local Have you also run php artisan app:install?

madd15 avatar Mar 17 '15 07:03 madd15

Yes I did ran these commands, as it was mentioned in the installation guide.

http://snipeitapp.com/documentation/installing-on-iis/

On Mar 17, 2015 12:49 PM, "madd15" [email protected] wrote:

Have you ran php artisan key:generate with --env=local or --env=production depending on what your environment. Have you also run php artisan app:install?

— Reply to this email directly or view it on GitHub https://github.com/snipe/snipe-it/issues/661#issuecomment-82174308.

hanamanthalli avatar Mar 17 '15 07:03 hanamanthalli

And @madd15 , @snipe

Am seeing this error as in the screenshot.

image

hanamanthalli avatar Mar 17 '15 09:03 hanamanthalli

Can you please provide the content of your setting table from your database. Thanks

madd15 avatar Mar 17 '15 09:03 madd15

@madd15 , Sorry to mind you.. I am new to this stuff.. can u please guide me how to get this data? if you have any document which gives the steps mentioned that would be great..

but as of now i tried from the knowledge what i have currently.. and am seeing these databases in mysql when trying to get contents from settings table in mysql database using command line as in this screen.. settings table doesn't have any data, it is empty

image

hanamanthalli avatar Mar 17 '15 10:03 hanamanthalli

@hanamanthalli Try out the instructions below and let me know if you have issues.

  1. In the MYSQL command line type CREATE DATABASE Snipe_IT; (should not use the mysql DB)
  2. Now change the database.php to point to Snipe_IT
  3. Now re-run php artisan app:install the same way as during the installation
  4. In the MYSQL command line type USE Snipe_IT; SELECT * FROM settings;
  5. If there is nothing there, run the following in the MYSQL command line;
INSERT INTO `settings` (`id`,`created_at`,`updated_at`,`user_id`,`per_page`,`site_name`,`qr_code`,`qr_text`,`display_asset_name`,`display_checkout_date`,`display_eol`,`auto_increment_assets`,`auto_increment_prefix`,`load_remote`,`logo`,`header_color`,`alert_email`,`alerts_enabled`,`default_eula_text`,`barcode_type`) VALUES (1,'2015-03-10 22:54:47','2015-03-10 22:54:47',1,50,'Snipe IT Asset Management',NULL,NULL,NULL,NULL,NULL,0,'0',1,NULL,NULL,NULL,1,'','QRCODE');

madd15 avatar Mar 17 '15 11:03 madd15

After running the command Select * from Settings, am getting the below result.

MariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | snipe_it | | test | +--------------------+ 5 rows in set (0.00 sec)

MariaDB [(none)]> use snipe_it; Database changed MariaDB [snipe_it]> select * from settings; +----+---------------------+---------------------+---------+----------+--------- ------------------+---------+---------+--------------------+-------------------- ---+-------------+-----------------------+-----------------------+-------------+ ------+--------------+-------------+----------------+-------------------+------- -------+ | id | created_at | updated_at | user_id | per_page | site_nam e | qr_code | qr_text | display_asset_name | display_checkout_da te | display_eol | auto_increment_assets | auto_increment_prefix | load_remote | logo | header_color | alert_email | alerts_enabled | default_eula_text | barcod e_type | +----+---------------------+---------------------+---------+----------+--------- ------------------+---------+---------+--------------------+-------------------- ---+-------------+-----------------------+-----------------------+-------------+ ------+--------------+-------------+----------------+-------------------+------- -------+ | 1 | 2015-03-17 11:17:17 | 2015-03-17 11:17:17 | 1 | 50 | Snipe IT Asset Management | NULL | NULL | NULL | NU LL | NULL | 0 | 0 | 1 | NULL | NULL | NULL | 1 | NULL | QRCODE | +----+---------------------+---------------------+---------+----------+--------- ------------------+---------+---------+--------------------+-------------------- ---+-------------+-----------------------+-----------------------+-------------+ ------+--------------+-------------+----------------+-------------------+------- -------+ 1 row in set (0.00 sec)

MariaDB [snipe_it]>

hanamanthalli avatar Mar 17 '15 11:03 hanamanthalli

ok try loading the page now

madd15 avatar Mar 17 '15 11:03 madd15

@madd15 .. Thanks a lot for your help, its working now, am able to load the page.

image

hanamanthalli avatar Mar 17 '15 11:03 hanamanthalli

@hanamanthalli No worries, glad I could get it sorted for you.

alt

madd15 avatar Mar 17 '15 11:03 madd15

@madd15 nice work! Do we know what happened here? I feel like this isn't the first time the settings table has been donked, and I'd like to see if it's fixabke on our end,

snipe avatar Mar 17 '15 11:03 snipe

(Also, I approve of your use of animated gifs :P )

snipe avatar Mar 17 '15 11:03 snipe

I need to see if I can replicate the issue, so far I can't

madd15 avatar Mar 17 '15 12:03 madd15