Just did a fresh install from the zip package. I do have a nginx gatekeeper, but it is configured correctly. Other CMSs in the same location (i.e. next to grav root folder) work fine. Currently I am stuck.
How did you configure your nginx.conf
file? can you post a Gist of it ??
Also providing as much information as possible regarding your platform, setup etc would be helpful.
FYI bad gateway generally means that Nginx can’t connect to the PHP process (Usually FPM). Do you have all that installed and configured correctly?
Nginx is a more advanced topic than Apache, and will require some more advanced knowledge to get it working. This is not a Grav-specific issue, just the nature of Nginx in general.
"bad gateway generally means that Nginx can’t connect to the PHP process ", but in this setup Pico, CMSimple and other PHP-based CMSs work flawlessly, so the issue is more subtle.
My setup: the (debian/proxmox) virtualization server DNAT’s to an nginx gatekeeper which proxy’s to a LAMP webserver which serves a number of domains (https://gist.github.com/Pumpapa/b5a909c802d5cbfdb816). In this test I unpacked a number of flat file CMSs next to each other, and Grav, which I thought looked very attractive, didn’t work out of the box.
Oh actually. Your proxying to a lamp server? So Apache is handling the php? Do you have mod_rewrite
and mod_headers
enabled? Those are required but usually enabled by default. also what version of PHP? grav needs 5.4.
Btw are u able to test direct to the LAMP without the nginx proxy? that might help narrow down the issue. Thanks.
I use 5.4.34; I cannot test directly in the lamp server without reconfiguring stuff.
Mod_headers was off, and is now enabled. Now I get a error trace: 11. Whoops\Exception\ErrorException
…/vendor/doctrine/cache/lib/Doctrine/Common/Cache/XcacheCache. php:48.
This is more than before, so I will look into it further when I find the time. Thanks.
Ok, getting somewhere. By default Grav has a setting of auto
for its cache provider detection. So it seems you have the xcache
extension loaded by your php.ini
however, it probably is misconfigured and is not working properly.
Really you should probably test/fix your xcache installation, or use another such as APC. But in the meantime, you can switch to file caching. It’s not as fast as memory based solution such as APC or Xcache, but it’s still pretty fast.
OK. Reconfigured xcache and now it seems to works. Thanks very much.
Great!