Welcome Guest, Not a member yet? Register   Sign In
Nginx config
#1

[eluser]kezman[/eluser]
Hey everyone!
I have Apache on my local site.
I have Nginx on my live site.

I have Apache .htaccess

Code:
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond $1 !^(index\.php|css|images|robots\.txt|css)
    RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>

How should I configure nginx?

Now my live site works only for http://example.com/.
Other URLs like http://example.com/abc/def/1 produce "nginx - not found" error.
#2

[eluser]CroNiX[/eluser]
Did you create a config file for nginx for your project? If you google "nginx+codeigniter" you will find some to try out.
#3

[eluser]Abel A.[/eluser]
Here's my nginx config

Code:
server {
    server_name mysite.com www.mysite.com;
    root /home/abel/public_html;
    index index.php index.html index.htm;

    location / {
        try_files $uri $uri/ /index.php;
    }

    include php;
    access_log off;
}

The CI stuff is just in the location segment, the rest is standard.




Theme © iAndrew 2016 - Forum software by © MyBB