404 Error

I have installed the skeleton for twenty in my root directory on amazon in an EC2 instance running nginx. When I go to the homepage it all loads correctly however, when I go to any of the other pages it does not load and comes up with a 404 Error. If there is any more information I need to provide could you please let me know.

does the .htaccess exist in root?

Actually nginx can’t pick up apache .htaccess files, you need to configure the nginx virtual host so it can route. The grav install provides a pretty detailed nginx.conf file, but a simple version is:

server {
        #listen 80 default_server;
        index index.html index.php;
        root /home/pi/www/blog;

        server_name localhost;

        location / {
                try_files $uri $uri/ /index.html;
                if (!-e $request_filename){ rewrite ^(.*)$ /index.php last; }

        location ~ \.php$ {
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params; 
                fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;

Thankyou for the help. Did not know you had to configure the nginx.conf.

Yes, it’s the only reason I don’t run nginx in development, as it’s just really convenient to drop multiple grav sites into one directory and have the .htaccess files get picked up automatically for their routing. Would require manual setup of many virtualhost configurations for nginx.