Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-04-12 01:26:54

Obsidian
New Member
Registered: 2011-04-12
Posts: 5

Local XAMPP Multi-site setup, Textpattern setup returns 404.

Hello all,

I have XAMPP installed on Windows as a local test setup. I’m trying to get Textpattern working in a multi-site setup having followed the instructions in textpattern/sites/readme.txt (Integrated Admin Area)

In httpd-vhosts.conf, I have:

NameVirtualHost localhost:80
<VirtualHost localhost>
	ServerName localhost
	DocumentRoot "D:/WebDev/xampp/htdocs/textpattern"
</VirtualHost>
<VirtualHost site1.dev>
	ServerName site1.dev
	DocumentRoot "D:/WebDev/xampp/htdocs/textpattern/sites/site1/public"
</VirtualHost>
<VirtualHost site2.dev>
	ServerName site2.dev
	DocumentRoot "D:/WebDev/xampp/htdocs/textpattern/sites/site2/public"
</VirtualHost>

If I type in the browser address, “localhost”, it displays config.php is missing or corrupt. To install Textpattern, visit textpattern/setup/ and clicking on the link I am brought to the setup menu. I assume this is not what I want for a multi-site setup and should not proceed with this setup process as it is for a single site.

If I type in the browser address, “site1.dev”, it also displays the config.php is missing or corrupt. To install Textpattern, visit textpattern/setup/, as expected but clicking on the link returns a 404. From what I understand, I am supposed to run this setup for each site but the 404 appears for both sites and I am unable to proceed.

It looks like the setup index.php is located at D:\WebDev\xampp\htdocs\textpattern\sites\site1\admin\setup, but I don’t see how I’m supposed to navigate to it if the root is D:\WebDev\xampp\htdocs\textpattern\sites\site1\public.

I’m stuck at this point and am unsure what I’m doing wrong, any pointers would be appreciated.

Last edited by Obsidian (2011-04-13 05:31:57)

Offline

#2 2011-04-12 10:59:58

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Local XAMPP Multi-site setup, Textpattern setup returns 404.

Obsidian wrote:

If I type in the browser address, “localhost”, it displays config.php is missing or corrupt. To install Textpattern, visit textpattern/setup/ and clicking on the link I am brought to the setup menu. I assume this is not what I want for a multi-site setup and should not proceed with this setup process as it is for a single site.

Right. (FWIW, there’s no need to point localhost to D:/WebDev/xampp/htdocs/textpattern. Ordinarily one would point this at the web root, i.e. D:/WebDev/xampp/htdocs)

If I type in the browser address, “site1.dev”, it also displays the config.php is missing or corrupt. To install Textpattern, visit textpattern/setup/, as expected but clicking on the link returns a 404. From what I understand, I am supposed to run this setup for each site but the 404 appears for both sites and I am unable to proceed.

It looks like the setup index.php is located at D:\WebDev\xampp\htdocs\textpattern\sites\site1\admin\setup, but I don’t see how I’m supposed to navigate to it if the root is D:\WebDev\xampp\htdocs\textpattern\sites\site1\public.

The default site1 setup has a symlink to setup in public. This allows you to navigate to site1.dev/setup to complete the setup. If you use cp -R when copying the default site1 directory the symlinks should be copied correctly. (You can add the symlinks yourself, but note that there are several of them, both in admin and public.)

(Re the 404, the link to textpattern/setup, plus other links you’ll see once you get to the “Welcome to your site” screen, all assume a standard, i.e., not multisite, setup. This is a Txp bug, to the degree that multisite is an officially supported feature.)


Code is topiary

Offline

#3 2011-04-12 20:41:03

Obsidian
New Member
Registered: 2011-04-12
Posts: 5

Re: Local XAMPP Multi-site setup, Textpattern setup returns 404.

Thanks, that makes things a little more clear.

For anyone else reading, I got it to work with separate admin areas, though I’m still baffled by the integrated admin area method. I can’t seem to get symlinks working. httpd-vhost.conf now looks something like this (and had to re-edit my hosts file in Windows after some head-scratching):

<VirtualHost site1.dev>
	ServerName site1.dev
	DocumentRoot "D:/WebDev/xampp/htdocs/textpattern/sites/site1/public"
</VirtualHost>
<VirtualHost admin.site1.dev>
	ServerName admin.site1.dev
	DocumentRoot "D:/WebDev/xampp/htdocs/textpattern/sites/site1/admin"
</VirtualHost>
<VirtualHost site2.dev>
	ServerName site2.dev
	DocumentRoot "D:/WebDev/xampp/htdocs/textpattern/sites/site2/public"
</VirtualHost>
<VirtualHost admin.site2.dev>
	ServerName admin.site2.dev
	DocumentRoot "D:/WebDev/xampp/htdocs/textpattern/sites/site2/admin"
</VirtualHost>

Also, the readme doesn’t mention creating a database table prefix during setup, I assume you would want to do this for each new site.

The textpattern.css file in admin doesn’t have anything valid inside of it so I copied the version in the main textpattern directory along with the theme and txp_img folders over. I suppose you could also create a symlink to those, but I’m having problems creating them in Windows.

Also, each public directory needs a copy (or symlink) of .htaccess from the root directory.

Last edited by Obsidian (2011-04-12 20:53:58)

Offline

#4 2011-04-12 21:00:02

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Local XAMPP Multi-site setup, Textpattern setup returns 404.

