2022-10-01 14:51:51
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
Homeassistant diverse dingen
|
||||||
|
|
||||||
|
voor nginx doe altijd nginx -t om de kijken of je config klopt
|
||||||
|
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
# zet deze in je /etc/nginx/sites-enabled/
|
||||||
|
|
||||||
|
upstream ha1 {
|
||||||
|
# ipnummer van je ha
|
||||||
|
server IP-VULHIERIN:8123;
|
||||||
|
keepalive 64;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl http2;
|
||||||
|
# if you need IPv6:
|
||||||
|
listen [::]:443 ssl http2;
|
||||||
|
server_name ha.jehostnaaam.nl;
|
||||||
|
access_log /var/log/nginx/ha-access.log combined;
|
||||||
|
error_log /var/log/nginx/ha-error.log info;
|
||||||
|
http2_push_preload on; # Enable HTTP/2 Server Push
|
||||||
|
|
||||||
|
#aanpassen hieronder
|
||||||
|
ssl_certificate /etc/letsencrypt/live/ha.jehostnaam.nl/fullchain.pem;
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/ha.jehostnaam.nl/privkey.pem;
|
||||||
|
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||||
|
|
||||||
|
add_header Strict-Transport-Security max-age=15768000;
|
||||||
|
ssl_stapling on;
|
||||||
|
ssl_stapling_verify on;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://ha1 ;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
proxy_cache_bypass $http_upgrade;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Frame-Options SAMEORIGIN;
|
||||||
|
|
||||||
|
}
|
||||||
|
location /api/websocket {
|
||||||
|
proxy_pass http://ha1/api/websocket;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# op ubuntu later de desktop installeren
|
||||||
|
|
||||||
|
apt install tasksel
|
||||||
|
tasksel install ubuntu-desktop
|
||||||
|
apt-get -y install `check-language-support -l nl`
|
||||||
|
#gsettings set org.gnome.desktop.background picture-uri ""
|
||||||
|
#gsettings set org.gnome.desktop.background primary-color '#000000'
|
||||||
|
#gsettings set org.gnome.desktop.background color-shading-type 'solid'
|
||||||
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
gsettings set org.gnome.desktop.background picture-uri ""
|
||||||
|
gsettings set org.gnome.desktop.background primary-color '#000000'
|
||||||
|
gsettings set org.gnome.desktop.background color-shading-type 'solid'
|
||||||
|
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
apt-mark hold linux-image-$(uname -r)
|
||||||
|
apt-mark hold inux-headers-$(uname -r)
|
||||||
|
echo "linux-image-$(uname -r) hold" | dpkg --set-selections
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
timedatectl set-timezone Europe/Amsterdam
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
apt install php5.6-intl php5.6-zip php5.6-curl php5.6-mysql php5.6-mbstring php5.6-xmlrpc php5.6-soap php5.6-xml
|
||||||
|
apt install php5.6-intl php5.6-zip php5.6-curl`php5.6-redis redis
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
apt install php7.3-intl php7.3-zip php7.3-curl php7.3-mysql php7.3-mbstring php7.3-xmlrpc php7.3-soap php7.3-xml
|
||||||
|
apt install php7.3-intl php7.3-zip php7.3-curl php7.3-fpm php7.3-redis redis php7.3-memcached
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
apt install -y php7.4-intl php7.4-zip php7.4-curl php7.4-mysql php7.4-mbstring php7.4-xmlrpc php7.4-soap php7.4-xml php7.4-fpm
|
||||||
|
apt install -y php7.4-intl php7.4-zip php7.4-curl php7.4-fpm php7.4-memcached memcached redis php7.4-redis php7.4-gd
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
apt install php8.0-intl php8.0-zip php8.0-curl php8.0-mysql php8.0-mbstring php8.0-xmlrpc php8.0-soap php8.0-xml
|
||||||
|
apt install php8.0-intl php8.0-zip php8.0-curl php8.0-redis redis
|
||||||
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
apt install php8.1-intl php8.1-zip php8.1-curl php8.1-mysql php8.1-mbstring php8.1-xmlrpc php8.1-soap php8.1-xml php8.1-redis redis php8.1-fpm php8.1-opcache
|
||||||
|
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
apt install software-properties-common
|
||||||
|
add-apt-repository ppa:ondrej/php
|
||||||
|
add-apt-repository ppa:ondrej/nginx-mainline
|
||||||
|
add-apt-repository ppa:ondrej/nginx
|
||||||
|
|
||||||
|
|
||||||
|
# apache
|
||||||
|
#apt update
|
||||||
|
#apt install php8.0 libapache2-mod-php8.0
|
||||||
|
|
||||||
|
# nginx
|
||||||
|
apt update
|
||||||
|
apt install php8.0-fpm
|
||||||
|
|
||||||
|
|
||||||
Executable
+3
@@ -0,0 +1,3 @@
|
|||||||
|
sed -i "s/^;date.timezone =.*/date.timezone = Europe\/Amsterdam/" /etc/php/7.4/cli/php.ini
|
||||||
|
sed -i "s/^;date.timezone =.*/date.timezone = Europe\/Amsterdam/" /etc/php/7.4/apache2/php.ini
|
||||||
|
sed -i "s/^;date.timezone =.*/date.timezone = Europe\/Amsterdam/" /etc/php/7.4/fpm/php.ini
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# nginx
|
||||||
|
# in /etc/php/X.X/fpm/pool.d/
|
||||||
|
php_admin_value[memory_limit] = 512M
|
||||||
|
php_admin_value[max_execution_time]=60
|
||||||
|
php_admin_value[upload_max_filesize]=16M
|
||||||
|
php_admin_value[post_max_size]=16M
|
||||||
|
php_admin_value[session.save_handler] = redis
|
||||||
|
php_admin_value[session.save_path] = "tcp://127.0.0.1:6379"
|
||||||
|
php_admin_value[opcache.enable]=1
|
||||||
|
php_admin_value[opcache.memory_consumption]=512
|
||||||
|
php_admin_value[opcache.max_accelerated_files]=20000
|
||||||
|
php_admin_value[opcache.validate_timestamps]=1
|
||||||
|
php_admin_value[opcache.revalidate_freq]=90
|
||||||
|
|
||||||
Reference in New Issue
Block a user