Dette viser forskellene mellem den valgte og den nuværende udgave af dokumentet. Gul er linjer der findes i den gamle udgave, og grøn er linjer der findes i den nuværende.
| Begge sider forrige revision Forrige revision Næste revision | Forrige revision | ||
|
webserver_with_apache_php [2026/07/13 02:32] 216.73.216.243 gammel revision gendannet (2026/05/28 22:45) |
webserver_with_apache_php [2026/07/13 02:43] (nuværende) 216.73.216.243 gammel revision gendannet (2021/01/12 19:01) |
||
|---|---|---|---|
| Linje 1: | Linje 1: | ||
| - | === Apache & PHP === | ||
| - | Add Ondrej repos for Apache & PHP | ||
| - | < | ||
| - | add-apt-repository ppa: | ||
| - | add-apt-repository ppa: | ||
| - | </ | ||
| - | Install Apache & PHP | ||
| < | < | ||
| - | apt install apache2 | + | apt install apache2 php7.4-cli php7.4-curl php7.4-gd php7.4-intl php7.4-mbstring php7.4-opcache php7.4-soap php7.4-xmlrpc php7.4-common php7.4-fpm php7.4-imap php7.4-json php7.4-mysql php7.4-readline php7.4-xml php7.4-zip |
| </ | </ | ||
| - | |||
| - | Enable some modules | ||
| - | < | ||
| - | a2enmod proxy_fcgi setenvif md headers http2 ssl | ||
| - | </ | ||
| - | |||
| - | === IonCube === | ||
| - | Download & install IonCube https:// | ||
| - | < | ||
| - | wget https:// | ||
| - | tar -C /usr/local -xf ioncube_loaders_lin_x86-64.tar.gz | ||
| - | </ | ||
| - | |||
| - | Create file ''/ | ||
| - | < | ||
| - | zend_extension = / | ||
| - | </ | ||
| - | |||
| - | Create links to this file | ||
| - | < | ||
| - | ln -s / | ||
| - | ln -s / | ||
| - | </ | ||
| - | |||
| - | |||
| - | === PHP Configuration === | ||
| - | Create web home directory with '' | ||
| - | |||
| - | Create file ''/ | ||
| - | < | ||
| - | [user_hostinggl] | ||
| - | listen = "/ | ||
| - | listen.owner = " | ||
| - | listen.group = " | ||
| - | listen.mode = 0660 | ||
| - | user = " | ||
| - | group = " | ||
| - | pm = ondemand | ||
| - | pm.max_children = 25 | ||
| - | pm.process_idle_timeout = 15 | ||
| - | slowlog = "/ | ||
| - | php_admin_value[error_log] = "/ | ||
| - | php_admin_flag[log_errors] = on | ||
| - | php_admin_value[sys_temp_dir] = "/ | ||
| - | php_admin_value[upload_tmp_dir] = "/ | ||
| - | php_admin_value[max_input_vars] = 10000 | ||
| - | php_value[session.save_handler] = files | ||
| - | php_value[session.save_path] = "/ | ||
| - | env[TMPDIR] = "/ | ||
| - | catch_workers_output = yes | ||
| - | </ | ||
| - | |||
| - | |||
| - | === Apache Configuration === | ||
| - | Add these 2 lines to ''/ | ||
| - | < | ||
| - | # Set the location of the SSL OCSP Stapling Cache | ||
| - | | ||
| - | </ | ||
| - | |||
| - | Add ''/ | ||
| - | < | ||
| - | # Baseline setting to Include for SSL sites | ||
| - | |||
| - | SSLEngine on | ||
| - | |||
| - | # Intermediate configuration, | ||
| - | SSLProtocol | ||
| - | SSLCipherSuite | ||
| - | SSLHonorCipherOrder | ||
| - | SSLCompression | ||
| - | |||
| - | SSLOptions +StrictRequire | ||
| - | |||
| - | # Add vhost name to log entries: | ||
| - | #LogFormat "%h %l %u %t \" | ||
| - | #LogFormat "%v %h %l %u %t \" | ||
| - | |||
| - | #CustomLog / | ||
| - | #LogLevel warn | ||
| - | #ErrorLog / | ||
| - | |||
| - | # Always ensure Cookies have " | ||
| - | #Header edit Set-Cookie (? | ||
| - | |||
| - | # HSTS | ||
| - | Header always set Strict-Transport-Security " | ||
| - | Header always set X-Frame-Options DENY | ||
| - | |||
| - | # OCSP | ||
| - | SSLUseStapling on | ||
| - | SSLStaplingResponseMaxAge 1800 | ||
| - | SSLStaplingResponderTimeout 5 | ||
| - | SSLStaplingReturnResponderErrors off | ||
| - | </ | ||
| - | |||
| - | < | ||
| - | </ | ||
| - | |||
| - | |||
| - | |||
| - | Example of config file for a host | ||
| - | < | ||
| - | < | ||
| - | ServerName hosting.gl | ||
| - | ServerAlias www.hosting.gl | ||
| - | DocumentRoot / | ||
| - | ServerAdmin webmaster@hosting.gl | ||
| - | UseCanonicalName On | ||
| - | CustomLog / | ||
| - | |||
| - | < | ||
| - | Options FollowSymLinks | ||
| - | AllowOverride All | ||
| - | Require all granted | ||
| - | </ | ||
| - | |||
| - | < | ||
| - | < | ||
| - | SetHandler proxy: | ||
| - | </ | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | MDomain hosting.gl | ||
| - | |||
| - | < | ||
| - | ServerName hosting.gl | ||
| - | ServerAlias www.hosting.gl | ||
| - | DocumentRoot / | ||
| - | ServerAdmin webmaster@hosting.gl | ||
| - | UseCanonicalName On | ||
| - | CustomLog / | ||
| - | |||
| - | < | ||
| - | Options FollowSymLinks | ||
| - | AllowOverride All | ||
| - | Require all granted | ||
| - | </ | ||
| - | |||
| - | < | ||
| - | Include / | ||
| - | </ | ||
| - | |||
| - | < | ||
| - | < | ||
| - | SetHandler proxy: | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | < | ||
| - | RequestHeader set X-HTTPS 1 | ||
| - | </ | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | < | ||
| - | </ | ||
| - | |||
| - | |||
| - | |||
| - | |||