Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2008-06-03 20:58:24

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Creating local root relative schemes with Textpattern Solutions book

biggles, did you add mysite.dev to your hosts file (/etc/hosts)?

Offline

#14 2008-06-04 05:26:38

biggles
Member
Registered: 2007-10-11
Posts: 24

Re: Creating local root relative schemes with Textpattern Solutions book

Yes, it looks like this at the bottom:-

127.0.0.1 localhost kblog.dev
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost

Offline

#15 2008-07-01 15:48:59

gesiwuj
Member
Registered: 2008-07-01
Posts: 20

Re: Creating local root relative schemes with Textpattern Solutions book

I’ve had the same problem, but I seem to have fixed it. Basically, I have the example.dev virtualhost in both the normal httpd.conf and that weird vhosts one that Jim has…. and I took out the localhost one. Now, this means when I visit “localhost” it does the same thing, but at least it works :)

Offline

#16 2008-07-25 05:01:42

luike2
New Member
Registered: 2008-07-25
Posts: 1

Re: Creating local root relative schemes with Textpattern Solutions book

Before I move on with my Textpattern installation, just wanted to say thank you!

The removal of the localhost virtual server worked for me! I’m running MAMP + Mac OSX 10.5.4.

Offline

#17 2008-07-25 07:45:39

lister
Member
Registered: 2008-02-13
Posts: 76

Re: Creating local root relative schemes with Textpattern Solutions book

Here is my setup in OSX10.4.11:

EDIT
mamp prefs/Apache :
/Users/ (your username) /Sites

——————————————————————————-

EDIT
mamp /conf/apache folder / httpd.conf

NameVirtualHost 127.0.0.1
<VirtualHost localhost>
ServerName localhost
DocumentRoot "/Users/ (your username) /Sites"
</VirtualHost>
<VirtualHost example.dev>
ServerName example.dev
DocumentRoot "/Users/ (your username) /Sites/example.dev"
</VirtualHost>
<VirtualHost mynewwebsite.dev>
ServerName mynewwebsite.dev
DocumentRoot "/Users/ (your username) /Sites/mynewwebsite.dev"
</VirtualHost>

———————————————————————————————-

EDIT
(your mac name) /etc / host

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1	localhost example.dev mynewwebsite.dev
255.255.255.255	broadcasthost
::1             localhost 

————————————————————

Its not for Leopard its Tiger, but it may help..

rob

Last edited by lister (2008-07-25 07:46:12)

Offline

#18 2008-07-30 05:28:13

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

Re: Creating local root relative schemes with Textpattern Solutions book

I also had trouble setting this up— it may be because I was using a newer version of MAMP than the one referenced in the text. But I got it to work. My setup is similar to lister’s but my httpd.conf file uses a slightly different format, which I came to through some trial, error, and research:

  1. I modified the MAMP preferences as indicated in Solutions.
  2. I modified the /etc/hosts file as indicated by lister, above.
  3. I modified the /Applications/MAMP/conf/apache/httpd.conf as below.
NameVirtualHost *:80

<VirtualHost *:80>
	ServerName localhost
	DocumentRoot /Users/{username}/sites
</VirtualHost>

<VirtualHost *:80>
	ServerName example.dev
	DocumentRoot /Users/{username}/sites/example.dev
</VirtualHost>

Oh, and like lister, I’m also using 10.4.11.

When I add a new site, I just add it’s name to the hosts file at the end of the line that begins with 127.0.0.1 localhost. Then I just add a new code block to the httpd.conf file:

<VirtualHost *:80>
	ServerName newsite.dev
	DocumentRoot /Users/{username}/sites/newsite.dev
</VirtualHost>

I hope this helps!

Offline

#19 2008-07-30 05:57:59

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Creating local root relative schemes with Textpattern Solutions book

For anyone else who stumbles across this thread: Custom MAMP (for 10.5). For 10.4, you just need to change the paths to /etc/httpd instead of /etc/apache2 and grab 10.4 compatible downloads.

Offline

#20 2008-08-05 07:55:24

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: Creating local root relative schemes with Textpattern Solutions book

I’m not sure if I am correct here – but using Mamp I don’t even use the server installed on the mac, I use the one which comes with Mamp.

This means that my root path is: /Applications/MAMP/htdocs/path-to-folder

Offline

#21 2008-08-05 13:49:34

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

Re: Creating local root relative schemes with Textpattern Solutions book

That’s right, but you can change the root folder in MAMP preferences:

  1. With MAMP in focus, press command-comma and select the “Apache” tab.
  2. Choose the “Select” button to file browse and pick a directory. I use /Users/{username}/Sites.

In addition to being a logical place to keep my local web documents, this also prevents me from accidentally overwriting everything if I upgrade MAMP.

Offline

#22 2008-11-05 09:47:05

stevenbhn
New Member
Registered: 2008-11-05
Posts: 2

Re: Creating local root relative schemes with Textpattern Solutions book

Hi textpattern enthusists,

I have been reading through all the posts in this thread with a fine comb changing my own files to suit the solutions to the same problem “biggles” has or had. I still haven’t managed to sort the problem out though.

My site is stored at /Users/s_gardner/Sites/twoscomp.dev

I am using Mac OS X 10.5.5

and MAMP 1.7.2

My MAMP Settings
ports apache: 80, Mysql 3306
Document Root /Users/s_gardner/Sites

My Hosts file
127.0.0.1 localhost twoscomp.dev

My MAMP apache httpd.conf file

NameVirtualHost 127.0.0.1

<VirtualHost localhost>
ServerName localhost
DocumentRoot /Users/s_gardner/Sites
</VirtualHost>

<VirtualHost twoscomp.dev>
ServerName twoscomp.dev
DocumentRoot /Users/s_gardner/Sites/twoscomp.dev
</VirtualHost>

My etc apache httpd-vhosts.conf file

<VirtualHost localhost>
# Set http://localhost = http://localhost/twoscomp.dev
DocumentRoot /Users/s_gardner/Sites
ServerName localhost
</VirtualHost>

<VirtualHost localhost>
DocumentRoot /User/s_gardner/Sites/twoscomp.dev
ServerName twoscomp.dev
</VirtualHost>

All help to get my local setup working correctly would be gratfully appreciated.

Thanks

Steven Gardner

Offline

#23 2008-11-05 12:05:08

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: Creating local root relative schemes with Textpattern Solutions book

maybe this will help:
http://discuss.joyent.com/viewtopic.php?id=16828

Although be warned I am using the above method and cant get rss db admin working locally for love nor money. So then you have to deal with php my admin.


its a bad hen that wont scratch itself.
photogallery

Offline

#24 2008-11-05 12:49:06

stevenbhn
New Member
Registered: 2008-11-05
Posts: 2

Re: Creating local root relative schemes with Textpattern Solutions book

Thanks but i took the wimps way out and bought MAMP PRO. It does all that stuff automaticly. easy peasy.

Thanks anyway.

Offline

Board footer

Powered by FluxBB