Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Install in subdirectory but serve from web root

Solved by pamtbaau View solution

Started by waynedpj 7 years ago · 2 replies · 1572 views
7 years ago

ahoy all,

i am trying to install Grav into a "grav" subdirectory of the web server's root "public_html" (i.e. /public_html/grav/) but have Grav working as if it is indeed in the root folder. the end goal is to have Grav transparently serving from the root folder of the domain.xyz while located in its subdirectory.

thus to achieve this i have:

while i do end up with Grav transparently serving from the root folder, i can no longer access the admin panel: i can reach it at domain.xyz/admin but logging in just returns me to the same page.

since this is usually done entirely with htaccess magic, is there something Grav specific that i am missing?

thanks, w

last edited 12/28/19 by waynedpj
7 years ago Solution

@waynedpj, Never tried it myself, but there is a document page on this: Change the site URL

Not sure if you've already read that...

7 years ago

thank you @pamtbaau i just must have kept missing the single page that had exactly what i was looking for ;)

for visitors from the future, my attempt was almost there, it just was missing the following key in user/config/system.yaml:

YAML
session:
  path: /

thanks again.

Suggested topics

Topic Participants Replies Views Activity
Installation & Hosting · by jeremycherfas, 1 week ago
1 127 1 week ago
Installation & Hosting · by motorambler, 3 weeks ago
8 403 2 weeks ago
Installation & Hosting · by antoinep, 3 months ago
8 969 3 months ago
Installation & Hosting · by Jürgen Dietrich, 10 months ago
0 628 10 months ago
Installation & Hosting · by rappluk, 11 months ago
0 671 11 months ago