Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Nginx location and admin plugin

Started by Muut Archive 10 years ago · 2 replies · 407 views
10 years ago

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"?.

10 years ago

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'.

10 years ago

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.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1362 9 years ago
Archive · by Muut Archive, 9 years ago
2 940 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2959 9 years ago
Archive · by Muut Archive, 9 years ago
3 1124 9 years ago