nginx + php

# apt-get install php php-common php-cli php-fpm Put this into your (virtual) servers nginx config file: … and … into the index line. create a test.php file: restart nginx and test it. Tune php.ini in /etc/php/…

nginx | redirect https://domain to different https://domain without browser cert errors

Standard nginx redirect: server { listen 80; listen 443 ssl; server_name up-eleven.de http://www.domain-a.tld; return 301 https://www.domain-b.tld; } Produces browser ssl errors (wrong cert) cs before executing the redirecting order the https connection is established between your browser and the orig domain. Solution: Run certbot on the orig domain you redirect from: The bot inserts this […]

OpenBSD + NGINX [fastcgi] + PHP

php-fpm is not an independent package. Install php, php-fpm is included. php-fpm is properly pre-configured and should run instantly. nginx.conf: location ~ \.php$ { try_files $uri $uri/ =404; fastcgi_pass unix:run/php-fpm.sock; # NO ABSOLUTE PATH PLS. !!! fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }

ICECAST WITH HTTPS

1. Install and configure Icecast listenning on 127.0.0.1 port 8000 without ssl. ;) 2. Install nginx 3. Create directory .well-known in webroot ( here: /var/www/html ) 4. Install certbot 5. Configure nginx: /etc/nginx/nginx.conf: #user www; worker_processes 4; #pid /run/nginx.pid; events { worker_connections 768; # multi_accept on; } http { ## # Basic Settings ## sendfile […]