Unable to write to logs file (when hosted)

Hi,

I’ve been considering using Grav for a website rewrite and think it will suit but the hosting company I use cannot provide write access to an already provided ‘Logs’ folder using a Shared Hosting package (there is an option to migrate to a dedicated server package but it’s a low traffic site and not sure it’s worth the extra £). Is there an option to configure the destination for the Logs e.g. rewrite the directory name? I suspect not, but thought I’d ask …

Thanks

Hi @sahumphreys,

first, the installation on a shared hosting platform might not work, because of restrictions. You might check out the different options your hoster offers → the more you pay, the better the results.

Okay, don’t your hoster offer an option where you can set which domain should use a specific folder? So the gravs logs folder wouldn’t clash with the exsisting one. Do you need to install grav into the root folder?

Otherwise you could install grav in a subdirectory of your root and then connect it with your domain.

Like this, domain A point to the folder Domain-A, so the hoster specific Logs folder is separated from the grav installation.
`
Domain-A/
├── assets
├── backup
├── bin
├── cache
├── composer.json
├── composer.lock
├── images
├── index.php
├── logs
├── now.json
├── robots.txt
├── system
├── tmp
├── user
├── vendor
└── webserver-configs.
.
.
Logs/

`

Best regards.

1 Like

Many thanks - good call, not sure why I didn’t think of that! I’ve done that and now just need to work how to access the admin panel and internal links from there.

Sadly that solution did not work … the homepage for the site loaded fine but navigating to other pages just produced a 500 server area, so hard to track down.

I’m wondering if the routes to the paths are somehow expecting not to be called from within a subdirectory? Or, is .htaccess to blame here …?

The cookbook. I tried that as well, with the same result …

Pity, I may have to give up on Grav, but I can’t imagine this is an unusual scenario …?

Hello @sahumphreys,

I guess this is not a grav related problem. You might seek help to configure your webspace. I run serveral grav installations on the same shared webspace, even subdomains etc., with out any problems. And never had to change the .htaccess.

Maybe your hoster can support yu with this.

Best regards! Don’t give up!

Thanks, they’re not being entirely helpful unfortunately, but it’s odd as I set the shared webspace to a directory, home page loads fine but other pages cannot be found. Is there any routing configuration inside Grav that establishes the directory hierarchy?