Processwire package config - how to make nginx and Apache play nicely together

Hi @wbk

Thank you for your detailed response! :smile:

tl:dr replyā€¦

I will try this and report back here :point_down:

wbk:
Thereā€™s a post on stackoverflow from some five years ago, suggesting to set session.auto_start = false in the php.ini file.

Follow up questions

  1. Are you saying Yunohost uses nginx as a reverse proxy for all apps?

  2. And does presence of an nginx-config file always mean nginx is running as a reverse proxy?

  3. Does apache2 get packaged within the Yunohost Processwire app?

  4. Is nginx acting as a reverse proxy AND webserver for the Yunohost Processwire app (and/or any other app)?

  5. How else is nginx interacting with the Processwire package?


My full comments belowā€¦

wbk:
I was under the impression that Processwire was installed as a Yunohost app, and thought to see if it gives default credentials while installing.

The issue Iā€™m referring to happens both ways of installing

  • via the Yunohost Processwire app package, and
  • installing it via My Web App.

I have tested both ways, and documented these tests here and on the Yunohost app package GitHub issues here (both issues listed are relevant).

First, both installing the Yunohost Processwire app and installing via MyWebApp result in an nginx error screen.

After a lot of trial and error with nginx settings, I got the Processwire admin login to appear. But it is not accepting the default admin login credentials.

wbk:
Did you also have a look at logs? What happens there?

There are no errors in the log because, according to Yunohost, Processwire installs successfully.

wbk:
There is no error, it just does not log in?

Yes, correct.

wbk:
I think it is not necessary to @call other users on the forum.

Good tip, I appreciate it. :pray:

wbk:
On the Processwire-forums someone seems to have somewhat similar(?) problems, and has the Processwire-part resolved in the end.

You might be referring to me on the Processwire forum. :laughing: I am one of those people posting about the issue on the Processwire forum. Only part of the issue is resolved.

On the Processwire forum there is a lot of debate over a decade about how to actually get Processwire to work using both Apache and nginx. In practise it is a lot harder than the documentation suggests. I see over the years most people - except the most advanced Processwire users - abandon trying to use Processwire with nginx.

But I love Yunohost, and I love Processwire. So I am keen to find a way to make them play nice together.

wbk:
Thereā€™s a post on stackoverflow from some five years ago, suggesting to set session.auto_start = false in the php.ini file.

Good tip, I donā€™t think Iā€™ve tried this yet. Thank you.

nqo:
is Yunohost is using nginx as a proxy to the Processwire package?

wbk:
nginx is not used especially for Processwire as a reverse proxy. If you have a look in ls /etc/nginx/conf.d of your Yunohost, youā€™ll see that there is an nginx-config for each of the installed applications."

  1. Are you saying Yunohost uses nginx as a reverse proxy for all apps?

  2. And does presence of an nginx-config file always mean nginx is running as a reverse proxy?

Nqo:
is the Processwire app itself is being served by apache2?"

Wbk:
Not per se, but it is the preferred web server by the Processwire-folks.

See above re Processwire functioning. Iā€™m asking for Yunohost-context information.

Perhaps I need to ask a more specific question:

3. Does apache2 get packaged within the Yunohost Processwire app?

I have some basic LAMP stack experience, but no knowledge of packaging apps (yet!).

Nqo:
if not, how does the nginx in yunohost work?

wbk:
I donā€™t understand the question.

Some more specific questions might help :crossed_fingers: ā€¦

  1. Is nginx acting as a reverse proxy AND webserver for the Yunohost Processwire app (and/or other Yunohost apps generally)?

  2. How else is nginx interacting with the Processwire package?

Iā€™m asking for specifics about how Yunohost uses nginx in a more detailed way than is available in the documentation.

This is for diagnostic purposes. Ericg has kindly packaged Processwire. He said he ā€œhas no ideaā€ how to fix this known login issue. I am very motivated to attempt to find a solution. I have the time.

Perhaps the answer Iā€™m looking for seems too obvious to you, but no matter how simple, it could be valuable information to me. So please feel free to share ideas/thoughts/random guesses - nothing is too small or simple, and what you offer may be just what I need!

I hope this makes sense, and someone can share their insight.