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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Installation & Hosting

Install in subdirectory but serve from web root

Solved by pamtbaau View solution

Started by waynedpj 6 years ago · 2 replies · 1319 views
6 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
6 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...

6 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 antoinep, 1 day ago
7 104 7 hours ago
Installation & Hosting · by Jürgen Dietrich, 7 months ago
0 91 7 months ago
Installation & Hosting · by rappluk, 8 months ago
0 91 8 months ago
Installation & Hosting · by N, 12 months ago
3 76 12 months ago
Installation & Hosting · by Youle, 1 year ago
1 65 1 year ago