sorry if this is a repeat, please just link me if so.
this is my first time setting up nginx. (its under virtualmin and debian)
it serves php fine, such as index.php
but the url index.php/page/Gallery.html returns 404
im guessing it can't decipher the request string but not sure what to do about it
i dont believe in that form it is using rewrite (something i will setup once i get without working)
its nginx/0.7.67 and the error log message is:
2013/01/13 16:19:47 [error] 5170#0: *123 open() "/public_html/index.php/page/Profile.html" failed (20: Not a directory), client: ip, server: .com.au, request: "GET /index.php/page/Profile.html HTTP/1.1", host: ".com.au", referrer: "http://.com.au/"
THANKS !
edit: add conf:
server {
server_name ....com.au www.....com.au;
listen 118.8...;
root /home/.../public_html;
index index.html index.htm index.php;
access_log /var/log/virtualmin/....com.au_access_log;
error_log /var/log/virtualmin/....com.au_error_log;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME /home/.../public_html$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT /home/.../public_html;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass localhost:9000;
}
}
/public_html/index.php/page/Profile.html
as a folder structure but it knows thatindex.php
is a file hence the error. You need to rewrite everything to the right ofindex.php
to be passed as a query string. Are you using a framework? – SLD Jan 14 '13 at 23:02