How to assign individual ip to Multiple WordPress websites install to Bitnami NGINX SSL Stack

sudhansu nayak 20 Reputation points
2024-06-19T16:11:52.1566667+00:00

I wanted to add multiple wordpress instance to same vm So the default one is installed in 1 . /opt/bitnami/wordpress 2. I stalled a second one at /opt/bitnami/apps/wordpress2

User's image

Also i have added multiple ip to same vm. Now how do i put the settings for each wordpress to be linked to particular IP address ?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,446 questions
{count} votes

1 answer

Sort by: Most helpful
  1. vipullag-MSFT 25,606 Reputation points
    2024-06-20T04:48:42.1466667+00:00

    Hello sudhansu nayak

    Welcome to Microsoft Q&A Platform, thanks for posting your query here.

    To link each WordPress instance to a particular IP address, you need to configure the virtual hosts in the NGINX server configuration file. Here are the steps to follow:

    -Open the NGINX server configuration file for editing:

    /opt/bitnami/nginx/conf/bitnami/bitnami.conf

    -Locate the http block and add the following code to create a new virtual host for the second WordPress instance:

    http {
        ...
        server {
            listen 192.0.2.2:80;
            server_name example2.com www.example2.com;
            root /opt/bitnami/apps/wordpress2/htdocs;
            include "/opt/bitnami/apps/wordpress2/conf/nginx-app.conf";
        }
    }
    

    Replace 192.0.2.2 with the IP address you want to use for the second WordPress instance, and example2.com and www.example2.com with the domain names you want to use for the second WordPress instance.

    -Save the changes to the file and exit the editor.

    -Restart the NGINX server to apply the changes:

    Repeat the above steps to create additional virtual hosts for any other WordPress instances you have installed.

    With this, each WordPress instance should be accessible using its own IP address and domain name.

    Hope this helps.

    0 comments No comments