Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-11-11 13:52:55

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Localhost on OSX - URL's

Playing around with a TXP install on my OSX localhost – everything fine except I get 404 errors all the time, seems like I have to change a setting in .htaccess or somewhere else to get the linking system going.

TXP admin is fine, its only the site itself that does not work. Front page of the site is ok, just any link will not be found. I switched to messy URL’s but did not work. All diagnostics pass.

Someone have a quick tip on getting this to work?

Offline

#2 2006-11-11 15:21:12

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: Localhost on OSX - URL's

Somewhere in your Apache config file is this:

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "C:/var-www">

Right under the Directory brackets, your directory name will be different, look for:

#
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride All

Mine is set to All, it’s usually set to None

Offline

#3 2006-11-11 15:33:40

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Localhost on OSX - URL's

Ok, I will try that once I figure out where the Apache config file is!

Offline

#4 2006-11-11 16:12:07

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Localhost on OSX - URL's

Mmm. Changing that line (then rebooting to restart Apache) did not work for me. Anything in particular should be in the .htaccess file in the TXP folder?

TXP 4.04 by the way.

I changed the .htaccess file to remove the comment from the rewrite base line:
RewriteBase /Users/myname/Sites/txp/

Which is the correct path.

Any ideas?

Offline

#5 2006-11-11 16:17:07

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: Localhost on OSX - URL's

This my .htaccess on my Windows XP machine:

#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#RewriteBase /relative/web/path/

<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteCond %{REQUEST_FILENAME} -f [OR]
 RewriteCond %{REQUEST_FILENAME} -d
 RewriteRule ^(.+) - [PT,L]

 RewriteRule ^(.*) index.php
</IfModule>

#php_value register_globals 0

Basically it’s the default one, didn;t change anything.

I’m not experienced with the services on OSX, but if you changed the Apache file then it should react to the .htaccess file and give you the correct urls.

Just one more thing to check:

LoadModule rewrite_module modules/mod_rewrite.so

Is the above line uncommented in the Apache config file?

Last edited by hcgtv (2006-11-11 16:18:41)

Offline

#6 2006-11-11 16:18:05

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: Localhost on OSX - URL's

If you use the one that ships with Tiger, look for those folders

/etc/httpd/httpd.conf
/private/etc/httpd/users/username.conf
/private/etc/httpd/users

regrds, marios

Last edited by marios (2006-11-11 16:20:17)


⌃ ⇧ < ⌃ ⇧ >

Offline

#7 2006-11-11 17:17:13

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Localhost on OSX - URL's

Thanks but none of that worked for me. I have:

-OSX 10.48 normal install
-TXP 4.04 in my Sites folder
-Messy URL’s in TXP prefs

Changed /private/etc/http/http.conf to the following:
  1. This controls which options the .htaccess files in directories can
  2. override. Can also be “All”, or any combination of “Options”, “FileInfo”,
  3. “AuthConfig”, and “Limit”
    # AllowOverride All

My .htaccess file:
DirectoryIndex index.php index.html
Options +FollowSymLinks
RewriteBase /Users/myname/Sites/txp/

<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

RewriteRule ^(.*) index.php </IfModule>

#php_value register_globals 0

I removed all the commented directives in the .htaccess file to try it out.

Last edited by jstubbs (2006-11-11 17:17:42)

Offline

#8 2006-11-11 17:39:33

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Localhost on OSX - URL's

Ok, I got it working now, but only with messy URL’s. I changed it to clean section/title link style, but get a 404 with that, so its still some sort of .htaccess issue. :-(

Offline

#9 2006-11-11 17:48:03

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: Localhost on OSX - URL's

Why don’t you try it with mamp ?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#10 2006-11-11 19:31:03

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Localhost on OSX - URL's

Thanks Colak – after half an hour I got TXP setup and running under Mamp! Thanks for the help everyone.

Previously (older versions of OSX) I used Marc Liyanage’s script over at http://www.entropy.ch/software/macosx/ – any opinions or comments as to the difference between MAMP and ML’s scripts?

Offline

#11 2006-11-13 17:52:18

Prax
Member
From: Huntsville, AL
Registered: 2006-09-27
Posts: 24

Re: Localhost on OSX - URL's

I don’t know a whole heck of a lot about Apache, but I did get it set up and running for local dev.

Here’s a couple of HOWTOs
http://maczealots.com/tutorials/textpattern/
http://textpattern.org/tutorials/113/textpattern-on-os-x

I don’t see this listed in either of the two HOWTOs above.

To have a local domain (ie. mydevsite.dev) not only do you need to set it up in httpd.conf you also need to add it with NetInfo Manager (in /Applications/Utilities). To do so, open that app, select machines in the 2nd column, select localhost in the third, then duplicate it and rename the duplicate to match your local dev domain name (ie. mydevsite.dev). Save. Reset Apache.

Although, for a while I did use MAMP. MAMP is great if you’re just dealing with a single site.

Offline

#12 2006-11-13 18:13:22

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Localhost on OSX - URL's

Thanks Prax. I did go for MAMP and its pretty easy so far. Does it not work so well with more than one site?

Will check out those tutorials when I get a chance.

Offline

Board footer

Powered by FluxBB