-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Welcome to the enlight-webfront wiki! The server software is mostly meant for running on our own server which is tied to an actual physical fountain, so these instructions are catered to members curious as to the set-up process (or disaster recovery if the server bites the dust - no worries, just re-download the source)! This wiki won't do much justice by way of explaining what Enlight actually is - for that, you should check out our blog - this is simply a down and dirty overview of the Webfront code.
Webfront is a PHP-driven, web-based interface to the C++ end of the fountain, which means in order to run it (for either production or testing purposes), you'll need an environment with a webserver and PHP evaluator, as well as a MySQL database. Once you've downloaded the code (hopefully by cloning it locally), you need to put it somewhere where your PHP service can see it (so you can test it by going to http://localhost/someDirectory). This is usually /var/www/someDirectory in many Unix distributions, assuming a standard Apache installation (which should come with PHP capabilities). If there's a directory called htdocs you'll want to put someDirectory inside of that. If you're using Windows, I suggest using XAMPP (it's a pretty sketchy looking site but it's legit), which will place its web directory in C:/xampp/htdocs. You'll also need to run a MySQL server, and import the most recent database file from the project's /sql directory (this contains schema and any dummy/test values).
There are a few things you'll (probably) have to change in the enlight-backend project too, like deleting the UnixUDPStack.cpp file if you're on Windows (and vice versa on Unix) unless you're clever with how you have your compile-time environment set up and can resolve all the library names. Maybe someone can do some preprocessor magic to fix it but it works for me - modify it to your own needs, however.
There are some common things that we will want to do with the Webfront, so these documents should outline how to go about doing those in the conventional/best manner.
An important distinction to make is between the testing environment and the distribution environment. Despite how amazing open-source is, certain things do need to be kept private (our site-wide salt value, the production database connection password, etc.) and as such any source files here on GitHub will contain dummy values for use in testing. In particular, here are the dummy values used with their respective files:
Site-wide salt (for user passwords) - in /SHADOW/SALT:
lVZZ`F}x(`,6/GHi*##$67$]c.w=dm:pR3c10u5AnDfR4g113tH1ng5n3Ed5p3c141H4nD1InG:kr*>M@v|pkL{P)50?V}QMf+yKg=vz6eX3L
MySQL database password - in /php/startDatabase.php:
ydvCN3q8z7qUFc7X
Again, these are the values that you need to change before deploying to production. These values are fine though for testing, which is why they're here by default.
Another small thing that may need to change before production is the MySQL database host (the default is localhost) which is stored in /php/session.php.
Fore more information about that, see the page on the MySQL configuration.