feat: improve apache configuration (#1784)
- merge php config in apache config - remove deprecated php config - remove old apache config - use dedicated log files for libretime vhost - change template variables format BREAKING: The apache configuration file has been updated and renamed. You must remove the old configuration files `/etc/apache2/sites-available/airtime*` file from the system. BREAKING: The php configuration file has been merged in the apache configuration. You need to remove the `/etc/php/*/apache2/conf.d/airtime.ini` file from the system.
This commit is contained in:
parent
7865683f53
commit
95a7411c0c
6 changed files with 82 additions and 186 deletions
|
@ -1,48 +0,0 @@
|
|||
WEB_PORT_LISTEN
|
||||
|
||||
<VirtualHost *:WEB_PORT>
|
||||
ServerAdmin foo@bar.org
|
||||
DocumentRoot WEB_ROOT
|
||||
php_admin_value upload_tmp_dir /tmp
|
||||
php_value post_max_size 500M
|
||||
php_value upload_max_filesize 500M
|
||||
php_value request_order "GPC"
|
||||
php_value session.gc_probability 0
|
||||
php_value session.auto_start 0
|
||||
|
||||
AddOutputFilterByType DEFLATE text/plain
|
||||
AddOutputFilterByType DEFLATE text/html
|
||||
AddOutputFilterByType DEFLATE text/xml
|
||||
AddOutputFilterByType DEFLATE text/css
|
||||
AddOutputFilterByType DEFLATE application/xml
|
||||
AddOutputFilterByType DEFLATE application/xhtml+xml
|
||||
AddOutputFilterByType DEFLATE application/rss+xml
|
||||
AddOutputFilterByType DEFLATE application/javascript
|
||||
AddOutputFilterByType DEFLATE application/x-javascript
|
||||
AddOutputFilterByType DEFLATE application/json
|
||||
|
||||
ProxyPreserveHost On
|
||||
ProxyPass /api/v2/ http://localhost:8081/api/v2/
|
||||
ProxyPassReverse /api/v2/ http://localhost:8081/api/v2/
|
||||
ProxyPass /api-auth/ http://localhost:8081/api-auth/
|
||||
ProxyPassReverse /api-auth/ http://localhost:8081/api-auth/
|
||||
Alias /api/static /usr/share/airtime/api/
|
||||
|
||||
<Directory WEB_ROOT>
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_FILENAME} -s [OR]
|
||||
RewriteCond %{REQUEST_FILENAME} -l [OR]
|
||||
RewriteCond %{REQUEST_FILENAME} -d
|
||||
RewriteRule ^.*$ - [NC,L]
|
||||
RewriteRule ^.*$ index.php [NC,L]
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
<Directory /usr/share/airtime/api>
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
</VirtualHost>
|
|
@ -1,50 +0,0 @@
|
|||
WEB_PORT_LISTEN
|
||||
|
||||
<VirtualHost *:WEB_PORT>
|
||||
ServerAdmin foo@bar.org
|
||||
DocumentRoot WEB_ROOT
|
||||
php_admin_value upload_tmp_dir /tmp
|
||||
php_value post_max_size 500M
|
||||
php_value upload_max_filesize 500M
|
||||
php_value request_order "GPC"
|
||||
php_value session.gc_probability 0
|
||||
php_value session.auto_start 0
|
||||
|
||||
AddOutputFilterByType DEFLATE text/plain
|
||||
AddOutputFilterByType DEFLATE text/html
|
||||
AddOutputFilterByType DEFLATE text/xml
|
||||
AddOutputFilterByType DEFLATE text/css
|
||||
AddOutputFilterByType DEFLATE application/xml
|
||||
AddOutputFilterByType DEFLATE application/xhtml+xml
|
||||
AddOutputFilterByType DEFLATE application/rss+xml
|
||||
AddOutputFilterByType DEFLATE application/javascript
|
||||
AddOutputFilterByType DEFLATE application/x-javascript
|
||||
AddOutputFilterByType DEFLATE application/json
|
||||
|
||||
ProxyPreserveHost On
|
||||
ProxyPass /api/v2/ http://localhost:8081/api/v2/
|
||||
ProxyPassReverse /api/v2/ http://localhost:8081/api/v2/
|
||||
ProxyPass /api-auth/ http://localhost:8081/api-auth/
|
||||
ProxyPassReverse /api-auth/ http://localhost:8081/api-auth/
|
||||
Alias /api/static /usr/share/airtime/api/
|
||||
|
||||
<Directory WEB_ROOT>
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_FILENAME} -s [OR]
|
||||
RewriteCond %{REQUEST_FILENAME} -l [OR]
|
||||
RewriteCond %{REQUEST_FILENAME} -d
|
||||
RewriteRule ^.*$ - [NC,L]
|
||||
RewriteRule ^.*$ index.php [NC,L]
|
||||
|
||||
DirectoryIndex index.php
|
||||
AllowOverride all
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
<Directory /usr/share/airtime/api>
|
||||
Require all granted
|
||||
</Directory>
|
||||
</VirtualHost>
|
45
installer/apache/libretime.conf
Normal file
45
installer/apache/libretime.conf
Normal file
|
@ -0,0 +1,45 @@
|
|||
@@LISTEN_PORT_STRING@@
|
||||
|
||||
<VirtualHost *:@@LISTEN_PORT@@>
|
||||
ServerAdmin webmaster@localhost
|
||||
DocumentRoot @@LEGACY_WEB_ROOT@@/public
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/libretime.error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/libretime.access.log combined
|
||||
|
||||
AddOutputFilterByType DEFLATE text/plain text/html text/css application/javascript application/json
|
||||
|
||||
php_admin_value memory_limit 512M
|
||||
|
||||
php_admin_value post_max_size 512M
|
||||
php_admin_value upload_max_filesize 512M
|
||||
php_admin_value upload_tmp_dir /tmp
|
||||
|
||||
php_admin_value request_order GPC
|
||||
php_admin_value session.gc_probability 0
|
||||
php_admin_value session.auto_start 0
|
||||
|
||||
<Directory @@LEGACY_WEB_ROOT@@/public>
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_FILENAME} -s [OR]
|
||||
RewriteCond %{REQUEST_FILENAME} -l [OR]
|
||||
RewriteCond %{REQUEST_FILENAME} -d
|
||||
RewriteRule ^.*$ - [NC,L]
|
||||
RewriteRule ^.*$ index.php [NC,L]
|
||||
|
||||
DirectoryIndex index.php
|
||||
AllowOverride all
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
ProxyPreserveHost On
|
||||
ProxyPass /api/v2/ http://localhost:8081/api/v2/
|
||||
ProxyPassReverse /api/v2/ http://localhost:8081/api/v2/
|
||||
ProxyPass /api-auth/ http://localhost:8081/api-auth/
|
||||
ProxyPassReverse /api-auth/ http://localhost:8081/api-auth/
|
||||
</VirtualHost>
|
||||
|
||||
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
|
|
@ -1,7 +0,0 @@
|
|||
[PHP]
|
||||
memory_limit = 512M
|
||||
magic_quotes_gpc = Off
|
||||
file_uploads = On
|
||||
upload_tmp_dir = /tmp
|
||||
apc.write_lock = 1
|
||||
apc.slam_defense = 0
|
Loading…
Add table
Add a link
Reference in a new issue