Learn about Centmin Mod LEMP Stack today
Become a Member

Nginx Discourse behind nginx

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Robust, Jun 29, 2015.

Tags:
  1. Robust

    Robust Member

    49
    2
    8
    Jun 14, 2015
    Ratings:
    +4
    Local Time:
    6:01 PM
    1.9.7
    10.1
    I can't seem to get Discourse working behind nginx. Directly it's fine, but using a proxy pass with nginx I get bad gateway and no errors logged anywhere.

    Discourse

    What kind of configuration for the vhost would work?
     
  2. eva2000

    eva2000 Administrator Staff Member

    28,935
    6,567
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,747
    Local Time:
    6:01 PM
    Nginx 1.13.x
    MariaDB 5.5
    Centmin Mod is provide as is, so short of scripted related bugs or issues, any further optimisation to the web stack components - nginx, php-fpm, mariadb mysql, csf firewall etc or web app specific configurations are left to the Centmin Mod user to deal with. So I do not provide any free support for such.

    However, Centmin Mod users are free to help each other out and ask questions or give answers on this community forum. My hopes are that this community forum evolves so that more veteran long time Centmin Mod users help new Centmin Mod users out :)

    You can start by posting the Nginx vhost you tried wrapped in CODE tags for Discourse and see if other folks have clues as well.
     
  3. Robust

    Robust Member

    49
    2
    8
    Jun 14, 2015
    Ratings:
    +4
    Local Time:
    6:01 PM
    1.9.7
    10.1
  4. KeVo

    KeVo Active Member

    178
    70
    28
    May 28, 2014
    Ratings:
    +100
    Local Time:
    3:01 AM
    1.11.x
    10.1.18
    • Like Like x 1
  5. Robust

    Robust Member

    49
    2
    8
    Jun 14, 2015
    Ratings:
    +4
    Local Time:
    6:01 PM
    1.9.7
    10.1
    @KeVo Figured it out with HTTP (no SSL)

    For SSL, I guess nginx has the public facing SSL certificate, and Discourse should have a self signed localhost certificate? Or Discourse can run on http fine?
     
  6. Robust

    Robust Member

    49
    2
    8
    Jun 14, 2015
    Ratings:
    +4
    Local Time:
    6:01 PM
    1.9.7
    10.1
    Discourse

    Really slow load time though. nginx is using SSL, Discourse is on plain HTTP.

    [​IMG]

    It took like 5 minutes to reach that result. It kept fluctuating from around 2s to 3.6s and kept bouncing around going up and down for 5 minutes and then ended up completing and giving 1.75s. Tried using multiple locations. Really slow for me too. The app itself says 162ms.
     
  7. KeVo

    KeVo Active Member

    178
    70
    28
    May 28, 2014
    Ratings:
    +100
    Local Time:
    3:01 AM
    1.11.x
    10.1.18
    Just a quick question, what are the server specs you are running this on?
     
  8. Robust

    Robust Member

    49
    2
    8
    Jun 14, 2015
    Ratings:
    +4
    Local Time:
    6:01 PM
    1.9.7
    10.1
    Linode 4GB VPS
     
  9. KeVo

    KeVo Active Member

    178
    70
    28
    May 28, 2014
    Ratings:
    +100
    Local Time:
    3:01 AM
    1.11.x
    10.1.18
    Okay, yeah. That should be enough to run Discourse, so definitely not a resource issue.

    Hmmm. This issue goes beyond my knowledge then, sorry I can't be of more help. :(