Nginx location and admin plugin

Hi, I’m very very new to web development, and I have the following “weird” behaviour. I’m using nginx and my web root is /var/www/html and I have a subfolder /portfolio with a grav skeleton, and in my nginx config, I have a location block for /portfolio/ pointing to a new root /var/www/html/portfolio. Working fine, however when I access www.mypage.com/portfolio/admin, I see a very weird looking admin panel, basically it’s a mostly text version, like it couldn’t find some resources. Possibly this has to do with this nginx statement: “/portfolio/index.php?_url=$uri;”, which contains /portfolio/admin in the $uri parameter, where it should only be “admin”?.

Are you using a modified version of the webserver-configs/nginx.conf file that Grav comes with? That should work fine.

Alternatively if your a beginner, you might want to just use Apache as you don’t need to configure any virtual hosts, the included .htaccess will ‘just work’.

Yes, I based my config on that example config. I’m in general more familiar with nginx than Apache, and like it better somehow. I however changed the config (the location /portfolio/) part, AFTER I installed the admin plugin, while it was all still at the true root.