Jump to content

Installing on Mac Localhost going all sorts of wrong


MishieMoo
 Share

Recommended Posts

Okay so I'm trying to set this up on my Mac localhost. It's in the localhost/~michele/process/ directory (and no, it cannot be in the root directory). The front page is missing all of the resources, and I can't seem to find the admin login. All links point to localhost/link instead of the correct location.

I also tried editing the RewriteBase in the .htaccess but nothing seems to change this  ???

Please let me know how to get this working properly.

Link to comment
Share on other sites

Hi Michelle,

welcome to the forums.

As for your problems – as most of CMS, this one too should be installed in root directory of domain. If you use Mac OS X SL apache, you can solve your problems by creating virtual hosts. You can do this either by hand (that does get tedious if you have more than one) or by other programs:

Now, if you've configured everything correctly (and it isn't very hard ;), you should be able to visit 'localhost/-michelle/processwire/' under whatever virtual name you gave it (e.g. portfolio.local)

I personally set every domain I work on as 'ldomain-name.dev', so if I want to go to original domain, it doesn't pop-up in history as more often visited one ;)

Link to comment
Share on other sites

Adam has good suggestions, but I just wanted to correct on one point. ProcessWire doesn't care whether it's run from the root of a domain or a subdirectory. It should not matter. I run most of mine from subdirectories on my local machine.

What I am wondering is if the "~" might be a problem, as ProcessWire does not allow that character in URLs. Though I can tell you what to change to allow it (it's in the /.htaccess file). I'm just not certain if that's applicable here since the ~michele dir isn't managed by PW.

But if you want to give it a try, edit your /.htaccess file, and replace line 29 by adding the "~" character in it:

RewriteCond %{REQUEST_URI} "^[-_.a-zA-Z0-9/~]*$"

Note I added it right before the closing "]" bracket.

If that doesn't help, then try editing your /index.php file and change this line (line #38):

$rootURL = isset($_SERVER['HTTP_HOST']) ? substr($rootPath, strlen(rtrim($_SERVER['DOCUMENT_ROOT'], '/'))) . '/' : '/';

To this:

$rootURL = "/~michele/process/"; 

Also add the "localhost" part if that is actually part of the address that appears in your browser bar. I'm assuming that is there as a hostname though, in which case it doesn't need to be included.

If that solves it, let me know. This is a known, but rare issue, and I'd like someone to test a fix.

Link to comment
Share on other sites

Hey Ryan, thanks for the tips. Changing the line to /~michele/process/ did the trick! But now my admin panel 404's. It's just supposed to be /admin, correct? Edit: Turns out none of the links work now...but all the resources show up fine.

Thanks for the MAMP suggestion. If I start doing more PHP development I'll definitely download it!

Link to comment
Share on other sites

The admin is actually /processwire/ by default.

But if you are getting 404s for all the links, that means mod_rewrite probably isn't active/installed with your apache. Mod_rewrite is something you'll find on almost all web hosting accounts, but probably not on a standard os x web server, which I'm guessing is fairly stripped down. I'd say install mamp and you'll never look back... Takes about 2 mins to install, and will set you up with an environment consistent to what you'd find on a web host. ProcessWire requires mod_rewrite, but not all cms's do. Though all will be much better off with it, as you'll be stuck with ugly urls without it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...