Difference between revisions of "Setup:Installation Guide/System Preparation/Linux/Apache and PHP"

[quality revision][quality revision]
m
m (Text replacement - "[[en:{{PAGENAME}}]]" to "[[en:{{FULLPAGENAME}}]]")
 
icon required.png
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[edit | edit source]

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[edit | edit source]

Install Apache and PHP using the Aptitude package manager with the following steps:

apt update; \
apt install apache2 \
    libapache2-mod-php7.3 \
    php7.3 \
    php7.3-cli \
    php7.3-common \
    php7.3-curl \
    php7.3-gd \
    php7.3-intl \
    php7.3-json \
    php7.3-mbstring \
    php7.3-mysql \
    php7.3-opcache \
    php7.3-tidy \
    php7.3-xml \
    php7.3-zip; \
apt clean

Configuring PHP[edit | edit source]

After installation, configure PHP. Open php.ini with a text editor of your choice (nano, vi), which, in our Debian version, is located in the directory /etc/php/7.3/apache2.

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. File:Setup:apache vhost bluespice free.txt

Configuring Apache[edit | edit source]

Hint.jpg
In this documentation, we assume the recommended installation with ShortURL. In this case, the root directory of the web server is in /var/www/bluespice, but the actual source code of BlueSpice is in /var/www/bluespice/w. This configuration is designed accordingly.


To configure a VirtualHost for BlueSpice, please proceed as follows:

  1. Change to the directory /etc/apache2/sites-available .
  2. 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:
    1. For BlueSpice free: Media:Setup:apache_vhost_bluespice_free.txt apache_vhost_bluespice_free.txt]]
    2. For BlueSpice pro: apache_vhost_bluespice_pro.txt
  3. 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.
  4. 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. If configured correctly, Apache should respond to the request with the error message "Not found", which is completely correct at the time of installation.

Apache:Not found Setup:apache not found.png

Next step[edit | edit source]

If you have successfully completed all these steps, you can proceed to the next step " MariaDB".

{{DISPLAYTITLE:Installing  Apache and PHP}}
        
        __TOC__
        

        {{Template:Important|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==
        
        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:
        <pre>
        
        apt update; \
        
        apt install apache2 \
        
            libapache2-mod-php7.3 \
        
            php7.3 \
        
            php7.3-cli \
        
            php7.3-common \
        
            php7.3-curl \
        
            php7.3-gd \
        
            php7.3-intl \
        
            php7.3-json \
        
            php7.3-mbstring \
        
            php7.3-mysql \
        
            php7.3-opcache \
        
            php7.3-tidy \
        
            php7.3-xml \
        
            php7.3-zip; \
        
        apt clean
        </pre>
        

        ==Configuring PHP==
        
        After installation, configure PHP. Open <code>php.ini</code> with a text editor of your choice (nano, vi), which, in our  Debian version, is located in the directory <code>/etc/php/7.3/apache2</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.
        
<pre>
        
        date.timezone = Europe/Berlin
        
        max_execution_time = 600
        
        post_max_size = 128M
        
        upload_max_filesize = 128M
        </pre>
        

        Set the value for 'date.timezone' according to your own time zone.
        

        Save and exit the php.ini again.
        
            [[File:Setup:apache vhost bluespice free.txt|thumb]]
            ==Configuring Apache==
        
        {{Template:Hint|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.}}
        

        To configure a VirtualHost for BlueSpice, please proceed as follows:
        

        #Change to the directory <code>/etc/apache2/sites-available </code>.
        
        #In a text editor of your choice, open the file <code>bluespice.conf</code>, which does not yet exist, and create it. Copy the entire contents of the following file into this new configuration file:
        
        ##For BlueSpice free: [[Special:FilePath/Media:Setup:apache vhost bluespice free.txt|Media:Setup:apache_vhost_bluespice_free.txt]]
        apache_vhost_bluespice_free.txt]]
            
            ##For BlueSpice pro: [[Special:FilePath/##For BlueSpice pro: [[Media:Setup:apache vhost bluespice pro.txt| 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 <code>a2dissite 000-default</code>. Then activate the just created VirtualHost with the command <code>a2ensite bluespice</code>.
        

        Next, activate the Module Rewrite, which we configured in the <code>bluespice.conf</code>, by entering the following command: <code>a2enmod rewrite</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.
        

        [[File:Setup:apache _not _found.png |420x420px| border | Apache:Not found|frameless]]
        

        ==Next step==
        
        If you have successfully completed all these steps, you can proceed to the next step "[[Setup: Installation Guide/System Preparation/Linux/MariaDB | MariaDB]]".
        

        [[en:{{PAGENAMEFULLPAGENAME}}]]
        
        [[de:Setup:Installationsanleitung/Systemvorbereitung/Linux/Apache_und_PHP]]
(11 intermediate revisions by the same user not shown)
Line 3: Line 3:
  
 
{{Template:Important|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.}}
 
{{Template:Important|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.
Line 43: Line 44:
  
 
Save and exit the php.ini again.
 
Save and exit the php.ini again.
 
+
[[File:Setup:apache vhost bluespice free.txt|thumb]]
 
==Configuring Apache==
 
==Configuring Apache==
 
{{Template:Hint|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.}}
 
{{Template:Hint|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.}}
Line 51: Line 52:
 
#Change to the directory <code>/etc/apache2/sites-available </code>.
 
#Change to the directory <code>/etc/apache2/sites-available </code>.
 
#In a text editor of your choice, open the file <code>bluespice.conf</code>, which does not yet exist, and create it. Copy the entire contents of the following file into this new configuration file:
 
#In a text editor of your choice, open the file <code>bluespice.conf</code>, which does not yet exist, and create it. Copy the entire contents of the following file into this new configuration file:
##For BlueSpice free: [[Special:FilePath/Setup:apache vhost bluespice free.txt|Media:Setup:apache_vhost_bluespice_free.txt]] apache_vhost_bluespice_free.txt]]
+
##For BlueSpice free: [[Media:Setup:apache vhost bluespice free.txt|apache_vhost_bluespice_free.txt]]
##For BlueSpice pro: [[Special:FilePath/Setup:apache vhost bluespice pro.txt| apache_vhost_bluespice_pro.txt]]
+
##For BlueSpice pro: [[Media:Setup:apache vhost bluespice pro.txt|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.
 
#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.
 
#Save the file and close it.
Line 64: Line 65:
 
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. 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 |420x420px| border | Apache:Not found]]
+
[[File:Setup:apache_not_found.png|frameless]]
  
 
==Next step==
 
==Next step==
 
If you have successfully completed all these steps, you can proceed to the next step "[[Setup: Installation Guide/System Preparation/Linux/MariaDB | MariaDB]]".
 
If you have successfully completed all these steps, you can proceed to the next step "[[Setup: Installation Guide/System Preparation/Linux/MariaDB | MariaDB]]".
  
[[en:{{PAGENAME}}]]
+
[[en:{{FULLPAGENAME}}]]
 
[[de:Setup:Installationsanleitung/Systemvorbereitung/Linux/Apache_und_PHP]]
 
[[de:Setup:Installationsanleitung/Systemvorbereitung/Linux/Apache_und_PHP]]

Attachments

Discussions