How to have 5 independent WordPress installations virtual hosts on one instance not multisite

Keywords: WordPress + NGINX + SSL - AWS - How to - Application configuration

Description:
Hi,

A little while ago there was a major update in the NGINX WORDPRESS SSL stack.

File paths were changed (approach A or B) and MariaDB was implemented among other changes.

I am running an older version 5.6.2 and since the approach A or B update my previously written script to update or more kill and restart a new instance is now pretty much useless.

To my understanding when I first tried these paths will not work anymore:

/opt/bitnami/apps/WEBSITENAME/conf/nginx-prefix.conf
/opt/bitnami/apps/WEBSITENAME/conf/nginx-app.conf
/opt/bitnami/nginx/conf/bitnami/bitnami-apps-prefix.conf
/opt/bitnami/apps/WEBSITENAME/conf/nginx-vhosts.conf
/opt/bitnami/nginx/conf/bitnami/bitnami-apps-vhosts.conf

How do I create 5 independent WordPress installations virtual hosts on a single instance without multisite?

Hi @AbsoluGroupe,

You need to follow this guide

https://docs.bitnami.com/aws/apps/wordpress-pro/administration/create-custom-application-php/

However, if you deploy the WordPress + NGINX + SSL solution, you already have a configuration file to serve the WordPress files in the server_blocks directory. You will need to add “location” blocks to serve the other WordPress applications.

Going through all the configuration files in approach A In previous configuration in /opt/bitnami/apps/wordpress/conf/nginx-app.conf these commands are not in any configuration file:

if ($request_uri !~ "^/phpmyadmin.*$")
{
  set $test  A;
}
if ($request_uri !~ "^/bitnami.*$")
{
  set $test  "${test}B";
}
if (!-e $request_filename)
{
  set $test  "${test}C";
}
if ($test = ABC) {
  rewrite ^/(.+)$ /index.php?q=$1 last;
}

# Deny access to any files with a .php extension in the uploads directory
location ~* /(?:uploads|files)/.*\.php$ {
  deny all;
}

Also in /opt/bitnami/nginx/conf/bitnami/php-fpm.conf

fastcgi_split_path_info ^(.+\.php)(/.+)$;

is missing.

Are these omissions done on purpose as denying php extension files in the uploads directory makes sense. The other stuff seems like the approach A or B test. And in php-fpm.conf that line seemed to be important before.

Hi @AbsoluGroupe,

The phpmyadmin configuration is now in a different file (/opt/bitnami/nginx/conf/bitnami/phpmyadmin.conf) and we do not have a guide to configure multiple WordPress the way you want. We suggest you create different subdomains for each site. If you do not want that, you will need to create different location blocks to serve your other WordPress’ sites.

Hi,

I’m referring to missing commands in specific files in the new stack compared to older stack and you answer with the location of a completely different file phpmyadmin.conf

I figured out how to have multiple WordPress sites on the same stack never hinted that I didn’t.

It’s just that the above mentioned commands seemed to be important before and now they are not there anymore. That is my question.

Read it again and please advise.

Hi @AbsoluGroupe,

The previous configuration was different and that if/else block was needed separate the WordPress configuration from the other things that were served by NGINX. The new configuration has separate configuration for each application and that’s why those if blocks are not needed. The same happens with the fastcgi_split_path_info parameter

Regarding the location block

# Deny access to any files with a .php extension in the uploads directory
location ~* /(?:uploads|files)/.*\.php$ {
  deny all;
}

You can add it to the wordpress configuration files in the server_blocks folder to increase the security. I’ll open a task on our side to review that configuration and add it by default to the solution as well.

Hi,

I will add the missing location block in the server_blocks folder.

Where can I find the up to date changelog for the WordPress with NGINX and SSL Certified by Bitnami and Automattic stack?

Please advise.

Hi @AbsoluGroupe,

We do not have it published anywhere and it seems AWS doesn’t list the components the solution includes as others do. Why are you looking for the changelog? I can give you the components it includes if you want to know that

Hi,

Since Bitnami does not have an update process (supposedly after inquiring zeros and ones drift !!!), having an up to date changelog permits making the decision as when to delete the stack and rebuild it.

As an owner of several small businesses that for now keeps operation costs as low as possible unlike Bitnami we have better things to do than change stacks from approach A to B for no apparent reason other than create job security for support requests, make users scripts useless and as mentioned in this ticket the stacks less secure. Basically as a user it’s all negative.

After digging extensively the best I found was this https://bitnami.com/stack/wordpress-pro/installer/changelog.txt but it doesn’t seem up to date since I receive emails from AWS marketplace that do not reflect what I see in the changelog. Perhaps Bitnami staff is too busy replying to support tickets caused by the useless approach A to approach B migration of the stacks to update the changelog.

Hi @AbsoluGroupe,

We provide this information to AWS and you should be receiving emails when a new version is published in the Marketplace. Other marketplaces show the components that are included in the solution

https://console.cloud.google.com/marketplace/product/bitnami-launchpad/wordpresspro

There is a reason, we made this change because we wanted our VMs to have the same directory structure than our containers and charts. As you may know, we are deprecating the installers so we wanted all our solutions to have the same directory structure.

The email you receive from AWS is the one you need to pay attention to. The changelog file you found in bitnami.com is for our installers and they are not supported anymore.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.