Skip to content

Commit

Permalink
Fix WP breaking Moodle and generic PHP
Browse files Browse the repository at this point in the history
  • Loading branch information
bviktor committed Dec 3, 2024
1 parent fe64674 commit 17274ad
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
3 changes: 2 additions & 1 deletion tasks/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
loop:
- dos.conf
- nginx.conf
- php.conf
- php-common.conf
- php-wordpress.conf
- ssl.conf
loop_control:
loop_var: ng_conf_item
Expand Down
5 changes: 4 additions & 1 deletion templates/host.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ server
root {{ eff_path }};

{% if mode == 'php' or mode == 'wordpress' or mode == 'moodle' %}
include php.conf;
include php-common.conf;
{% if mode == 'wordpress' %}
include php-wordpress.conf;
{% endif %}

{% elif mode == 'proxy' %}
location /
Expand Down
6 changes: 0 additions & 6 deletions templates/php.conf.j2 → templates/php-common.conf.j2
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
index index.php;

# wordpress-specific
if (!-e $request_filename)
{
rewrite ^.*$ /index.php last;
}

location ~ [^/]\.php(/|$)
{
if (!-f $document_root$fastcgi_script_name)
Expand Down
5 changes: 5 additions & 0 deletions templates/php-wordpress.conf.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# wordpress-specific
if (!-e $request_filename)
{
rewrite ^.*$ /index.php last;
}

0 comments on commit 17274ad

Please sign in to comment.