Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter xanchez

    (@xanchez)

    Well, i moved the site already as multisite so i haven’t tested it as single site.
    However, as multisite the pretty permalinks are working fine.
    My sites are working normally now, with this new configuration:

    server {
                listen 80;
                server_name www.domain.tld;
                return 301 https://domain.tld$request_uri;
           }
    server {
                listen 80;
                server_name domain.tld;
                access_log /home/username/public_html/domain.tld/log/access.log;
                error_log /home/username/public_html/domain.tld/log/error.log;
    
                location /
                {
                    root /home/username/public_html/domain.tld/public;
                    index index.php index.html;
                    try_files $uri $uri/ index.php?q=$uri&$args;
                }
    
                location /blogs
                {
                    root /home/username/public_html/domain.tld/public;
                    index index.php index.html;
    
                    rewrite /wp-admin$ $scheme://$host$uri/ permanent;
                    rewrite ^.*/files/(.*)$ /blogs/wp-includes/ms-files.php?file=$1 last;
    
                    try_files $uri $uri/ @rewrites;
                }
                location @rewrites {
                   rewrite ^.+/?(/wp-.*) /blogs/$1 last;
                   rewrite ^.+/?(/.*\.php)$ /blogs/$1 last;
                   rewrite ^(.+)$ /blogs/index.php?q=$1 last;
                }
    
                # this prevents hidden files (beginning with a period) from being served
                location ~ /\.          { access_log off; log_not_found off; deny all; }
    
                # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
                location ~* \.php$
                {
                    location ~ \..*/.*\.php$ {return 404;}
                    fastcgi_pass 127.0.0.1:9000;
                    fastcgi_index index.php;
                    include /etc/nginx/fastcgi_params;
                    fastcgi_param SCRIPT_FILENAME /home/username/public_html/domain.tld/public/$fastcgi_script_name;
                }
           }

    I’m sure this is not optimal, so I hope someone can help me optimize it.
    Now, i’ll try to figure out how to make the cache plugin works.

Viewing 1 replies (of 1 total)