小编tan*_*ngo的帖子

too many redirects for wordpress on nginx with apache2

I have just installed wordpress on ubuntu 14.04 LTS. Nginx acts as reverse proxy for apache2.

wp-admin is working fine, but I am unable to open the homepage.

Nginx Server Code:

server {
        listen 80;

        root /var/www/html/testblog;
        index index.php index.html index.htm;

        server_name testblog.com;

        location / {
                # try_files $uri $uri/ =404;
                try_files $uri $uri/ /index.php?q=$uri&$args;
        }

        error_page 404 /404.html;

        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
                root /usr/share/nginx/html;
        }

        location ~ \.php$ {
                proxy_set_header X-Real-IP  $remote_addr;
                proxy_set_header …
Run Code Online (Sandbox Code Playgroud)

php apache wordpress nginx

4
推荐指数
1
解决办法
5585
查看次数

标签 统计

apache ×1

nginx ×1

php ×1

wordpress ×1