Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-05-29 06:35:20
- biggles
- Member
- Registered: 2007-10-11
- Posts: 24
Creating local root relative schemes with Textpattern Solutions book
Hi,
I’m new to Textpattern and I’m using the “Textpattern Solutions” book to set up a site locally on my Mac running Leopard and using Mamp and Textpattern 4.0.6. Everything is working well, except that I can’t seem to get the local root relative path working, despite configuring the “hosts” and “httpd.conf” files exactly as it says in the book.
It works if I enter “http://localhost/mysitename.dev/textpattern/setup/” but not if I omit the “localhost” from the address. If I install Texpattern using the “http://localhost/mysitename.dev/textpattern/setup/” address scheme, will it stop working if I get the relative path working later? And will this affect things when I port my site to a real host? Any ideas what I may have done wrong?
Thanks in advance, Biggles.
Offline
Re: Creating local root relative schemes with Textpattern Solutions book
With Leopard, you should add your virtual hosts to /apache2/extra/httpd-vhosts.conf. The format is a little different than pre-Leopard Apache (1.3?) – here’s what mine looks like:
NameVirtualHost *
<VirtualHost *>
# Set http://localhost = http://localhost/~jm/
DocumentRoot /Users/jm/Sites/
ServerName localhost
</VirtualHost>
<VirtualHost *>
DocumentRoot /Users/jm/Sites/projects/txp/site/
ServerName txp.dev
</VirtualHost>
Your httpd on your Mac won’t have any effect on your live host (unless you copy it to them).
Offline
#3 2008-05-29 18:56:29
- biggles
- Member
- Registered: 2007-10-11
- Posts: 24
Re: Creating local root relative schemes with Textpattern Solutions book
Hi Jim,
Many thanks for the quick response – unfortunately, I can’t seem to find the directory you mean. The only apache2 directory I have is in applications/MAMP/bin/ and there are only 2 alias inside apache2 – one for bin and one for logs, neither of which seem to contain a directory named extra or any file called httpd-vhosts.conf.
Sorry to be so dumb, but am I looking in the right place? I am using TextWrangler using ‘open hidden” to search for these items.
Thanks again, Biggles.
Offline
Re: Creating local root relative schemes with Textpattern Solutions book
Sorry, it’s /etc/apache2. I don’t use MAMP, but I imagine vhosts work the same. Check this out – came up in quick Googling.
Offline
#5 2008-05-29 19:30:27
- biggles
- Member
- Registered: 2007-10-11
- Posts: 24
Re: Creating local root relative schemes with Textpattern Solutions book
Sorry Jim, I have just found the right files and directories and followed your instructions, thanks.
But when I type http://kblog.dev into Safari, I’m still seeing the PHP 5.2.5 page and I have to put “localhost” before /kblog.dev to see my blog locally.
The code I put into httpd-vhosts.conf was as follows:-
NameVirtualHost *
<VirtualHost *>
# Set http://localhost = http://localhost/~stevekirkendall/
DocumentRoot /Users/stevekirkendall/Sites/
ServerName localhost
</VirtualHost>
<VirtualHost *>
DocumentRoot /Users/stevekirkendall/Sites/
ServerName kblog.dev
</VirtualHost>
My site path is /Users/stevekirkendall/Sites/kblog.dev. Any ideas why this might be failing?
Thanks, Biggles.
Offline
Re: Creating local root relative schemes with Textpattern Solutions book
Did you restart Apache from Terminal? If you change httpd.conf or httpd-vhosts.conf, you need to type the following into /Applications/Utilities/Terminal.app (just use Spotlight for it):
sudo apachectl restart
Offline
#7 2008-05-29 19:34:04
- biggles
- Member
- Registered: 2007-10-11
- Posts: 24
Re: Creating local root relative schemes with Textpattern Solutions book
Jim,
I think our messages must have crossed! I’ll follow the link you sent and see what I can do.
Many thanks again for your help.
Biggles.
Offline
Re: Creating local root relative schemes with Textpattern Solutions book
Good luck! Non-MAMP.app setups are a lot simpler, despite not being one-click installs. I’ll try to get a TextBook article up one of these days.
BTW, it’s “jm,” not “jim.”
Offline
#9 2008-05-29 19:48:25
- biggles
- Member
- Registered: 2007-10-11
- Posts: 24
Re: Creating local root relative schemes with Textpattern Solutions book
Sorry!
And thanks again jm!
Biggles.
Offline
#10 2008-05-30 22:41:42
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Creating local root relative schemes with Textpattern Solutions book
Does this help?
Offline
#11 2008-06-03 19:17:44
- biggles
- Member
- Registered: 2007-10-11
- Posts: 24
Re: Creating local root relative schemes with Textpattern Solutions book
Hi Mary,
Thanks for your answer. Unfortunately, the bottom of my httpd.conf (file path = /Applications/MAMP/conf/apache/) looks like this:-
NameVirtualHost 127.0.0.1
<VirtualHost localhost>
ServerName localhost
DocumentRoot “/Users/stevekirkendall/Sites”
</VirtualHost>
<VirtualHost kblog.dev>
ServerName kblog.dev
DocumentRoot “/Users/stevekirkendall/Sites/kblog.dev”
</VirtualHost>
Is this right? BTW, I still can’t see my site locally by using ‘http://mysite.dev/’ I still have to add ‘localhost’ ie. ‘http://localhost/mysite.dev/’ to view my site.
Offline
#12 2008-06-03 20:31:46
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Creating local root relative schemes with Textpattern Solutions book
I don’t think you need the quotes in DocumentRoot, it should be
DocumentRoot /Users/stevekirkendall/Sites/kblog.dev
Offline