WordPress redirect loop on nginx + apache reverse proxy

Issue was caused by nginx serving example.com/index.php while WordPress was redirecting to example.com/, thus causing a redirect loop. This is the working config I used to fixed the redirect loop: server { server_name example.com; root /var/www/example.com; index index.php; listen 443 ssl; ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; include /etc/letsencrypt/options-ssl-nginx.conf; ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; location / { try_files $uri @apache; … Read more

Nginx rules for subdomain multisite install (Bedrock)

Ok some wise guy deleted my last post. The answer, which the above member (@etc) gave to me on another forum, and is working quite fine, is as follows: # Rewrites for Bedrock Multi-Site Subdomain Setup rewrite /wp-admin$ $scheme://$host$uri/ last; rewrite ^/(wp-.*.php)$ /wp/$1 last; rewrite ^/(wp-(content|admin|includes).*) /wp/$1 last; He revised his answer but did not … Read more

nginx – permalinks with .php in url not working

I ended up changing location ~ ^/.*\.php$ { try_files $uri = 404; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } to location ~ ^/.*\.php$ { try_files $uri $uri/ /index.php?$args; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } It now works, but I feel that is a security issue now.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)