No edit summary Tag: 2017 source edit |
No edit summary |
||
(13 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:Installing Apache and PHP on Linux}} | {{DISPLAYTITLE:Installing Apache and PHP on Linux}} | ||
__TOC__ | __TOC__ | ||
{{Messagebox|boxtype=important|Note text=The web server delivers your BlueSpice installation to the user's browser. Without a web server, BlueSpice cannot be used. The source code of BlueSpice is based on the scripting language "PHP". This must also be installed on your server in order to operate BlueSpice. The steps listed here are required.}} | {{Messagebox|boxtype=important|Note text=The web server delivers your BlueSpice installation to the user's browser. Without a web server, BlueSpice cannot be used. The source code of BlueSpice is based on the scripting language "PHP". This must also be installed on your server in order to operate BlueSpice. The steps listed here are required.}} | ||
==Introduction== | ==Introduction== | ||
Apache or Nginx are available as web servers under Linux. BlueSpice can theoretically also be operated with Nginx, but in this documentation only Apache is treated in detail. Of course, you can also install Nginx with the appropriate expertise and operate it according to the here documented Virtualhost configuration of Apache. | Apache or Nginx are available as web servers under Linux. BlueSpice can theoretically also be operated with Nginx, but in this documentation only Apache is treated in detail. Of course, you can also install Nginx with the appropriate expertise and operate it according to the here documented Virtualhost configuration of Apache. | ||
{{Messagebox|boxtype=note|Note text=If "User is not in the sudoers file." type "su" in the terminal and execute. Write a "sudo" in front of a command.}} | {{Messagebox|boxtype=note|Note text=If "User is not in the sudoers file." type "su" in the terminal and execute. Write a "sudo" in front of a command.}} | ||
==Installation== | ==Installation== | ||
Install Apache and PHP using the Aptitude package manager with the following steps: | Install Apache and PHP using the Aptitude package manager with the following steps: | ||
Line 29: | Line 25: | ||
php7.4-zip; \ | php7.4-zip; \ | ||
apt clean | apt clean | ||
</pre> | </pre>Depending on requirements, further PHP extensions may be necessary, e.g. for an LDAP connection. | ||
==Configuring PHP== | ==Configuring PHP== | ||
After installation, configure PHP. | After the installation has been completed, first configure PHP. First change to the directory <code>/etc/php/7.4/apache2</code> through the terminal and then execute the <code>php.ini</code> file with the command <code>nano php.ini.</code> | ||
Find the following settings and change the values accordingly. If a setting is commented out with a semicolon in front of it, please remove it | Find the following settings and change the values accordingly. If a setting is commented out with a semicolon in front of it, please remove it. | ||
<pre> | <pre> | ||
Line 48: | Line 43: | ||
Save and exit the php.ini again. | Save and exit the php.ini again. | ||
==Configuring Apache== | ==Configuring Apache== | ||
{{Messagebox|boxtype=note|Note text=In this documentation, we assume the recommended installation with [https://www.mediawiki.org/wiki/Manual:Short_URL ShortURL]. In this case, the root directory of the web server is in <code>/var/www/bluespice</code>, but the actual source code of BlueSpice is in <code>/var/www/bluespice/w</code>. This configuration is designed accordingly.}} | {{Messagebox|boxtype=note|icon=|Note text=In this documentation, we assume the recommended installation with [https://www.mediawiki.org/wiki/Manual:Short_URL ShortURL]. In this case, the root directory of the web server is in <code>/var/www/bluespice</code>, but the actual source code of BlueSpice is in <code>/var/www/bluespice/w</code>. This configuration is designed accordingly. | ||
<br> | |||
'''Multiple virtual hosts''' | |||
This guide applies to cases where BlueSpice is being installed on a dedicated server. If you have other virtual hosts configured, you may need to specify an alias for the <code>/w/</code> subfolder. Add the following to your Apache's http-specific configuration: <code>Alias /w/ /path/to/w/</code> (e.g., <code>Alias /w/ /var/www/html/example.com/w/</code>) | |||
|bgcolor=}} | |||
To configure a VirtualHost for BlueSpice, please proceed as follows: | To configure a VirtualHost for BlueSpice, please proceed as follows: | ||
Line 59: | Line 59: | ||
#Save the file and close it. | #Save the file and close it. | ||
Delete the VirtualHost created by default during the Apache installation with the command <code>a2dissite 000-default</code>. Then activate the just created VirtualHost with the command <code>a2ensite bluespice</code>. | Delete the VirtualHost created by default during the Apache installation with the command <code>a2dissite 000-default</code>. Then activate the just created VirtualHost with the command <code>a2ensite bluespice</code>. | ||
Line 75: | Line 67: | ||
Next, create the directory <code>/var/www/bluespice</code>(<code>mkdir/var/www/bluespice</code>) and restart Apache with the command <code>service apache2 restart</code>. | Next, create the directory <code>/var/www/bluespice</code>(<code>mkdir/var/www/bluespice</code>) and restart Apache with the command <code>service apache2 restart</code>. | ||
Next, call up the URL of your BlueSpice server. If configured correctly, Apache should respond to the request with the error message "Not found", which is completely correct at the time of installation. | Next, call up the URL of your BlueSpice server (localhost). If configured correctly, Apache should respond to the request with the error message "Not found", which is completely correct at the time of installation. | ||
[[File:Setup:apache_not_found.png|frameless]] | [[File:Setup:apache_not_found.png|frameless]] |
Latest revision as of 14:20, 17 May 2023
Introduction
Apache or Nginx are available as web servers under Linux. BlueSpice can theoretically also be operated with Nginx, but in this documentation only Apache is treated in detail. Of course, you can also install Nginx with the appropriate expertise and operate it according to the here documented Virtualhost configuration of Apache.
Installation
Install Apache and PHP using the Aptitude package manager with the following steps:
apt update; \ apt install apache2 \ libapache2-mod-php7.4 \ php7.4 \ php7.4-cli \ php7.4-common \ php7.4-curl \ php7.4-gd \ php7.4-intl \ php7.4-json \ php7.4-mbstring \ php7.4-mysql \ php7.4-opcache \ php7.4-tidy \ php7.4-xml \ php7.4-zip; \ apt clean
Depending on requirements, further PHP extensions may be necessary, e.g. for an LDAP connection.
Configuring PHP
After the installation has been completed, first configure PHP. First change to the directory /etc/php/7.4/apache2
through the terminal and then execute the php.ini
file with the command nano php.ini.
Find the following settings and change the values accordingly. If a setting is commented out with a semicolon in front of it, please remove it.
date.timezone = Europe/Berlin max_execution_time = 600 post_max_size = 128M upload_max_filesize = 128M
Set the value for 'date.timezone' according to your own time zone.
Save and exit the php.ini again.
Configuring Apache
To configure a VirtualHost for BlueSpice, please proceed as follows:
- Change to the directory
/etc/apache2/sites-available
. - In a text editor of your choice, open the file
bluespice.conf
, which does not yet exist, and create it. Copy the entire contents of the following file into this new configuration file:- For BlueSpice free: apache_vhost_bluespice_free.txt
- For BlueSpice pro: apache_vhost_bluespice_pro.txt
- In rows 3 and 4, replace "SERVERNAME" and "SERVERALIAS" according to your server name and domain. If the server is explicitly operated with only one VirtualHost for BlueSpice, you can also completely remove these two lines.
- Save the file and close it.
Delete the VirtualHost created by default during the Apache installation with the command a2dissite 000-default
. Then activate the just created VirtualHost with the command a2ensite bluespice
.
Next, activate the Module Rewrite, which we configured in the bluespice.conf
, by entering the following command: a2enmod rewrite
Next, create the directory /var/www/bluespice
(mkdir/var/www/bluespice
) and restart Apache with the command service apache2 restart
.
Next, call up the URL of your BlueSpice server (localhost). If configured correctly, Apache should respond to the request with the error message "Not found", which is completely correct at the time of installation.
Next step
If you have successfully completed all these steps, you can proceed to the next step " MariaDB".