Jump to content

Nginx error

Guest

So i have pico cms and i moved it over to my PI and the home page works great! :)  but than if i load a sub page this will pop up!! :( :(

 

Welcome to nginx!

:wacko:  I don' t understand this at all.......

 

The error code is

 

2015/05/21 14:32:29 [error] 3944#0: *6 rewrite or internal redirection cycle while internally redirecting to "/index.html", client: 192.168.2.10, server: localhost, request: "GET /www/oke HTTP/1.1", host: "192.168.2.13", referrer: "http$ "http://192.168.2.13/www/"
 

What is this?? :blink: :wacko:

 

Thanks!!!! ;):P:)

Link to comment
Share on other sites

Link to post
Share on other sites

This redirection may have occurred due to a wrong hyper-link to the sub-page... Check the link you are using to access the sub-page.

Since, you have moved the whole CMS over to a new system, the relative directory structure might not be the same as the one you were using on the other system...

There's always a way...

Link to comment
Share on other sites

Link to post
Share on other sites

This redirection may have occurred due to a wrong hyper-link to the sub-page... Check the link you are using to access the sub-page.

Thanks for the reply! :)

 

But i allready tried all links i am using the right one i am sure :(

Link to comment
Share on other sites

Link to post
Share on other sites

Thanks for the reply! :)

 

