picocms / Pico

Pico is a stupidly simple, blazing fast, flat file CMS.
http://picocms.org/
MIT License
3.82k stars 616 forks source link

can't make pico work in a subfolder #193

Closed the-drunk-coder closed 9 years ago

the-drunk-coder commented 9 years ago

So, i installed pico in a subfolder (also, in my root folder, no difference), and when i call the folder like:

'www.mydomain.com/pico'

i always get a 404.

Calling

'www.mydomain.com/pico/index'

works fine.

I've tried setting the base url in config.php, no success. Setting the DirectoryIndex in .htaccess either.

Any ideas ? In contrast to the related issues i read, subpages/folders work fine ...

the-drunk-coder commented 9 years ago

Hmm, starting again from scratch in the root folder, things work out well ... strange ...

lf94 commented 9 years ago

Yes, I had the same issue. There were a couple of things that had to be corrected.

On debian sid:

  1. Went into /etc/apache2.conf and added AllowOverride all to /var/www/ Directory section.
  2. a2enmod rewrite
  3. service apache2 restart
  4. Go to your Pico CMS installation. Make sure you have the .htaccess file! It is NOT INCLUDED WITH THE .zip FILE. If you don't have it, copy it from https://github.com/picocms/.
  5. Now this is the step that really shot me in the foot. At this point you should be getting 403 errors. I did a chmod -R 777 to my folder, but you are better off handing your Pico CMS folders over to the apache user. Do chown -R www:www /your/pico/installation/folder.

I hope the maintainers post a guide for others, I spent 2 hours just scratching my head wondering why it wasn't working correctly. Never had this issue with Kirby CMS, another flat file based CMS.