wardrobecms / wardrobe-archived

A minimal blogging application
http://wardrobecms.com/
MIT License
705 stars 111 forks source link

Nginx rewrite #24

Closed 013 closed 10 years ago

013 commented 10 years ago

Since I do not use Apache, /install gave me a 404 and .htaccess does not work with nGinx, so I had to modifie my config to look something like:

    location / {
             try_files $uri $uri/ /index.php;
    }
    location ~ \.php$ {
            try_files $uri @missing;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
    }
    location @missing {
            rewrite ^ /index.php;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
    }

Just thought this would be useful for other nGinx users.

ericlbarnes commented 10 years ago

Thanks. This would probably be useful to add to our docs - https://github.com/wardrobecms/docs