Giter Club home page Giter Club logo

Comments (6)

lcrilly avatar lcrilly commented on July 17, 2024

Check the nginx and Unit logs to see where that 503 is coming from.

Your nginx configuration is confusing and ambiguous, with root and location / in the server{} block. How does nginx know which URIs to serve locally, and which ones to proxy to Unit?

I'd recommend to keep nginx as the HTTP/2 front-end and have Unit take care of all the Wordpress parts. Remove the root directive and follow https://unit.nginx.org/howto/wordpress/

from unit.

wp-coin avatar wp-coin commented on July 17, 2024

thanks for the info, Unit docs doesn't say much about nginx configuration settings and I don't know much about configuring that.

from unit.

lcrilly avatar lcrilly commented on July 17, 2024

Then get it working with Unit and then add NGINX in front for the jobs you need it to do. Unit has no dependency on NGINX and other reverse proxies are available :)

from unit.

wp-coin avatar wp-coin commented on July 17, 2024

ok, are the settings on this script wrong? https://gist.github.com/nginx-gists/bdc7da70b124c4f3e472970c7826cccc

the current configs does not seem to be working

from unit.

wp-coin avatar wp-coin commented on July 17, 2024

sorry for the bother, I got half of it working, how do I get my unit php server listening on 127.0.0.1:8080 to stream content to nginx via reverse proxy?

currently, nginx is showing the www/html/default.html page

my root is: "root": "var/www/mywebsite.org"

/conf.d/default.conf

server {
    listen 80;
    server_name example.com;

    location / {
        return 301 https://$host$request_uri;
    }
}

server {
    listen 443 ssl;
    server_name example.com;

    # SSL configuration
    ssl_certificate /path/to/certificate.crt;
    ssl_certificate_key /path/to/certificate.key;

    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

from unit.

lcrilly avatar lcrilly commented on July 17, 2024

I already linked to the official Unit documentation for Wordpress. As you have already engaged 3 different members of the Unit team here and in the Gist comments, I will convert this issue to a discussion and encourage you to use that as the preferred channel for assistance.

from unit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.