Search
Items tagged with: Debian
tweaking apache configuration for friendica
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":
ctrl+X -> Y -> hit ENTER
edited 000-default-le-ssl.conf
<IfModule mod_ssl.c><VirtualHost *:443>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory /var/www/html>
AllowOverride All
</Directory>
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
ServerName mydoman.com
SSLCertificateFile /etc/letsencrypt/live/mydoman.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mydoman.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
Edited 000-default-le-ssl.conf CODE
<IfModule mod_ssl.c>
<VirtualHost *:443>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory /var/www/html>
AllowOverride All
</Directory>
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
ServerName mydoman.com
SSLCertificateFile /etc/letsencrypt/live/mydoman.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mydoman.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
create php.error.log
rootname@ubuntu:~#
touch php.error.log
tweaking basic settings:
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:
search and modify the line :
ctrl+W ->
memory_limit =
modify to:
memory_limit = 256M
search and modify the line :
ctrl+W ->
upload_max_filesize =
modify to:
upload_max_filesize = 100M
search and modify the line :
ctrl+W ->
max_execution_time =
modify to:
max_execution_time = 300
search and modify the line :
ctrl+W ->
max_input_vars =
modify to:
max_input_vars = 1500
activate php.error.log
search:
ctrl+W ->
log_errors
unquote and and modify so it reads:
log_errors = On
; Default Value: Off
; Development Value: On
; Production Value: On
search:
ctrl+W ->
error_log
unquote and and modify so it reads:
; Log errors to specified file. PHP's default behavior is to leave this value
; empty.
; https://php.net/error-log
; Example:
error_log = /var/www/html/php.error.log
; Log errors to syslog (Event Log on Windows).
; error_log = syslog
save the file "php.ini":
ctrl+X -> Y -> hit ENTER
restart apache and check the status
rootname@VPShosting:/var/www/html#
systemctl restart apache2
rootname@VPShosting:/var/www/html#
systemctl status apache2
check php.error.log
rootname@ubuntu:~#
reboot
user@localPC:~$
log into your VPShosting again
rootname@ubuntu:~#
nano /var/www/html/php.error.log
Congrats!
With this you have completed via SSH on the console all the installation steps necessary, now it's time to browse to your friendica web page and actually install and activate your node:
Go to your website and have a look at the short installation routine of friendica itself.
#debian #linux #friendica #fediVerse #fediTutorial
friendica installation
friendica installation on the VPS hosting
--
Up to this point we basically performed a standard LAMP installation on a ubuntu 22.04 LTS VPS hosting.
The following steps concern the actual friendica server installation.
creating the directory for friendica and the user www-data
creat directories and permission for user www-data
back ground information what-is-var-www-html?https://stackoverflow.com/questions/16197663/what-is-var-www-htm
some general setup indications for the settings for several websites on the same server:
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-20-04
¡IMPORTANT!
The following command and setting should only be used if you are on a clean brand new ubuntu VPS setup as it will or at least might meddle with your already existing web page setups as @tom s politely pointed out:
"This would damage a lot of (server) installations out there. Do not do this in /var/www, if you are not really sure, what you're doing."
rootname@VPShosting:~#
sudo chown -R www-data:www-data /var/www
rootname@VPShosting:~#
cd /var/www
creating user www-data and changing from user rootname to www-data
rootname@VPShosting:~/var/www#
sudo -u www-data bash
www-data@VPShosting:~$
(confirmation check if this is where console changes to www-data@VPShosting:~#)
moving (deactivating) the old /html folder
www-data@VPShosting:~$
mv html html.bak
The new /html folder will be created when we clone the gitHub stable branch of friendica in the next step.
cloning friendica from the gitHub repository
www-data@VPShosting:~$
git clone https://github.com/friendica/friendica.git -b stable html
configure PHP dependencies
www-data@VPShosting:~$
cd html
www-data@VPShosting:~/html$
bin/composer.phar install --no-dev
(is this the point the SSL install went wrong?)
https://squeet.me/display/962c3e10-1265-2ea9-912d-3cc762780991
creating folder for page view renderings
www-data@VPShosting:~/html$
mkdir -p view/smarty3
www-data@VPShosting:~/html$
chmod 775 view/smarty3
cloning the addons github repository
www-data@VPShosting:~/html$
git clone https://github.com/friendica/friendica-addons.git -b stable addon
activating .htaccess
www-data@VPShosting:~/html$
cp .htaccess-dist .htaccess
exiting user www-data
www-data@VPShosting:~/html$
exit
rootname@VPShosting:~/var/www/html#
#debian #linux #friendica #fediVerse #fediTutorial
Creating several friendica instances and other websites as sub/domains on one VPS with one IP
@Tutorial
@Friendica Developers and @Friendica Admins.
#howTo change a single #friendica domain #debian #ubuntu 2022.04lts VPS #hosting setup into a single IP multi domain VPS server.
This tutorial builds on the install and/or move friendica to ubuntu 22.04 LTS VPS server howTo with the intention to change the main setup into a domain name-based virtual hosting.
The folder name in the VPS folder structure in
/var/www/
for the domains can be choosen as you like, for example:/var/www/domaincom/
All apache tutorials found in a quick search do choose the domain or subdomain name including the respective dot's like this:/var/www/domain.com/
Both options are possible for a correct working environment.
@Ⓜ3️⃣3️⃣ 🌌 pointed out that for automatization scripts it's usefull to keep that consistent and there for to use FQDN (Fully Qualified Domain Name) as part of the path.
Never the less, to keep the concepts of domain URL's and folder names seperate and to prevent the notion that the domain name syntax is mandatory we will stick with simple folder names in this #tutorial.
The naming of the
.conf
files in /etc/apache2/sites-available/
refer to the actual domain names and their settings. Even tho these .conf file names also could be chosen probably at will, as the definitions about the actual domains refereed are given inside those files, we'll stick to the real sub/domain names in this case as it's quite reasonable and logical to do so.We will address the details for a step by step change from a single VPS single IP domain hosting to a multiple name-based single IP virtual hosting in answers to this topic:
- Inicial VPS domain hosting served at:
/var/www/html/
- Name-based virtual hosting domain VPS where several domains are served by one IP, leaving /html in place if a client request doesn’t match any other sites, like proposed in this digitalOcean tutorial:
/var/www/html/
as fall back option/var/www/domaincom/index.html
/var/www/subdomaincom/index.html
/var/www/domainorg/
original friendica installation/var/www/subdomainorg/index.html
Any comments hints and observations are really appreciated!
#admin #fediAdmin
Can't seem to satisfy some of the PHP library requirements, namely IntlChar, IDN, OpenSSL. I read somewhere that installing openssl covers PHP libraries for same. Is this true? What about IntlChar and OpenSSL? Does php-intl cover IntlChar?
Ver. 05 | install and/or move friendica to ubuntu 22.04 LTS VPS server
EDIT - information
This tutorial is supposed to be published by the tutorial profile of this server.It is designed to have several chapters, each being distinctively seperated by an own titel. In total as of now there are like besides this introduction like 6 chapters.
posting and edition time of and by this EDIT profileof ver05 as of now 1hs
mastodon review contact: @mʕ•ﻌ•ʔm bitPickup
Categories:
@helpers@forum.friendi.ca
SPOILER - click to open/close || Introduction
This tutorial is an adaption of the tutorial "creating a friendica server - ubuntu" by @Hank G ☑️ based on the experience of the installation report by @…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup:https://squeet.me/display/962c3e10-5765-2e86-4a15-589579746174
and specific help by @Raroun.
Server specs and friendica version used:
VPS server | Ubuntu 22.04 LTS
PHP Version 8.1.2-1ubuntu2.14
4 Core CPU, 8 GB Ram with 300GB NVME Disk
Friendica [STABLE] | 'Giant Rhubarb' 2023.05 - 1518
SPOILER - click to open/close || Installation environment and HowTo
The only reasonable way to work with a VPSserver on the web is using the console.If you are not familiar with that don't worry, it is easy and the only thing you have to do is being able to copy/paste the commands displayed:
¡
Copy/paste only the codeBoxes like this one
, located outside of the spoilers of this tutorial one after another without altering the sequence!Of course it is necessary to change the specific file names and passwords for you indiviual site, but that's all. promise!
On the console you wont be able to copy/paste with the keyboard ctrl-C/ctrl-V technique, you'll have to use the mouse "right click, chose option" technique.
This tutorial was created on a #debian #linux desktop environment.
There shouldn't be differences if you want to do this from a #windows machine.
The method used for communication between your local computer and the VPS server is called #SSH:
Wikipedia - Secure Shell:
"Cryptographic network protocol for secure data communication, remote shell services or command execution and other secure network services between two networked computers."
#linux #debian #ubuntu #friendica #fediVerse #fediTutorial #tutorial #fediHelp #fediTips #activityPub #HowTo #DIY #VPS #server #selfHosting
@admin@tupambae.org @tutorial@tupambae.org
Friendica auf dem Raspberry Pi installieren
Nicht nur für mich als kleine Gedankenstütze halte ich hier auf meinem Blog fest, wie ich es endlich geschafft habe, Friendica auf dem Raspberry Pi zu installieren. Nun bin ich selbst überhaupt kein Experte in solchen Dingen, man möge es mir nachsehen, falls ich einen Fehler gemacht oder etwas doppelt geschrieben habe. Ich bin auch noch nicht so lange im Fediverse unterwegs und bei Linux […]
Weiterlesen: https://blogzwo.me/raspberry-pi/friendica-auf-dem-raspberry-pi-installieren.html
#Debian #Fediverse #Friendica #Linux #PHP #Raspberry
Friendica auf dem Raspberry Pi installieren - Blog:Zwo.me
Friendica auf dem Raspberry Pi installieren: Eine einfache Schritt-für-Schritt-Anleitung, um das Fediverse auf dem kleinen Rechner zu nutzen.Jools (Blog:Zwo)