Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9227861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:11:03+00:00 2026-06-18T05:11:03+00:00

there’s web page which uses zend framework. the web actually uses rewrites. I googled

  • 0

there’s web page which uses zend framework. the web actually uses rewrites. I googled for solutions how to setup zend framework win nginx.. and they said it’s not necessary to convert those default rewrite .htaccess to nginx one..

anyway here’s .htaccess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

RewriteRule ^robots\.txt$ robots.txt

here’s nginx configuration of web page:

server {
    listen   80; ## listen for ipv4; this line is default and implied
    #listen   [::]:80 default_server ipv6only=on; ## listen for ipv6

    root /var/www/vhosts/domain.lt/httpdocs;
    index index.php;

    # Make site accessible from http://localhost/
    server_name domain.lt;
    server_name www.domain.lt;

    location / {
        if (-f $request_filename) {
                root /var/www/vhosts/domain.lt/httpdocs;
            }   
    }

    location ~* ^/(favicon.ico|robots.txt)$ {
            access_log off;
            log_not_found off;
    }

    error_page  404 = /index.php;   

    # 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;
    #}

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
    #   # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        #fastcgi_param  SCRIPT_FILENAME /var/www/vhosts/domain.lt/httpdocs/index.php;
        include fastcgi_params;
    }

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    location ~ /\.ht {
        deny all;
    }

    location ~* \.(css|js|jpeg|jpg|gif|png|ico|xml)$ {
         access_log off;
         expires 30d;
    }
}

and finally error itself:

2013/02/03 01:52:13 [error] 12293#0: *29 open() "/var/www/vhosts/domain.lt/httpdocs/daiktai/kategorija/slaugos-ir-higienos-priemones/page/147" failed (2: No such file or directory), client: 66.249.75.237, server: domain.lt, request: "GET /daiktai/kategorija/slaugos-ir-higienos-priemones/page/147 HTTP/1.1", host: "www.domain.lt"

as you can see nginx considers every rewrite as a file entry, which of course – doesn’t exists. How can I fix this problem? web page actually works great without rewrites.
My question would be: how to remove these errors from error.log and do I need to convert that htaccess file to nginx rewrites? if so can you please convert it? I tried some online converters – RewriteCond and RewriteRule completely ignored.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T05:11:04+00:00Added an answer on June 18, 2026 at 5:11 am

    found solution:

    this whole part is wrong

     location / {
            if (-f $request_filename) {
                    root /var/www/vhosts/domain.lt/httpdocs;
                }   
        }
    

    I just added this to server

     try_files $uri $uri/ /index.php;
    

    and this to location ~ \.php$

        try_files $uri =404;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_script_name;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There's a Rails 3.2.3 web application which doesn't use any database. But in spite
There is a directed graph having a single designated node called root from which
There are two intents on the receiver side which are called from the same
That's pretty much it. I'm using Nokogiri to scrape a web page what has
There are 2 different article types: post(blog) and page in Octopress. What if I
There's a webpage with something annoying on it which I'd like to hide every
There is a properly formatted text in Html textarea which looks like : As
There are many free online services which provides you with large spaces to store
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
there's a php scripts which create multiple <p>text</p> elements due to user's query. I'd

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.