From dbaa468f36801a91b6912814d0a0d34ecd46a941 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Fri, 14 Oct 2022 14:13:12 +0200 Subject: [PATCH] amandoleene-designyourfuture: wordpress to static website --- systems/LoutreOS/web.nix | 135 ++++++++++++++++++++------------------- 1 file changed, 68 insertions(+), 67 deletions(-) diff --git a/systems/LoutreOS/web.nix b/systems/LoutreOS/web.nix index 1cacd80..9731dae 100644 --- a/systems/LoutreOS/web.nix +++ b/systems/LoutreOS/web.nix @@ -61,10 +61,10 @@ in isSystemUser = true; group = config.users.groups.webdav.name; }; - wordpress = { - isSystemUser = true; - group = config.services.nginx.group; - }; + # wordpress = { + # isSystemUser = true; + # group = config.services.nginx.group; + # }; }; services = { @@ -83,19 +83,19 @@ in # }; # }; - "wordpress-designyourfuture" = { - user = config.users.users.wordpress.name; - group = config.services.nginx.group; - settings = { - "listen.owner" = config.services.nginx.user; - "pm" = "dynamic"; - "pm.max_children" = 32; - "pm.start_servers" = 2; - "pm.min_spare_servers" = 2; - "pm.max_spare_servers" = 4; - "pm.max_requests" = 500; - }; - }; + # "wordpress-designyourfuture" = { + # user = config.users.users.wordpress.name; + # group = config.services.nginx.group; + # settings = { + # "listen.owner" = config.services.nginx.user; + # "pm" = "dynamic"; + # "pm.max_children" = 32; + # "pm.start_servers" = 2; + # "pm.min_spare_servers" = 2; + # "pm.max_spare_servers" = 4; + # "pm.max_requests" = 500; + # }; + # }; drive = { @@ -316,52 +316,53 @@ in } ]; "designyourfuture.amandoline-creations.fr" = base { - "/" = { - priority = 200; - extraConfig = '' - try_files $uri $uri/ /index.php$is_args$args; - ''; - }; - "~ \\.php$" = { - priority = 500; - extraConfig = '' - fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:${config.services.phpfpm.pools."wordpress-designyourfuture".socket}; - fastcgi_index index.php; - include "${config.services.nginx.package}/conf/fastcgi.conf"; - fastcgi_param PATH_INFO $fastcgi_path_info; - fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; - # Mitigate https://httpoxy.org/ vulnerabilities - fastcgi_param HTTP_PROXY ""; - fastcgi_intercept_errors off; - fastcgi_buffer_size 16k; - fastcgi_buffers 4 16k; - fastcgi_connect_timeout 300; - fastcgi_send_timeout 300; - fastcgi_read_timeout 300; - ''; - }; - "~ /\\." = { - priority = 800; - extraConfig = "deny all;"; - }; - "~* /(?:uploads|files)/.*\\.php$" = { - priority = 900; - extraConfig = "deny all;"; - }; - "~* \\.(js|css|png|jpg|jpeg|gif|ico)$" = { - priority = 1000; - extraConfig = '' - expires max; - log_not_found off; - ''; - }; - } // { - root = "/var/www/wordpress-designyourfuture"; - extraConfig = '' - index index.php; - ''; - }; + "/".alias = "/var/www/amandoleene-designyourfuture/"; + # "/" = { + # priority = 200; + # extraConfig = '' + # try_files $uri $uri/ /index.php$is_args$args; + # ''; + # }; + # "~ \\.php$" = { + # priority = 500; + # extraConfig = '' + # fastcgi_split_path_info ^(.+\.php)(/.+)$; + # fastcgi_pass unix:${config.services.phpfpm.pools."wordpress-designyourfuture".socket}; + # fastcgi_index index.php; + # include "${config.services.nginx.package}/conf/fastcgi.conf"; + # fastcgi_param PATH_INFO $fastcgi_path_info; + # fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; + # # Mitigate https://httpoxy.org/ vulnerabilities + # fastcgi_param HTTP_PROXY ""; + # fastcgi_intercept_errors off; + # fastcgi_buffer_size 16k; + # fastcgi_buffers 4 16k; + # fastcgi_connect_timeout 300; + # fastcgi_send_timeout 300; + # fastcgi_read_timeout 300; + # ''; + # }; + # "~ /\\." = { + # priority = 800; + # extraConfig = "deny all;"; + # }; + # "~* /(?:uploads|files)/.*\\.php$" = { + # priority = 900; + # extraConfig = "deny all;"; + # }; + # "~* \\.(js|css|png|jpg|jpeg|gif|ico)$" = { + # priority = 1000; + # extraConfig = '' + # expires max; + # log_not_found off; + # ''; + # }; + } // { + # root = "/var/www/wordpress-designyourfuture"; + # extraConfig = '' + # index index.php; + # ''; + }; }; }; @@ -392,10 +393,10 @@ in python-ci.enable = true; - mysql = { - enable = true; - package = pkgs.mariadb; - }; + # mysql = { + # enable = true; + # package = pkgs.mariadb; + # }; }; systemd.services.nginx.serviceConfig = {