nginx and sub directory



I should first mention that I am totally new to everything related to nginx (and hosting in general).

I am trying to install XenForo on Ubuntu 12.04 with nginx and php-fpm installed. I am not getting far before I encounter problems. I've read around several threads trying to figure out what I am doing wrong but I reckon my primary problem lies within the nginx configuration. I might be missing something essential - as the general structure or something else ..

Anyway, this is my folder structure:

nginx config:

I am receiving "502 Bad Gateway" when I try to reach anything on the domain (

Urgh! What am I doing wrong here? :)

In your nginx.conf you route all php requests to the unix socket "/tmp/php.socket". The gateway error means that this socket cannot be found or cannot be used.

Since you've installed php-fpm: Find it's socket file and route to it correctly in nginx.conf. Or alternatively do not use the socket and route requests via TCP to the php-fpm localhost listener URL.
Top Bottom