Forum
localhost website not quite correct
Hi,
I've created a local version of my Runway website in MAMP in folder iconwww. I have changed config.local.php to point to my database.
When I try to access localhost/iconwww I just get a directory listing. When I access localhost/iconwww/www I can see a version of my website but it's not correct - default content is shown.
I'm not sure how to access the dashboard. This is config.local.php: <?php
define('PERCH_SITEPATH', '/home/iconwww/public_html');
define('PERCH_SCHEDULE_SECRET', 'xgZbP6h2kWrJb5tZ');
define('PERCH_DB_USERNAME', 'root');
define('PERCH_DB_PASSWORD', 'root');
define('PERCH_DB_SERVER', "localhost");
define('PERCH_DB_DATABASE', 'iconwww_perch');
define('PERCH_DB_PREFIX', 'perch2_');
There must be another setting I need to change - please help.
You need to set your
public_html
folder as the root of the virtual host, not as a subfolder.So are you saying that public_html just goes in htdocs for mamp? Do I change config.local.php to just have /public_html for the sitepath? Also the homepage I'm getting displayed at the moment is index.html instead of home.php which is my homepage - will changing the root fix that?
I'm not sure how your Mamp configuration is laid out, so I can't give specific direction there.
public_html
should be the root of your site - you're going to run into issues trying to run the site in a subfolder.Sorry I'm a bit of a newbie here so please bear with me - your help is really appreciated. I'm trying to make a local version of an existing site so I can test out some urgent changes.
Ok - I've installed xampp and put public_html in the htdocs folder (as I only want one installation at the moment).
I've changed config.local.php to have define('PERCH_SITEPATH', '/public_html'); (Is that correct?) and I've commented out header('Location: '.$uri.'/dashboard/'); in index.php in htdocs.
I've also set up my database in mysql and changed config.php to have the correct access details.
When I type in localhost I just get a blank screen - what have I done wrong?
What's in your error log?
https://solutions.grabaperch.com/development/why-am-i-getting-a-blank-page