Obsidian wrote:

I got it to work with separate admin areas, though I’m still baffled by the integrated admin area method. I can’t seem to get symlinks working.

For the integrated admin configuration you’ll need a symlink to admin in public (default site1 has this symlink). I’ve always used the separate-admin-area method so can’t comment further.

Also, the readme doesn’t mention creating a database table prefix during setup, I assume you would want to do this for each new site.

Correct, if you are using a single database for multiple sites, which is optional (I use separate DBs).

The textpattern.css file in admin doesn’t have anything valid inside of it so I copied the version in the main textpattern directory along with the theme and txp_img folders over. I suppose you could also create a symlink to those, but I’m having problems creating them in Windows.

These are all supposed to be symlinks (as they are in the default site1). I don’t do Windows, so won’t be much help with this.


Code is topiary

Offline

#5 2011-04-12 23:53:04

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Local XAMPP Multi-site setup, Textpattern setup returns 404.

Obsidian, what version of Windows are you using? Symlinks were added in Vista, so Vista or newer is required.

Did you use SVN checkout to download Textpattern? If you did, that might explain why the symlinks appear as normal files. If I remember correctly (I might be wrong), SVN doesn’t create symlinks on Windows, but only on Mac and Linux. Which would mean that you need to change the versioned special property files to symlinks manually.

Offline

#6 2011-04-13 00:19:41

Obsidian
New Member
Registered: 2011-04-12
Posts: 5

Re: Local XAMPP Multi-site setup, Textpattern setup returns 404.

I’m on Windows 7. I downloaded textpattern-4.4.0.zip and extracted. The symlinks are extracted but don’t seem to function. I’ll investigate the symlinks issue further, I’m probably just not creating/using them correctly.

Offline

#7 2011-04-13 02:35:26

Obsidian
New Member
Registered: 2011-04-12
Posts: 5

Re: Local XAMPP Multi-site setup, Textpattern setup returns 404.

The more I read into it, the more I believe the readme is a little “off”. It’s split up into two separate sets of instructions with an option for a “separate admin area” and an “integrated admin area”. Seems to me, both are the same: directory structure for the admin areas are all discretely isolated between sites; databases are separated either by table prefix or a unique database for each site. The admin area is always separate for each site, it is never “integrated”.

I think the real difference is how you reach the admin area, either by creating a subdomain, or by creating symlinks (or possibly a third method using mod_rewrite in .htaccess ). Both methods work as pointers to where the admin files are kept. The readme doesn’t explain this at all and I had wondered how Textpattern would automagically know how to to keep the site’s pages separated in an “integrated” setup. All very confusing when explained incorrectly.

Anyway, I realized that the symlinks included with the .zip were probably Unix specific, so I trashed them and manually created a bunch of new ones with Windows. In case anyone else is wondering:

  1. Open the Unix symlinks with a text editor and copy the link. Trash the symlink. The “setup” symlink will look something like, ../admin/setup .
  2. Start command-prompt with administrative privileges.
  3. Navigate to the directory containing the symlinks.
  4. Enter mklink /d setup ..\admin\setup . “/d” creates a directory link (as opposed to a file link), “setup” is the name of the symlink. Note the forward slashes.
  5. Repeat for any other symlinks in public and admin.
  6. Add a symlink in each public directory to .htaccess in root. You want a file link, so don’t use the “/d” switch.
  7. Create some more file links in admin for jquery.js, textpattern.css and textpattern.js. All three need to point to their respective counterparts in ..\..\..\textpattern\
In summary:
  • Public needs directory links for setup, textpattern and theme, and a file link to the .htaccess file.
  • Admin needs directory links for theme and txp_img, and file links for jquery.js, textpattern.css and textpattern.js.

Everything seems to work now. Thanks for the help above.

Last edited by Obsidian (2011-04-14 18:00:02)

Offline

#8 2011-04-13 11:32:10

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Local XAMPP Multi-site setup, Textpattern setup returns 404.

Obsidian wrote:

The more I read into it, the more I believe the readme is a little “off”. […] I think the real difference is how you reach the admin area, either by creating a subdomain, or by creating symlinks. Both methods work as pointers to where the admin files are kept. The readme doesn’t explain this at all and I had wondered how Textpattern would automagically know how to to keep the site’s pages separated in an “integrated” setup. All very confusing when explained incorrectly.

You’re right; you’ve come up with a clearer explanation. Thanks for that, and also your instructions for Windows symlinks.

Edit: Added a note to maverick’s Multisite topic.

Last edited by jsoo (2011-04-13 11:42:03)


Code is topiary

Offline

#9 2011-04-13 18:17:58

Obsidian
New Member
Registered: 2011-04-12
Posts: 5

Re: Local XAMPP Multi-site setup, Textpattern setup returns 404.

Hmm… almost everything is working…

Those handy little dropdowns on content/write, presentation/pages, and presentation/forms don’t seem to work for me. I see them listed in the left sidebar but clicking on any of the links don’t seem to do anything.

Diagnostics tab doesn’t report any errors. I can edit pages, forms, create sections and write articles without issue.

Any ideas?

EDIT: Aha… I didn’t realize some of the files (jquery.js, textpattern.css, textpattern.js) in admin were also symlinks. Creating links for them fixed it.

Last edited by Obsidian (2011-04-14 17:50:59)

Offline

Board footer

Powered by FluxBB