1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

NGINX windows server block help for redirecting and xenforo?

Discussion in 'Nginx' started by Bi0Ph34r, Aug 9, 2016.

  1. #1
    I have created a sever block and have no clue why anything that's happening is happening.

    here is my server block for windows nginx 1.9.+:

        server {
            listen       80;
            server_name  rpgprison.com www.rpgprison.com;
            #return 301 http://rpgprison.com/home$request_uri;
            location / {
                root   html/RPGPrison_Files;
                index  index.html index.htm index.php;
                      
              
            }
          
    
            #error_page  404              /404.html;
    
            # redirect server error pages to the static page /50x.html
            #
            error_page   500 502 503 504  /50x.html;
            location = /50x.html {
                root   html;
            }
    
            # proxy the PHP scripts to Apache listening on 127.0.0.1:80
            #
            #location ~ \.php$ {
            #    proxy_pass   http://127.0.0.1;
            #}
    
            # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
            #
            location ~ \.php$ {
                root           html/RPGPrison_Files;
                try_files $uri =404;
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
                include        fastcgi_params;
            }
          
    
            # deny access to .htaccess files, if Apache's document root
            # concurs with nginx's one
            #
            #location ~ /\.ht {
            #    deny  all;
            #}
          
                  
            location /forums/ {
                try_files $uri $uri/ /forums/index.php?$uri&$args;
                index index.php index.html;
            }
            location /forums/install/data/ {
                internal;
            }
            location /forums/install/templates/ {
                internal;
            }
            location /forums/internal_data/ {
                internal;
            }
            location /forums/library/ {
                internal;
            }
          
          
        }    
    Code (markup):

    First issue:
    #return 301 http://rpgprison.com/home$request_uri;

    when it redirects it goes like http://rpgprison.com/home/home/home/home/home/home/home and repeats a lot anyone know why it's doing this?

    second issue is with the xenforo code I added:

            location /forums/ {
    
                try_files $uri $uri/ /forums/index.php?$uri&$args;
    
                index index.php index.html;
    
            }
    
            location /forums/install/data/ {
    
                internal;
    
            }
    
            location /forums/install/templates/ {
    
                internal;
    
            }
    
            location /forums/internal_data/ {
    
                internal;
    
            }
    
            location /forums/library/ {
    
                internal;
    
            }
    Code (markup):
    xenforo friendly urls are active on xenforo through admin panel but when you go to the site it like some code or images are missing it just not working right any help thanks?
     
    Bi0Ph34r, Aug 9, 2016 IP
  2. Bi0Ph34r

    Bi0Ph34r Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    Bump!
     
    Bi0Ph34r, Aug 10, 2016 IP