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

Unable to host Snipe-IT on El Capitan MacOS Server 5.2.

Open fbe-it opened this issue 10 years ago • 11 comments

Expected Behavior (or desired behavior if a feature request)

I am trying to host Snipe-IT on El Capitan 10.11.6 with MacOS Server 5.2, but I am unable to start the Pre-Flight due to an .htacccess/IfModule allowance issue. I have an instance of Snipe IT running perfectly fine as a vHost on one of our iMacs running OSX 10.11.6 without MacOS Server 5.2. I am also able to host my Munki server site on this machine without any issues.

Actual Behavior

When I go to my url, I receive the Internal Server Error and my console log prints this error. [core:alert] [pid 18480] [client 127.0.0.1:58254] /Library/Server/Web/Data/Sites/Default/snipe-it/.htaccess: <IfModule not allowed here

I have edited my sites vhost .conf file in /Library/Server/Web/Config/apache2/sites to allow for "AllowOverride ALL", in my directory, but the issue still persists. I have also made sure that mod_rewrite is uncommented in /Library/Server/Web/Config/apache2/httpd_server_app.conf.

Any help here would be wonderful!

e.g.


<VirtualHost 127.0.0.1:34580> ServerName http://test-equipment.finebrosoffice.net:80 ServerAdmin [email protected] DocumentRoot "/Library/Server/Web/Data/Sites/Default/snipe-it/public" DirectoryIndex index.html index.php default.html CustomLog /var/log/apache2/access_log combinedvhost ErrorLog /var/log/apache2/error_log SSLEngine Off SSLCipherSuite "HIGH:MEDIUM:!MD5:!RC4:!3DES" SSLProtocol -all +TLSv1 +TLSv1.1 +TLSv1.2 SSLProxyEngine Off SSLProxyProtocol -all +TLSv1 +TLSv1.1 +TLSv1.2 SSLProxyCheckPeerCN off SSLProxyCheckPeerName off MSTEngine Off MSTCipherSuite HIGH, MEDIUM MSTProtocolRange TLSv1.2 TLSv1.2 MSTProxyEngine On MSTProxyProtocolRange TLSv1.2 TLSv1.2 <Directory "/Library/Server/Web/Data/Sites/Default/snipe-it/public"> Options -Indexes -ExecCGI -Includes +MultiViews AllowOverride All DAV (null) <IfDefine !WEBSERVICE_ON> Require all denied ErrorDocument 403 /customerror/websitesoff403.html

^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos ^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text ^T To Spell


Please confirm you have done the following before posting your bug report:


Please provide answers to these questions before posting your bug report:

  • Version of Snipe-IT you're running v3.6

  • What OS and web server you're running Snipe-IT on El Capitan 10.11.6 with MacOS Server 5.2 via Apache2

  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) Manual Installation

  • WITH DEBUG TURNED ON, if you're getting an error in your browser, include that error Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator at *****.com to inform them of the time this error occurred, and the actions you performed just before this error. More information about this error may be available in the server error log. Apache Server at test-equipment.finebrosoffice.net Port 80

  • What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error. I am unable to launch the pre-flight setup for snipe.

  • If a stacktrace is provided in the error, include that too. n/a

  • Any errors that appear in your browser's error console. n/a

  • Confirm whether the error is reproduceable on the demo. No as it is a hosting issue.

  • Include any additional information you can find in app/storage/logs and your webserver's logs.

  • Include what you've done so far in the installation, and if you got any error messages along the way.

  • Indicate whether or not you've manually edited any data directly in the database n/a

fbe-it avatar Nov 23 '16 23:11 fbe-it

Did you restart Apache after making the changes? http://serverfault.com/questions/529007/apache-htaccess-ifmodule-not-allowed-here http://stackoverflow.com/questions/35880864/getting-error-htaccess-ifmodule-not-allowed-here https://discussions.apple.com/thread/6605399?start=0&tstart=0

snipe avatar Nov 23 '16 23:11 snipe

Yes, I am still having the same issues after restarting the Web Server via "sudo serveradmin stop/start web".

fbe-it avatar Nov 23 '16 23:11 fbe-it

My MacOS server chops are mad rusty. Maybe @uberbrady can help.

snipe avatar Nov 23 '16 23:11 snipe

The problem seems to be Snipe-IT's .htaccess file, specifically. For some reason your version of Apache doesn't like the <IfModule> directive in there? That's pretty weird, because that's part of Apache's core...so I don't understand why it wouldn't work. Super weird.

That error message seems to be pretty specific to that AllowOverride ALL setting, so that really does sound like the right direction to start looking: http://serverfault.com/questions/529007/apache-htaccess-ifmodule-not-allowed-here

I know you were careful to restart your Apache server before, but maybe to be on the safe side, see if you can restart the entire server, just to make triply sure?

uberbrady avatar Nov 24 '16 00:11 uberbrady

@uberbrady I was able to fix the .htaccess issue by adding the lines below to my httpd_server_app.conf file. Adding them to the vhost site file didn't do anything for me in "/Library/Server/Web/Config/Sites".

Unfortunately, I am now receiving another error. Any idea on what may be causing this? Error Messages.pdf

Appended to httpd_server_app.conf:

<Directory "/Library/Server/Web/Data/Sites/Default/"> Options +Indexes +FollowSymLinks +MultiViews AllowOverride All Order deny,allow Allow from all

<Directory "/Library/Server/Web/Data/Sites/Default/snipe-it/public"> Options +Indexes +FollowSymLinks +MultiViews AllowOverride All Order allow,deny Allow from all

fbe-it avatar Nov 29 '16 00:11 fbe-it

The permissions in your /Library/Server/Web/Data/Sites/Default/snipe-it/storage/ directory are wrong. Check out https://snipe-it.readme.io/v3.0/docs/configuration#required-set-directory-permissions

uberbrady avatar Nov 29 '16 02:11 uberbrady

Ok the permissions have been changed and now I am receiving this error. Thank you for your assistance! Error Messages 3.pdf

fbe-it avatar Nov 29 '16 03:11 fbe-it

Please just paste the error messages in here, don't attach as PDF.

The Maximum nesting error happens when you have xdebug turned on. You should disable it and restart Apache.

snipe avatar Nov 29 '16 05:11 snipe

Issue resolved! Thank you for your quick and helpful assistance, this product is excellent @uberbrady @snipe.

fbe-it avatar Nov 29 '16 23:11 fbe-it

Glad to hear you got it all handled! And thank you.

uberbrady avatar Nov 30 '16 02:11 uberbrady

chameleons

snipe avatar Nov 30 '16 03:11 snipe