Skip to main content


Creating several friendica instances as domains and/or subdomains on one VPS with one IP


in reply to TupambAdminOrg [2024.03]

in reply to TupambAdminOrg [2024.03]

This entry was edited (2 weeks ago)
in reply to TupambAdminOrg [2024.03]

in reply to TupambAdminOrg [2024.03]

TL;DR 😉

Are both options possible or does the system, for a correct working environment, need the dot in the folder structure?

At some point you will eventually write automatization scripts, so you may want to keep that consistent and use FQDN as part of the path, so dots.

in reply to Ⓜ3️⃣3️⃣ 🌌

FQDN = Fully Qualified Domain Name

> so you may want to keep that consistent

I guess that means means for internal coherence and understanding of eventual scripts (?).

At the same time I guess your answer means that there is no problem by the simplified syntax choosen for the folder name.

WHat about the .conf name, is that nameing related to the URL domain name or does the sistem read the content of the .conf file and the naming is irrelevant for the funcioning?

> TL;DR 😉
I know, that's in part why it's called v.01. This is completely new for my mind so it has to "write it out loud extensively" to create understanding for itself. The idea is to shred it down later on into simple copy/paste instructions, internalizing the content by doing so.
👍

in reply to utopiArte

Actually the following howTo doesn't really clarify the question about the .conf name, as the place holder your_domain is used two times, in the .conf name and inside the file itself. Anyway doesn't look like the .conf name has to be the domain name but that it's more than reasonable to use it anyway.

https://www.digitalocean.com/community/tutorials/how-to-configure-the-apache-web-server-on-an-ubuntu-or-debian-vps
Within your virtual host file, you can add a ServerName directive that specifies the domain name or IP address that this request should handle. This is the option that would add specificity to the virtual host, allowing it to override the default definition if it matches the ServerName value.

Run the following command to open your virtual host file, making sure to replace the your_domain variable with your actual domain name:

sudo nano /etc/apache2/sites-available/your_domain.conf

Append your_domain to the ServerName directive:
/etc/apache2/sites-available/your_domain.conf


ServerName your_domain


in reply to utopiArte

in reply to TupambAdminOrg [2024.03]

cp -R /var/www/html/ /var/www/domainorg/

rootname@VPShosting:~# cp -R /var/www/html /var/www/domainorg

All subfolders and files are owned by root, so their ownership has to be changed to www-data:
rootname@VPShosting:~# chown -R www-data:www-data /var/www/domainorg/
rootname@VPShosting:~# chown root:root /var/www/domainorg

This entry was edited (2 weeks ago)
in reply to utopiArte

Check specific settings changed for the single domain setup and how to define/transport those for the specific domain:
https://tupambae.org/display/0ac89072-2065-5da3-1ad7-ba3116437727

Allow overrides so dynamic pages can built correctly
rootname@VPShosting:/var/www/html# sudo nano /etc/apache2/sites-available/000-default-le-ssl.conf
search for the line:
ctrl+W -> DocumentRoot /var/www/html
add the code snippet:
    <Directory /var/www/html>
        AllowOverride All
    </Directory>

save the file "000-default-le-ssl.conf"

Where is the php version used for the specific domain defined?
Is it possible to define the use of different PHP versions for different domains and if so how?

editing php.ini
rootname@VPShosting:/var/www/html# sudo nano /etc/php/8.1/apache2/php.ini
search for the following lines [ctrl+w] and modify the values:
..
in reply to utopiArte

Allow overrides so dynamic pages can built correctly
This was the original setting as a single domain server:
rootname@VPShosting:/var/www/html# sudo nano /etc/apache2/sites-available/000-default-le-ssl.conf
search for the line:
ctrl+W -> DocumentRoot /var/www/html
add the code snippet:

    <Directory /var/www/html>
        AllowOverride All
    </Directory>

Main question and most likely correct is now if it's possible to add this command to the domain.org.conf file:
rootname@VPShosting:~# nano /etc/apache2/sites-available/domain.org.conf

<VirtualHost *:80>
ServerAdmin badmin@domain.org
ServerName domain.org
DocumentRoot /var/www/domainorg
<Directory /var/www/domainorg>
AllowOverride All
</Directory>
DirectoryIndex index.html
ErrorLog ${APACHE_LOG_DIR}/domainorg_error.log
CustomLog ${APACHE_LOG_DIR}/domainorg_access.log combined
</VirtualHost>
This entry was edited (2 weeks ago)
in reply to TupambAdminOrg [2024.03]

in reply to utopiArte

This entry was edited (2 weeks ago)
in reply to utopiArte

This entry was edited (2 weeks ago)

Lo, thar be cookies on this site to keep track of your login. By clicking 'okay', you are CONSENTING to this.