This is my first time using nginx and I am having trouble setting up the nginx.conf file. I have
server { location ~ /(application|system) { deny all; return 404; } rewrite ^(.*)$ /index.php/$1 break; }
If this is not clear; I am trying to block access to the application and the directory system and rewrite all other requests in index.php. I tried to check the nginx.conf file using: ian@ubuntu :~$ sudo nginx -t -c path_to_conf_file , but we get [emerg]: unknown directive "server"... Any ideas what I can do wrong?
source share