Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
It's really nothing special - just ensure that your root directory points to
Feel free to reopen this when you have a specific error message (check the webserver/PHP logs).
I had the same issues as OP, including the server error.
For someone who has never set up a web server or just a practice one years ago, the first step is quite steep, since there are so many differing generic instructions out, partly even contradicting each other.
I have listed some boilerplate instructions which worked for me on a minimum Ubuntu 18.04 install on a ARM system:
Install nginx, php, sqlite on minimal system
Get root, ideally with
If you are not starting from a minimal system, make sure that the firewall (
and check with
Now you can install sqlite with
When you want install just the default
The Ubuntu and Debian installation is a bastard child to accomodate both nginx and apache and forcing some defaults on nginx which come from apache. One of the signs for this is that the standard www root directory is
The files served should belong to this user. My first-level suffix for the home intranet is
Now is the time to do the edits to customize your installation. I got a sqlite error and no webpage with URL rewriting enabled, but this may have been just during my setup. Afterwards, enabled URL rewriting works well.
When you access this now with http://localhost or http://<intranet_server_name> from elsewhere, you will still see the default nginx landing page - a good sign since it shows that the web server functionality is there.
Now to configure the server and php. There are several .ini and .conf files now in your
Make sure that the last line fits your installed php version. Test with
To set the web root, do the following:
Now edit the
On reload of nginx with
Maybe these or some other bare-bones setup instructions should be linked in the docs. Looking closer, there seem to be a lot of people struggling with this in these issues.
Why do you need to disable URL rewriting?
Does not really matter, just produces ugly URLs...