This is my first time using nginx and I'm having some problems configuring an nginx.conf file. What I have is
server {
location ~ /(application|system) {
deny all;
return 404;
}
rewrite ^(.*)$ /index.php/$1 break;
}
In case it's not clear; I'm trying to block access to the directories application and system and rewrite all other requests to the index.php. I've tried validating the nginx.conf file using: ian@ubuntu:~$ sudo nginx -t -c path_to_conf_file but get [emerg]: unknown directive "server".... Any ideas what I might be doing wrong?