But i allready tried all links i am using the right one i am sure :(

 

Hmm... Were you using NGNIX on the other machine as well...

There's always a way...

Link to comment
Share on other sites

Link to post
Share on other sites

Hmm... Were you using NGNIX on the other machine as well...

Nope i was using apache but i reinstalled raspian like 5 times with apache too and no difference.. :mellow: :( :(

Link to comment
Share on other sites

Link to post
Share on other sites

Nope i was using apache but i reinstalled raspian like 5 times with apache too and no difference.. :mellow: :( :(

 

Was it the same Apache version as on the other machine... Also try to copy over the httpd file from the other machine, you may have made some changes there...

There's always a way...

Link to comment
Share on other sites

Link to post
Share on other sites

Was it the same Apache version as on the other machine... Also try to copy over the httpd file from the other machine, you may have made some changes there...

Yep same version... :unsure:  They are two different servers so i have no chance of copying them :(

Link to comment
Share on other sites

Link to post
Share on other sites

Can you post your nginx configs? (and any enabled site configs)

--Neil Hanlon

Operations Engineer

Link to comment
Share on other sites

Link to post
Share on other sites

Can you post your nginx configs? (and any enabled site configs)

Yes ofcourse :D 

 

 

Nginx.conf

 

# Uncomment it if you installed nginx-passenger

        ##

        #passenger_root /usr;

        #passenger_ruby /usr/bin/ruby;

        ##

        # Virtual Host Configs

        ##

        include /etc/nginx/conf.d/*.conf;

        include /etc/nginx/sites-enabled/*;

}

#mail {

#       # See sample authentication script at:

#       # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript

#

#       # auth_http localhost/auth.php;

#       # pop3_capabilities "TOP" "USER";

#       # imap_capabilities "IMAP4rev1" "UIDPLUS";

#

#       server {

#               listen     localhost:110;

#               protocol   pop3;

#               proxy      on;

#       }

#

#       server {

#               listen     localhost:143;

#               protocol   imap;

#               proxy      on;

#       }

#}

sites default :

 

# You may add here your

# server {

#       ...

# }

# statements for each of your virtual hosts to this file

##

# You should look at the following URL's in order to grasp a solid understanding

# of Nginx configuration files in order to fully unleash the power of Nginx.

# http://wiki.nginx.org/Pitfalls

# http://wiki.nginx.org/QuickStart

# http://wiki.nginx.org/Configuration

#

# Generally, you will want to move this file somewhere, and start with a clean

# file but keep this around for reference. Or just disable in sites-enabled.

#

# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.

##

server {

        #listen   80; ## listen for ipv4; this line is default and implied

        #listen   [::]:80 default_server ipv6only=on; ## listen for ipv6

        root /usr/share/nginx/www;

        index index.php index.html index.htm;

        # Make site accessible from http://localhost/

        server_name localhost;

        location / {

                # First attempt to serve request as file, then

                # as directory, then fall back to displaying a 404.

                try_files $uri $uri/ /index.html;

                # Uncomment to enable naxsi on this location

                # include /etc/nginx/naxsi.rules

        }

        location /doc/ {

                alias /usr/share/doc/;

                autoindex on;

                allow 127.0.0.1;

                allow ::1;

                deny all;

        }

        # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests

        #location /RequestDenied {

        #       proxy_pass http://127.0.0.1:8080;

        #}

        #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 /usr/share/nginx/www;

        #}

 

# You may add here your

# server {

#       ...

# }

# statements for each of your virtual hosts to this file

##

# You should look at the following URL's in order to grasp a solid understanding

# of Nginx configuration files in order to fully unleash the power of Nginx.

# http://wiki.nginx.org/Pitfalls

# http://wiki.nginx.org/QuickStart

# http://wiki.nginx.org/Configuration

#

# Generally, you will want to move this file somewhere, and start with a clean

# file but keep this around for reference. Or just disable in sites-enabled.

#

# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.

##

server {

        #listen   80; ## listen for ipv4; this line is default and implied

        #listen   [::]:80 default_server ipv6only=on; ## listen for ipv6

        root /usr/share/nginx/www;

        index index.php index.html index.htm;

        # Make site accessible from http://localhost/

        server_name localhost;

        location / {

                # First attempt to serve request as file, then

 # as directory, then fall back to displaying a 404.

                try_files $uri $uri/ /index.html;

                # Uncomment to enable naxsi on this location

                # include /etc/nginx/naxsi.rules

        }

        location /doc/ {

                alias /usr/share/doc/;

                autoindex on;

                allow 127.0.0.1;

                allow ::1;

                deny all;

        }

        # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests

        #location /RequestDenied {

        #       proxy_pass http://127.0.0.1:8080;

        #}

        #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 /usr/share/nginx/www;

        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

        #

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

        #

        location ~ \.php$ {

                fastcgi_split_path_info ^(.+\.php)(/.+)$;

        #       # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini

        #

        #       # With php5-cgi alone:

        #       fastcgi_pass 127.0.0.1:9000;

        #       # With php5-fpm:

                fastcgi_pass unix:/var/run/php5-fpm.sock;

                fastcgi_index index.php;

                include fastcgi_params;

        }

        # deny access to .htaccess files, if Apache's document root

        # concurs with nginx's one

        #

        #location ~ /\.ht {

        #       deny all;

        #}

}

# another virtual host using mix of IP-, name-, and port-based configuration

#

#server {

#       listen 8000;

#       listen somename:8080;

#       server_name somename alias another.alias;

#       root html;

#       index index.html index.htm;

#

#       location / {

#               try_files $uri $uri/ =404;

#       }

#}

# HTTPS server

#

#server {

#       listen 443;

#       server_name localhost;

#

#       root html;

#       index index.html index.htm;

#

#       ssl on;

#       ssl_certificate cert.pem;

#       ssl_certificate_key cert.key;

#

#       ssl_session_timeout 5m;

#

#       ssl_protocols SSLv3 TLSv1;

#       ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;

#       ssl_prefer_server_ciphers on;

#

#       location / {

#               try_files $uri $uri/ =404;

#       }

#}

 

If there are a few misplaced characters sorry this was pasted in pieces! ;):)

 

Link to comment
Share on other sites

Link to post
Share on other sites

Yep same version... :unsure:  They are two different servers so i have no chance of copying them :(

Is the link to the sub-page following RELATIVE path or ABSOLUTE path...

There's always a way...

Link to comment
Share on other sites

Link to post
Share on other sites

Is the link to the sub-page following RELATIVE path or ABSOLUTE path...

What do you mean? :)

Link to comment
Share on other sites

Link to post
Share on other sites

What do you mean? :)

 

you can just share the link that takes you from your index to your sub-page, I'll tell you...

There's always a way...

Link to comment
Share on other sites

Link to post
Share on other sites

you can just share the link that takes you from your index to your sub-page, I'll tell you...

http://192.168.2.13/sub/I am still testing locally :);)

Link to comment
Share on other sites

Link to post
Share on other sites

Have you copied this link from the address bar of your browser?

Yeah that is for sub this is for oke http://192.168.2.13/oke

:);)  both don' t work :(

Link to comment
Share on other sites

Link to post
Share on other sites

Yeah that is for sub this is for oke http://192.168.2.13/oke

:);)  both don' t work :(

 

I was actually looking for the embedded link in your index page...

There's always a way...

Link to comment
Share on other sites

Link to post
Share on other sites

I was actually looking for the embedded link in your index page...

What do you mean?? :wacko: :wacko:

Link to comment
Share on other sites

Link to post
Share on other sites

What do you mean?? :wacko: :wacko:

 

Amm... I mean, just right click the link and copy the link address and paste in here

There's always a way...

Link to comment
Share on other sites

Link to post
Share on other sites

Amm... I mean, just right click the link and copy the link address and paste in here

This is that http://192.168.2.13/oke;)

Link to comment
Share on other sites

Link to post
Share on other sites

Could you share the index page code... If it's too long, then just get the part where these links are written

The problem is iam using pico cms so there is no index.html i think it' s all decenteralized :wacko:

Link to comment
Share on other sites

Link to post
Share on other sites

The problem is iam using pico cms so there is no index.html i think it' s all decenteralized :wacko:

 

Get the page source of your home page..

There's always a way...

Link to comment
Share on other sites

Link to post
Share on other sites

Get the page source of your home page..

<nav>

                <a href="#" class="menu-icon"></a>

                <ul>

                                            <li><a href="http://192.168.2.13/">Welcome</a></li>

                                            <li><a href="http://192.168.2.13/oke">Welcome</a></li>

                                            <li><a href="http://192.168.2.13/sub/">Sub Page Index</a></li>

                                            <li><a href="http://192.168.2.13/sub/page">Sub Page</a></li>

                                    </ul>

            </nav>

 

This ;) ;) ;) ;)

Link to comment
Share on other sites

Link to post
Share on other sites

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d 

RewriteRule . index.php [L]

</IfModule>

 

# Prevent file browsing

Options -Indexes

 

 

I found this line in the .htaccess file in pico-master, try to comment this line and see what happens...

There's always a way...

Link to comment
Share on other sites

Link to post
Share on other sites

 

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . index.php [L]
</IfModule>
 
# Prevent file browsing
Options -Indexes
 
 
I found this line in the .htaccess file in pico-master, try to comment this line and see what happens...

 

Did not do anything :(  Thanks for trying ;)

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×