codeigniter - not work nginx+codigniter configuration -
i using nginx + codigniter server configure server using guide http://www.farinspace.com/codeigniter-nginx-rewrite-rules/
my current configure follow
server { server_name 165.225.139.129; root /usr/share/nginx/html; access_log /var/log/nginx/example.com.access.log; index index.html index.php index.htm; # enforce no www if ($host ~* ^www\.(.*)) { set $host_without_www $1; rewrite ^/(.*)$ $scheme://$host_without_www/$1 permanent; } # canonicalize codeigniter url end points # if default controller other "welcome" should change following if ($request_uri ~* ^(/home(/index)?|/index(.php)?)/?$) { rewrite ^(.*)$ / permanent; } # removes trailing "index" controllers if ($request_uri ~* index/?$) { rewrite ^/(.*)/index/?$ /$1 permanent; } # removes trailing slashes (prevents seo duplicate content issues) if (!-d $request_filename) { rewrite ^/(.+)/$ /$1 permanent; } # removes access "system" folder, allows "system.php" controller if ($request_uri ~* ^/system) { rewrite ^/(.*)$ /index.php?/$1 last; break; } # unless request valid file (image, js, css, etc.), send bootstrap if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?/$1 last; break; } # set expiration of assets max caching location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ { expires max; log_not_found off; } location / { # check if file exists, or route index.php. try_files $uri $uri/ /index.php; } location /phpmyadmin { root /usr/share/nginx; index index.php index.html index.htm; location ~ ^/phpmyadmin/(.+\.php)$ { try_files $uri =404; root /usr/share/nginx/; fastcgi_pass 127.0.0.1:9000; # fastcgi_param https on; # <-- add line fastcgi_index index.php; fastcgi_param script_filename $document_root$fastcgi_script_name; include /etc/nginx/fastcgi_params; } location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { root /usr/share/nginx/; } } location ~* \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_split_path_info ^(.+\.php)(.*)$; include fastcgi_params; fastcgi_param script_filename $document_root$fastcgi_script_name; } }
what wrong in configuration
my sample url http://example.com/vts/index.php/sessions/login
Comments
Post a Comment