Forum

Thread tagged as: Question, Problem, Runway

Homepage loading directory on Runway install + newly created pages give 404 erro...

I have Perch Runway running on XAMPP on Mac, all looks good. Runway is installed and I can log in. I see the home and error/404 pages that the videos mention Runway will create automatically exist. I went ahead and loaded some folders/files in from the static version of the site I have already created (you can see css, js, video... I'm guessing those will need to move eventually) and I also loaded some static html pages into cms/templates/pages/

[note I have renamed 'perch' to 'cms']

However when I try to actually go to the homepage, I see Index of / instead. Screenshot:

alt text for image

I have no idea why this is happening, and I'm very new to Master Pages in Runway. I've read all the documentation and feel I must be missing something crucial.

Here's my short diagnostic:

Perch Runway: 2.8.26, PHP: 5.6.15, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 3c688b6bbc30d36af3ac34fdd4b7b5b787fe5555 $, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (2.8.26), assets (2.8.26), categories (2.8.26)
App runtimes: <?php $apps_list = array( 'content', 'categories', );
PERCH_LOGINPATH: /cms
PERCH_PATH: /Users/lindsaymasten/Websites/taylorsyfan/cms
PERCH_CORE: /Users/lindsaymasten/Websites/taylorsyfan/cms/core
PERCH_RESFILEPATH: /Users/lindsaymasten/Websites/taylorsyfan/cms/resources
Image manipulation: GD
PHP limits: Max upload 128M, Max POST 128M, Memory: 128M, Total max file upload: 128M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
HTTP_HOST: taylorsyfan.local
DOCUMENT_ROOT: /Users/lindsaymasten/Websites/taylorsyfan
REQUEST_URI: /cms/core/settings/diagnostics/
SCRIPT_NAME: /cms/core/settings/diagnostics/index.php

ETA I have done a little more testing and when I attempt to create new pages inside Perch, they appear to create from within the CMS but result in a 404 error in the browser. The 404 is a browser 404 (not Perch's 404).

Lindsay Masten

Lindsay Masten 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you have the rewrite rules in place?

https://docs.grabaperch.com/runway/installing/rewrites/

Hi Drew, I do. Initially I copy-and-pasted the Apache rules into .htaccess from the Runway install, then I hunted through these forums and tried this:

# Perch Runway
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/cms 
RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /cms/core/runway/start.php [L] 

Still no go. I've also tried completely uninstalling and re-installing. Everything appears to work—I can access the admin, I see the files/folders where they seem like they should be—but / takes me to the directory listing and if I try to go to the Perch-created 404 page it gives me a browser 404 instead. :(

I also noticed that when Runway set up it didn't create regions like it did in the example video.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you have mod_rewrite enabled?

I think so. Here's what I have in my httpd.conf file:

<Directory "/Applications/XAMPP/xamppfiles/apache2/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
Drew McLellan

Drew McLellan 2638 points
Perch Support

To check if mod_rewrite module is enabled, create a new php file in your root folder of your WAMP server. Enter the following

phpinfo();

Access your created file from your browser.

Ctr+lF to open a search. Search for 'mod_rewrite'. If it is enabled you see it as 'Loaded Modules'

If not, open httpd.conf and look for the following line.

#LoadModule rewrite_module modules/mod_rewrite.so

Remove the pound ('#') sign at the start and save the this file.

Restart your apache server.

Access the same php file in your browser.

Search for 'mod_rewrite' again. You should be able to find it now.

Thanks Drew, I did as you suggested and I do see mod_rewrite in the loaded modules. See screenshot:

alt text for image

Unfortunately the project is still only loading the directory in the browser. I really appreciate the help. This project has a tight deadline and I did not think I'd have this much trouble with setup.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

This seems to be a Xampp issue. Have you contacted their support?

Hi Rachel, Drew, thanks for trying to help. I agree it seems like an issue with XAMPP. Because of my tight timeline I ended up just moving development to a more 'typical' hosted server environment, foregoing local dev for now. I'll try it again when I'm not trying to get things done quickly. Thanks again.