Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D'oh. If you're seeing this, your DocumentRoot is set incorrectly. It should be set to the public directory. #10232

Closed
2 tasks done
J1MP123 opened this issue Oct 26, 2021 · 7 comments

Comments

@J1MP123
Copy link

J1MP123 commented Oct 26, 2021

Debug mode

Describe the bug

Hello you cool people, I'm struggling now for 2 days to set this amazing tool up. I have changed DocumentRoot all folders it's said this function. I have rebooted apache 5 times. The local IP I'm using for apache is http://172.16.0.102 (will be used only for home inventory) loading it up straight away but it is not working. What am I doing wrong guys? :( I have attached my full apache2 folder, I'm out of ideas what else to change. maybe someone is more advanced in this stuff and could help me out. :(

I have archived (rar) my whole apache2 folder etc/apache2/ http://uppit.com/bsox4srvyxa0

Could anyone take a look what am I doing wrong?
whatisgoingon

  • Thank you all very much in advance.

Reproduction steps

  1. Moved latest version downloaded to /var/www/html/snipe-it/
  2. changed all DocumentRoot files available
  3. something missing. :( what am I missing?
    ...
    Html

Expected behavior

It should show the installer page.

Screenshots

snipe

Snipe-IT Version

Latest version from website

Operating System

Raspbian GNU/Linux 10 (buster) (debian base)

Web Server

Apache/2.4.38 (Raspbian)

PHP Version

7.3.29-1~deb10u1

Operating System

Windows 10

Browser

Chrome

Version

95.0.4638.54

Device

Operating System

Browser

Version

Error messages

D'oh. If you're seeing this, your DocumentRoot is set incorrectly. It should be set to the public directory.

Additional context

Fresh installation. Manually added downloaded the latest version to HTML folder on my PI.

@welcome
Copy link

welcome bot commented Oct 26, 2021

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@snipe
Copy link
Owner

snipe commented Oct 26, 2021

Hi there! Can you show me your Apache config block for this server?

@J1MP123
Copy link
Author

J1MP123 commented Oct 27, 2021

Hello Snipe! Could you point me in the right direction to search I thought all config files are stored in the apache2 folder? :(

Thank you for fast response.

@snipe
Copy link
Owner

snipe commented Oct 29, 2021

Right, but I need to know the contents of the config itself. There is typically a VirtualHost block in your httpd.conf that tells Apache what directory to look at.

Something like:

# Ensure that Apache listens on port 80
Listen 80
<VirtualHost *:80>
    DocumentRoot "/www/example1"
    ServerName www.example.com

    # Other directives here
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "/www/example2"
    ServerName www.example.org

    # Other directives here
</VirtualHost>

This is really kind of outside the scope of GH issues here, since it's a web server config issue, but we'll try to help if we can.

@J1MP123
Copy link
Author

J1MP123 commented Oct 30, 2021

Hi Snipe! This is what i found via notepad++ searching whole apache2 folder.
in \apache2\sites-enabled\000-default.conf and \apache2\sites-available\000-default.conf

`<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/snipe-it/

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf

vim: syntax=apache ts=4 sw=4 sts=4 sr noet`

:)

@J1MP123 J1MP123 mentioned this issue Nov 9, 2021
2 tasks
@xam-ps
Copy link

xam-ps commented Dec 2, 2021

No offense, but you should maybe first get into the basics of web-server configuration ;)

http://httpd.apache.org/docs/2.4/vhosts/examples.html
https://snipe-it.readme.io/docs/linuxosx

Snipe-IT Documentation
Setting up a web server can sound daunting for folks who don't normally do that kind of thing. This guide will help you walk through the configuration for Apache or Nginx on Linux and OSX. The most common setup for Snipe-IT on a linux server is to use Apache, so if you're not sure what to pick, Apac...

@snipe
Copy link
Owner

snipe commented Mar 21, 2022

Hi there - We haven't heard back in a bit, so I'm going to close this ticket for now, but will re-open it if you're still having issues.

hackerman-hacking

@snipe snipe closed this as completed Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants