From 143b524eb381ef88d5453c08fae38fb03d9944d1 Mon Sep 17 00:00:00 2001 From: Victor Westerlund Date: Wed, 5 Nov 2025 14:18:10 +0000 Subject: [PATCH] initial commit --- sites-available/443.conf | 17 ++++++++++++++++ sites-available/44300.conf | 39 +++++++++++++++++++++++++++++++++++++ sites-available/44301.conf | 40 ++++++++++++++++++++++++++++++++++++++ sites-available/44302.conf | 33 +++++++++++++++++++++++++++++++ snippets/default-ssl.txt | 2 ++ snippets/vlw.txt | 2 ++ 6 files changed, 133 insertions(+) create mode 100644 sites-available/443.conf create mode 100644 sites-available/44300.conf create mode 100644 sites-available/44301.conf create mode 100644 sites-available/44302.conf create mode 100644 snippets/default-ssl.txt create mode 100644 snippets/vlw.txt diff --git a/sites-available/443.conf b/sites-available/443.conf new file mode 100644 index 0000000..4d21295 --- /dev/null +++ b/sites-available/443.conf @@ -0,0 +1,17 @@ +server { + listen 443 ssl; + + server_name _; + + include snippets/vlw.se-ssl.conf; + + location / { + proxy_set_header Host $host; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection upgrade; + proxy_set_header Accept-Encoding gzip; + proxy_set_header X-Forwarded-For $remote_addr; + + proxy_pass http://localhost:8080; + } +} diff --git a/sites-available/44300.conf b/sites-available/44300.conf new file mode 100644 index 0000000..318730b --- /dev/null +++ b/sites-available/44300.conf @@ -0,0 +1,39 @@ +server { + listen 44300 ssl http2; + + server_name _; + include snippets/vlw.se-ssl.conf; + + root /var/www; + index index.html index.php; + + client_max_body_size 1G; + + add_header Access-Control-Allow-Origin *; + + location / { + try_files $uri $uri.html $uri/ @extensionless-php; + autoindex on; + } + + location ~ \.php$ { + include snippets/fastcgi-php.conf; + # With php-fpm (or other unix sockets): + fastcgi_pass unix:/run/php/php8.4-fpm.sock; + # With php-cgi (or other tcp sockets): + #fastcgi_pass 127.0.0.1:9000; + } + + location @extensionless-php { + rewrite ^(.*)$ $1.php last; + } + + # -- Proxies -- + + # -- Overrides -- + + location /tools/pla/index.php { + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/run/php/php7.3-fpm.sock; + } +} diff --git a/sites-available/44301.conf b/sites-available/44301.conf new file mode 100644 index 0000000..186a481 --- /dev/null +++ b/sites-available/44301.conf @@ -0,0 +1,40 @@ +server { + listen 44301 ssl; + + server_name _; + + include snippets/vlw.se-ssl.conf; + + # Reflect + #root /var/www/reflect/public; + + # Vegvisir + root /var/www/fw/vegvisir/public; + + # Other + #root /var/www/sites/href/public; + + index index.html index.php; + +# location ~ /assets/* { +# root /var/www/sites/vlw.se/public; +# root /var/www/vegvisir-website/public; + +# root /var/www/icellate-web; +# root /var/www/genemate-2/public; +# root /var/www/lams; +# root /var/www/violet; + +# try_files $uri $uri/ =404; +# add_header Access-Control-Allow-Origin *; +# } + + location ~ /* { + try_files /index.php =503; + add_header Access-Control-Allow-Origin *; + + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/run/php/php8.4-fpm.sock; + #fastcgi_pass unix:/run/php/php7.3-fpm.sock; + } +} diff --git a/sites-available/44302.conf b/sites-available/44302.conf new file mode 100644 index 0000000..bff657c --- /dev/null +++ b/sites-available/44302.conf @@ -0,0 +1,33 @@ +server { + listen 44302 ssl http2; + + server_name _; + + include snippets/vlw.se-ssl.conf; + + # Reflect + root /var/www/fw/reflect/public; + # iCellate API peer helper +# root /var/www/api-peer-wrapper/public; + # Vegvisir +# root /var/www/vegvisir/public; + + index index.html index.php; + +# location ~ /assets/* { +# try_files $uri $uri/ =404; +# add_header Access-Control-Allow-Origin *; +# } + + location ~ /* { + try_files /index.php =503; + + add_header Access-Control-Allow-Origin $http_origin always; + add_header Access-Control-Allow-Methods GET,POST,PUT,PATCH,DELETE,OPTIONS always; + add_header Access-Control-Allow-Headers Authorization,Content-Type always; + + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/run/php/php8.4-fpm.sock; +# fastcgi_pass unix:/run/php/php7.3-fpm.sock; + } +} diff --git a/snippets/default-ssl.txt b/snippets/default-ssl.txt new file mode 100644 index 0000000..5a36541 --- /dev/null +++ b/snippets/default-ssl.txt @@ -0,0 +1,2 @@ +ssl_certificate /etc/ssl/certs/ssl-default.crt; +ssl_certificate_key /etc/ssl/private/ssl-default.key; diff --git a/snippets/vlw.txt b/snippets/vlw.txt new file mode 100644 index 0000000..8c13b37 --- /dev/null +++ b/snippets/vlw.txt @@ -0,0 +1,2 @@ +ssl_certificate /etc/letsencrypt/live/vlw.se/fullchain.pem; +ssl_certificate_key /etc/letsencrypt/live/vlw.se/privkey.pem;