Share this post

Link to post

Also interested. I'm stuck right now trying to get a site to work that is running through cloudflare > nginx > apache-php (docker) > wordpress install. If I could just axe having to run apache docker that would be great. Does nginx have builtin php support?

Share this post

Link to post

Also interested. I'm stuck right now trying to get a site to work that is running through cloudflare > nginx > apache-php (docker) > wordpress install. If I could just axe having to run apache docker that would be great. Does nginx have builtin php support?

Share this post

Link to post

Ok, so I looked through my nginx config for wordpress. For a basic install, I literally just dropped the wordpress install files into the www folder created the database in a separate mariadb container, and browsed to the wp-admin/install.php to install. That was it. Initially, I didn't have to change anything in the nginx/wordpress site config.

For reverse proxy through a separate letsencrypt/nginx container, I added the following:

In the first one, change the http://127.0.0.1:81/ to your unraid ip and nginx/wordpress http port.

The second one makes sure that wordpress serves https over the http port.

Then in the wordpress gui (accessing locally through the unraid ip and nginx port) login to the admin interface, go to settings and change the server address to your custom domain address so wordpress redirects all requests to that external address.

That was it

For pretty permalinks, I had to add this to the nginx/wordpress container's site-config:

if (!-e $request_filename) {
rewrite ^.*$ /index.php last;
}

Later on, you may want to change some settings in the php.ini for certain . Currently there is no easy way, but we have a PR in process that will make it super easy. It should be merged within a week or two.

Share this post

Link to post

If you do RP, you should use our letsencrypt container. Check the Readme to enable RP for some of the applications in your list.

Went to the LetsEncrypt support thread to read someone saying "Dont use this if all you need is to use Nginx"... which is probably all I need... Dont think I need certs. Just access to see an example FULL conf where someone has used RP.... ?

Share this post

Link to post

Went to the LetsEncrypt support thread to read someone saying "Dont use this if all you need is to use Nginx"... which is probably all I need... Dont think I need certs. Just access to see an example FULL conf where someone has used RP.... ?

This nginx image is meant to be mainly a webserver, whereas the letsencrypt one is meant for reverse proxy. It doesn't mean that you can't use nginx for reverse proxy, it's just that the default site config of the letsencrypt image has some bits that makes reverse proxy much easier.

Share this post

Link to post

This is a bit of an odd one so forgive me and i know it may sound totally mad

For years i've hosted various servers and websites on an unraid server. Its my job so i host test sites and everything else when i'm working remotely

I have a custom reverse proxy coded and working in nginx and a number of nginx backend server. This allows me to route different websites to different instances of nginx entirely. Sometimes i get stuck with older websites or those that have bugs with certain php versions and i need to change it

Right now the nginx docker ships with php 7.1.17 which is great. My question is, is there any way to change the php version without manually removing and installing a new one each load?

I was thinking perhaps a set of stable php versions all installed at the same time but with fast-cgi on different ports. You could then change the fast-cgi port used by nginx and therefore change the php version used

The most commonly selectable options i've seen are:

4.4

5.1

5.2

5.3

5.4

5.5

5.6

7.0

7.1

7.2

My idea is to use dockers instead of something like MultiPHP so everything was truely isolated. I know the idea behind it is mad and likely not usable by many but its worth a shot

Share this post

Link to post

This is a bit of an odd one so forgive me and i know it may sound totally mad

For years i've hosted various servers and websites on an unraid server. Its my job so i host test sites and everything else when i'm working remotely

I have a custom reverse proxy coded and working in nginx and a number of nginx backend server. This allows me to route different websites to different instances of nginx entirely. Sometimes i get stuck with older websites or those that have bugs with certain php versions and i need to change it

Right now the nginx docker ships with php 7.1.17 which is great. My question is, is there any way to change the php version without manually removing and installing a new one each load?

I was thinking perhaps a set of stable php versions all installed at the same time but with fast-cgi on different ports. You could then change the fast-cgi port used by nginx and therefore change the php version used

The most commonly selectable options i've seen are:

4.4

5.1

5.2

5.3

5.4

5.5

5.6

7.0

7.1

7.2

My idea is to use dockers instead of something like MultiPHP so everything was truely isolated. I know the idea behind it is mad and likely not usable by many but its worth a shot

I'm almost sure we are not going to make a container like that. We install the php packages from the alpine repo, and there aren't all the versions you want. This also feels like it might be only a very few people that would need it.

Share this post

Link to post

This is a bit of an odd one so forgive me and i know it may sound totally mad

For years i've hosted various servers and websites on an unraid server. Its my job so i host test sites and everything else when i'm working remotely

I have a custom reverse proxy coded and working in nginx and a number of nginx backend server. This allows me to route different websites to different instances of nginx entirely. Sometimes i get stuck with older websites or those that have bugs with certain php versions and i need to change it

Right now the nginx docker ships with php 7.1.17 which is great. My question is, is there any way to change the php version without manually removing and installing a new one each load?

I was thinking perhaps a set of stable php versions all installed at the same time but with fast-cgi on different ports. You could then change the fast-cgi port used by nginx and therefore change the php version used

The most commonly selectable options i've seen are:

4.4

5.1

5.2

5.3

5.4

5.5

5.6

7.0

7.1

7.2

My idea is to use dockers instead of something like MultiPHP so everything was truely isolated. I know the idea behind it is mad and likely not usable by many but its worth a shot

You can always pull the official php images (whichever version you need) and point the nginx fcgi parameter to the php container's ip address