Do the RSS Feed and Sitemap plugins work with the PHP development server?
Hello...
I'm trying out Bludit.
I'm running locally, using the PHP development server.
I've enabled the RSS Feed and Sitemap plugins.
When I visit http://localhost:8044/rss.xml I get:
"The requested resource /rss.xml was not found on this server."
When I visit http://localhost:8044/sitemap.xml I get:
"The requested resource /sitemap.xml was not found on this server."
I see the generated files under `bl-content/workspaces/rss` and `bl-content/workspaces/sitemap`; they just aren't served.
Am I doing something wrong?
Does the PHP development server not support serving those files for some reason?
Would I need to do something special on my Apache-based host to make them work?
Thanks,
Michael
P.S. I see that `robots.txt` isn't served either:
"The requested resource /robots.txt was not found on this server."
I'm trying out Bludit.
I'm running locally, using the PHP development server.
I've enabled the RSS Feed and Sitemap plugins.
When I visit http://localhost:8044/rss.xml I get:
"The requested resource /rss.xml was not found on this server."
When I visit http://localhost:8044/sitemap.xml I get:
"The requested resource /sitemap.xml was not found on this server."
I see the generated files under `bl-content/workspaces/rss` and `bl-content/workspaces/sitemap`; they just aren't served.
Am I doing something wrong?
Does the PHP development server not support serving those files for some reason?
Would I need to do something special on my Apache-based host to make them work?
Thanks,
Michael
P.S. I see that `robots.txt` isn't served either:
"The requested resource /robots.txt was not found on this server."
I'm on a Mac.
As I said, I see the generated files. They just aren't being served by Bludit.
Maybe the expectation is that, as actual files, they'd be served directly by Apache?
The problem is that the generated files aren't in the root. I'd need to map logical paths to physical paths to get Apache to serve them. There aren't any such mappings in the default `.htaccess` though; that's why "served directly by Apache" didn't actually make sense to me.
If you think this *should* work using the PHP server, I can dig further. I just didn't want to waste time digging into an unsupported config.
Michael
As I said, I see the generated files. They just aren't being served by Bludit.
Maybe the expectation is that, as actual files, they'd be served directly by Apache?
The problem is that the generated files aren't in the root. I'd need to map logical paths to physical paths to get Apache to serve them. There aren't any such mappings in the default `.htaccess` though; that's why "served directly by Apache" didn't actually make sense to me.
If you think this *should* work using the PHP server, I can dig further. I just didn't want to waste time digging into an unsupported config.
Michael
- Edi
- Site Admin
- Posts: 3163
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 65 times
- Been thanked: 90 times
- Contact:
At the moment I have no local Mac installation. But it works on my websites. For example at
https://planet-bludit.ch/sitemap.xml
OK, I dug into this a bit.
My conclusion is that the built-in web server won't work correctly without additional support.
The built-in web server is described here: https://www.php.net/manual/en/features. ... server.php.
It has very specific default behaviour.
You can change the default behaviour by passing a "router script" on the command-line, like this:
`php -S localhost:8000 router.php`
Here is `router.php` for Grav, another flat-file CMS: https://github.com/getgrav/grav/blob/de ... router.php
Here is `router.php` for Kirby, another flat-file CMS: https://github.com/getkirby/kirby/blob/main/router.php
Kirby's `router.php` is just 14 lines long. If I a) add it to Bludit and b) pass it on the command-line, the built-in server works as expected.
In other words, it serves `/robots.txt`, `/sitemap.xml`, etc.
My conclusion is that the built-in web server won't work correctly without additional support.
The built-in web server is described here: https://www.php.net/manual/en/features. ... server.php.
It has very specific default behaviour.
You can change the default behaviour by passing a "router script" on the command-line, like this:
`php -S localhost:8000 router.php`
Here is `router.php` for Grav, another flat-file CMS: https://github.com/getgrav/grav/blob/de ... router.php
Here is `router.php` for Kirby, another flat-file CMS: https://github.com/getkirby/kirby/blob/main/router.php
Kirby's `router.php` is just 14 lines long. If I a) add it to Bludit and b) pass it on the command-line, the built-in server works as expected.
In other words, it serves `/robots.txt`, `/sitemap.xml`, etc.