Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Archive

Fresh install results in "502 bad gateway"

Started by Muut Archive 12 years ago · 9 replies · 1776 views
12 years ago

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.

12 years ago

How did you configure your nginx.conf file? can you post a Gist of it ??

12 years ago

Also providing as much information as possible regarding your platform, setup etc would be helpful.

12 years ago

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.

12 years ago

"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.

12 years ago

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.

12 years ago

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.

12 years ago

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.

12 years ago

OK. Reconfigured xcache and now it seems to works. Thanks very much.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1279 9 years ago
Archive · by Muut Archive, 9 years ago
2 886 9 years ago
Archive · by Muut Archive, 9 years ago
2 4015 9 years ago
Archive · by Muut Archive, 9 years ago
1 2891 9 years ago
Archive · by Muut Archive, 9 years ago
3 1075 9 years ago