devstrend
By:
devstrend

502 Bad Gateway nginx/1.4.6 (Ubuntu)

October 29, 2014 19.1k views

Hi,
I am using LEMP server with ubontu. I am new on nginx. I had folled all advice and tutorial and able to run info.php file in my server. check here http://104.131.73.38:8080/info.php
But when I had uploaded Joomla 3.2.x on my server its saying 502 Bad Gateway nginx/1.4.6 (Ubuntu) . I am really very confused. I had tried all solution I found by google but did not got success. Here is the error log

upstream sent invalid status "0 Folder does not exist and cannot be created: /home/codemela/www/demo/joomla/zollyness/cache/mod_news_show_sp2/nssp2_thumbs/282" while reading response header from upstream, client: 190.235.316.254, server: , request: "GET /demo/joomla/zollyness/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "104.131.73.38:8080"

Another issue. I had connected my domain and there its running on examplesite.com:8080 but when browsing www.examplesite.com or examplesite.com its comming with a port. Why?

Really I need solution. Any one can help me ?
Thanks

5 Answers

Are you sure that the user (probably www-data, given that you're using the default php5-fpm-socket) has write access to those folders?

I'm not sure what you're asking about in the last question, maybe port_in_redirect is what you're looking for?

  • Hi,
    Thank you for your reply. I had tried with permission and all ok. I had done same thing on my other server before.
    I did not found any solution for 502 Bad Gateway. Written access for whois folder ? Here is my permission details.
    drwxr-xr-x 4 user1 user1 4096 Oct 29 02:14 .
    drwxr-xr-x 3 root root 4096 Oct 14 10:37 ..
    -rw------- 1 user1 user1 5282 Oct 31 15:19 .bashhistory
    -rw-r--r-- 1 user1 user1 220 Oct 14 10:37 .bash
    logout
    -rw-r--r-- 1 user1 user1 3637 Oct 14 10:37 .bashrc
    drwx------ 2 user1 user1 4096 Oct 14 10:42 .cache
    -rw-rw-r-- 1 user1 user1 0 Oct 14 10:42 .cloud-locale-test.skip
    -rw------- 1 root root 77 Oct 29 00:33 .nano_history
    -rw-r--r-- 1 user1 user1 675 Oct 14 10:37 .profile
    -rw------- 1 root root 772 Oct 29 02:14 .viminfo
    drwxrwxr-x 3 user1 www-data 4096 Oct 26 18:35 www

    For my last question I had asked that my site coming like example.com:8080 on this address , If I try without port like example.com or with www like www.example.com then site is not coming. Only coming for example.com:8080 mean with port site is coming. Is that clear now? Please advice
    Thanks

  • Not really, but post your Nginx configuration as well. Hard to see what you're trying to achieve without it.

Not really, but post your Nginx configuration as well. Hard to see what you're trying to achieve without it.

**

First Header Second Header
Content Cell Content Cell
Content Cell Content Cell

**

Have another answer? Share your knowledge.