Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

WebGL Server side issues

Discussion in 'WebGL' started by WinKIller0, Dec 10, 2015.

  1. WinKIller0

    WinKIller0

    Joined:
    Apr 14, 2013
    Posts:
    9
    Hi All

    We're creating a game for WebGL (using 5.3 version) and have run to weird problem. We've got two different environments; one Debian based web server and one CentOS base one. Everything functions well with the Debian server but with CentOS the load process of the content fails at WebGL.js file load. Does someone have idea what could cause the problem? You can find the CentOS version from http://batman.jamk.fi/~mottju/yrityspeli/ unfortunetly I can't provide the Debian based server at this moment (but the game works there)

    What we've come up with this far:
    • Freshly installed CentOS 7 without selinux doesn't work. The CentOS has rewrite module enabled and gzip mime's are correct. Deflate module is enabled.
    • Freshly installed Debian with default apache packages are installed works as expected
    • The problem seems to relate to gzip compression but we're not sure what the problem might be
    And this might help you if you have 500 internal error when publishing on your web server. Lessen the security settings within the user_dir module .htaccess.

    Officially Ubuntu is supported but why would the different distribution fail to load the WebGL build with the same settings and packages? Would someone have insight on this topic?
     
  2. mozzaus

    mozzaus

    Joined:
    Aug 13, 2015
    Posts:
    2
    A few thoughts based on my experiences in this case (Unity 5.3 webGL build on Centos box)

    • if the game resides in the document root, it seems to work if AllowOverdrive is set to All for the document root in the apache configuration (in Centos, file /etc/httpd/conf/httpd.conf)
    • if the game is in the user directory, rewritebase must be added to .htaccess file (hidden file in the Release folder). So if the game's URL is http://myserver.com/~myaccount, "RewriteBase /~myaccount/Release" must be added after "RewriteEngine On". Also make sure that AllowOverdrive All is set for user directories.
     
  3. Que

    Que

    Joined:
    Mar 14, 2014
    Posts:
    135
    I have the same problem with my hosting provider, so I move somewhere else (Moscom.com) but didn't find out the OS.

    @mozzaus
    What is your hosting current environment, the working one?
     
  4. mozzaus

    mozzaus

    Joined:
    Aug 13, 2015
    Posts:
    2
    @Que : University servers running CentOS and Apache.