Support » Installing WordPress » Redirect loop error for WP page

  • Hello Experts,

    I installed NGINX and Apache in my Ubuntu Server which Nginx is front end proxy. After that, I install WordPress on the server block with domain name But can not reach the index page as it appeared redirect loop notification on the browser. In other hand, I create a info.php file put at the root folder this server block and other manual created html files still read as normal and also can log in to admin page and go through all the function tabs of admin dashboard.

    Followings are my configuration file:

    1.File: /etc/nginx/sites-available/

    [ Moderator note: please wrap code in backticks or use the code button. ]

    server {
    listen 80;
    root /var/www/;
    index index.php index.html index.htm;
    location / {
    try_files $uri $uri/ /index.php;
    error_page 404 /404.html;
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
    root /var/www/;
    location ~ \.php$ { 
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header Host $host;
    location ~ /\.ht {
    deny all;

    2.File /etc/nginx/nginx.conf:

    user www-data; #change to the same user apache runs as
    worker_processes 1; #change to the number of your CPUs/Cores
    worker_rlimit_nofile 8192;
    error_log /var/log/nginx/error.log;
    pid /var/run/;
    events {
    worker_connections 1024;
    use epoll;
    accept_mutex off;
    http {
    server_names_hash_bucket_size 64;
    types_hash_max_size 2048;
    include /etc/nginx/mime.types;
    default_type application/octet-stream;
    access_log /var/log/nginx/access.log;
    sendfile on;
    tcp_nopush on;
    keepalive_timeout 65;
    # reverse proxy options
    proxy_redirect off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    # gzip compression options
    gzip on;
    gzip_http_version 1.0;
    gzip_comp_level 6;
    gzip_min_length 0;
    gzip_buffers 16 8k;
    gzip_proxied any;
    gzip_types text/plain text/css text/xml text/javascript application/xml application/xml+rss application/javascript application/json;
    gzip_disable "MSIE [1-6]\.";
    gzip_vary on;
    # include virtual hosts configuration
    include /etc/nginx/virtual.d/*.conf;
    include /etc/nginx/sites-enabled/*;

    3.file /etc/apache2/ports.conf


    4.File /etc/apache2/sites-available/

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/
    <Directory />
    Options FollowSymLinks
    AllowOverride All
    <Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
    ErrorLog ${APACHE_LOG_DIR}/error.log
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from ::1/128

    Could anyone please help me on this issue. I also concerned about htaccess file so I deleted it but it stll remains the same issue.

    Thanks and regards,

  • The topic ‘Redirect loop error for WP page’ is closed to new replies.