Ideally, you would install DistriFile on a dedicated Linux based webserver running within your local network at your office, house, etc., (excellent if you are the one receiving VERY LARGE files on a regular basis--eliminate the extra step downloading from a cloud such as dropbox when people send you files), while having it accessible to the web. Not everyone is familiar with running a webserver, let alone Linux.
I was told by a few people, "If you could make this run on my Windows PC, that would be great!" Guess what... I did! Even some low-cost hosting solutions for websites won't even allow databases or have really old PHP versions, so this is also an alternative.
If this is on a residential internet connection, then people outside your network will be downloading at your upload speed--which may be considerably slower than your download speed. If you are not sending and receiving LARGE FILES, this probably won't be an issue. Also, running a webserver on a residential internet connection may violate your internet provider's terms of service / acceptable use agreement.
Configurations shown may be tweaked further than included/shown, but this will show you how to minimally set up for using DistriFile on a windows machine. Tested on Windows 10 Pro 64 bit. To handle LARGE files, you MUST have a 64bit OS and use the PHP7 64bit! Others may work, but not tested nor recommended. I have created a free and simple way to install NGINX and PHP7. Although the packages included in the download might not be the latest stable release, they are fairly recent. This is intended for people who just want a simple method to start a server on their Windows PC.
Note, you don't have to log in, just click the "No thanks, just start my download." link under the buttons...
Click allow or yes to the following prompts after opening the installer until you come to this screen and click "Server only" then click "Next".
Proceed and then Execute. It will download the MySQL server.
Select Server Machine as Config type as shown here then click "Next":
Create a root password and then another user as shown here WRITE THESE DOWN!!!
Note, the user we create now will be one we use for the DistriFile database later.
Click next and use the defaults for the following screens and then you'll execute this screen:
Note, the user we create now will be one we use for the DistriFile database later.
Click on through to finish...
Note, you might get some firewall warnings / dialogues, allow them.
"dbname" will be whatever Database Name you want, and "dbuser" is the Database User (not Root) that you created earlier.
DO NOT TYPE dbname or dbuser!!! Press "Enter" when finished typing a line.
You do not have to use the package offered below, however, using it will be super simple to setup!
Visual C++ Redistributable for Visual Studio 2015
PHP requires this to run. If not already installed, go here, download and install: https://www.microsoft.com/en-us/download/details.aspx?id=48145
Download and Extract
Currently, only a 64-bit package is available. DistriFile is meant to handle large files, and 64-bit is needed for that.
In explorer, browse to C:\webserver\
Some quick notes...
Once you have your server running and is operational, now you must configure your domain to be directed to this PC. We already covered it locally with your HOSTS file. For people outside your network, when they type your domain name, their computer will do a DNS lookup for your domain and then will be directed here. This may seem a little daugnting, but its not that difficult.
If you have a Dynamic IP address from your Internet Service Provider, you will need to use a system such as dyn.org for Dynamic IP addresses. Once you set it up, you would have a "Dyn Updater" running on your PC that monitors your changing IP address and reports it back to dyn. The standard DNS service they provide is $60 a year and is more less rock solid (except when this happened.) There are many other services available, but I have used Dyn for many years and just used it as an example.
If you have a Static IP address you won't need something like Dyn.
Set the name servers by logging into your domain registrar account and set the name servers to the service you are using (ie, dyn.com might be something like ns123.dns.dyn.com, ns456.dns.dyn.com, etc--they will tell you.)
Then wherever your dns name servers are, you will need to point your A-record for the domain to your IP address. A DNS manager like dyn will update this for you automatically, but if you have a static IP, then set the A-record to your IP address. Don't know your IP? Your IP Address is currently: 18.104.22.168
Note, It is possible to have something like distrifile.com A record be one IP address and then a subdomain such as demo.distrifile.com be another IP address.
To reinterate, you need to make sure your domain name you are using will end up getting resolved to your public IP address.
Setup your router to foward Port 80 traffic to this computer's local IP.
So you have your domain pointed to your public IP address, now the router will need to foward all web traffic requests to the right computer. So open your router configuration screen (commonly 192.168.1.1, but could be something else depending on how you set it up).
All routers are different, but you need to find where you can do port fowarding. As you can see here in this Linksys EA3500 router, ports 80 and 443 are set to go to the PC with the IP of 22.214.171.124. This will send all http and https traffic to that computer.
Note, it would also be a good idea to either set a DHCP reservation for this computer with its current IP address, or set the computer's network properties to be a static IP; else you could end up sending the web traffic to another computer on your network upon reboots. DHCP reservation in the router is probably easier for most people.
Once you have confirmed that your new site can be accessed outside of your network, you might want to configure SSL--especially if you want to use a payment gateway for invoices within DistriFile. This used to be very expensive, but here is a guide to get a VALID and FREE certificate from a relatively new, but awesome service called LetsEncrypt. The only downside is the certificates are valid for 90 days, so you need to renew them every 90 days... its still free though!
On Linux systems, its very easy to renew. On Windows (without running IIS) it is difficult and at the time of this writing, there isn't a great application built that doesn't require many dependencies. SO, let's use a FREE and secure website to generate the certificate called ZeroSSL.
FOR THIS TO WORK, THE DOMAIN YOU CONFIGURED EARLIER MUST BE ACCESSIBLE BY THE PUBLIC!!!
The steps are easy and self-explanatory on their website.
# listen 443 ssl; # ssl on; # ssl_certificate C:\webserver\certs\domain.crt; # ssl_certificate_key C:\webserver\certs\domain.key;
Please enter your name!
That email address does not appear to be valid!
Please enter a message.
We may collect personal identification information from Users in a variety of ways, including, but not limited to, when Users visit our site, place an order, fill out a form, and in connection with other activities, services, features or resources we make available on our Site. Users may be asked for, as appropriate, name, email address, phone number. Users may, however, visit our Site anonymously. We will collect personal identification information from Users only if they voluntarily submit such information to us. Users can always refuse to supply personally identification information, except that it may prevent them from engaging in certain Site related activities.
We may collect non-personal identification information about Users whenever they interact with our Site. Non-personal identification information may include the browser name, the type of computer and technical information about Users means of connection to our Site, such as the operating system and the Internet service providers utilized and other similar information.
DistriFile may collect and use Users personal information for the following purposes:
We adopt appropriate data collection, storage and processing practices and security measures to protect against unauthorized access, alteration, disclosure or destruction of your personal information, username, password, transaction information and data stored on our Site.
We do NOT sell, trade, or rent Users personal identification information to others. We may share generic aggregated demographic information not linked to any personal identification information regarding visitors and users with our business partners, trusted affiliates and advertisers for the purposes outlined above.
By using this Site, you signify your acceptance of this policy. If you do not agree to this policy, please do not use our Site. Your continued use of the Site following the posting of changes to this policy will be deemed your acceptance of those changes.
This document was last updated on January 17, 2017