fix: split out the php config so it can serve php and html together
This commit is contained in:
parent
48e48c43c7
commit
ebefd81def
1 changed files with 21 additions and 10 deletions
|
@ -108,16 +108,27 @@ in {
|
||||||
# chmod 711 ~
|
# chmod 711 ~
|
||||||
# chmod -R 755 ~/public_html
|
# chmod -R 755 ~/public_html
|
||||||
|
|
||||||
locations."/" = {
|
locations = {
|
||||||
alias = "/home/$user/public_html/";
|
"/" = {
|
||||||
index = "index.html index.php";
|
alias = "/home/$user/public_html/";
|
||||||
extraConfig = ''
|
index = "index.html";
|
||||||
autoindex on;
|
extraConfig = ''
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
autoindex on;
|
||||||
fastcgi_pass unix:${config.services.phpfpm.pools.${php_pool}.socket};
|
'';
|
||||||
include ${pkgs.nginx}/conf/fastcgi.conf;
|
tryFiles = "$uri$args $uri$args/ /index.html";
|
||||||
'';
|
};
|
||||||
tryFiles = "$uri$args $uri$args/ /index.html /index.php";
|
|
||||||
|
"~ ^(.+\\.php)(.*)$" = {
|
||||||
|
root = "/home/$user/public_html/";
|
||||||
|
index = "index.php";
|
||||||
|
extraConfig = ''
|
||||||
|
autoindex on;
|
||||||
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
|
fastcgi_pass unix:${config.services.phpfpm.pools.${php_pool}.socket};
|
||||||
|
include ${pkgs.nginx}/conf/fastcgi.conf;
|
||||||
|
'';
|
||||||
|
tryFiles = "$uri$args $uri$args/ /index.php";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue