Multiple Wordpress Sites (XP SP3) 1.7.7 [SOLVED]

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Multiple Wordpress Sites (XP SP3) 1.7.7 [SOLVED]

Postby woodcycl » 19. October 2011 16:03

I found a few online sources for setting up XAMPP so that I can work on more than one website/domain at a time. However, I was having some difficulty getting it working and then found additional information on how to set it up that somewhat conflicts with the initial setup I found. Now, I'm wondering if due to different setup due to old vs. newer versions, etc. if I'm stuck so-to-speak.

So, for Wordpress, can anyone out there give me the low-down on what I need to setup?

What I did initially was ...
1. update my hosts file so that 127.0.0.1 was set to local host but also added an additional line so that 127.0.0.1 would also point to bhp.local (a specific wordpress site). Not sure anything other than pointing to localhost is even needed though.
2. updated httpd-vhosts.conf with the <virtualhost *:80> section for my single site. But, not sure I set it up correctly or if it even needs to be setup
3. Under htdocs, i renamed my 'wordpress' folder to 'bhp' so that it was named for that specific website/domain.

I then tried logging in by going to http://localhost/bhp_wordpress/wp-admin/ but I get the Object Not Found Error 404 message. My database name hasn't changed -- bhp_wordpress. I'm a little confused now ... does the name after http://localhost/ need to be the database name or the name of the folder under htdocs? Regardless, if I use 'bhp' instead of 'bhp_wordpress' ... the wp-admin login still doesn't come up.

Let me know what information I need to provide to help you help me. :)

Any help is appreciated.
woodcycl
 
Posts: 17
Joined: 10. October 2011 19:08
Location: Southern Indiana
Operating System: WinXP Pro SP3

Re: Multiple Wordpress Sites using XAMPP

Postby Sharley » 19. October 2011 21:31

Best paste in between forum code brackets your httpd-vhosts.conf file as this is usually where the issues start, without looking at it we can only hazard a guess and waste much time. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Multiple Wordpress Sites using XAMPP

Postby woodcycl » 19. October 2011 21:54

Here are some code snippets ... I have already attempted to start over by remarking out the lines I had setup in httpd-vhosts.conf, but you can see where I tried both the ones using port 80 (<VirtualHost *:80> and the regular one (<Virtual Host *)

Code: Select all
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
##NameVirtualHost *:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#

##<VirtualHost *:80>
  ##  ServerAdmin postmaster@dummy-host.localhost
    ##DocumentRoot "C:\xampp\htdocs\bhp"
    ##ServerName localhost
    ##ServerAlias www.dummy-host.localhost
    ##ErrorLog "logs/dummy-host.localhost-error.log"
    ##CustomLog "logs/dummy-host.localhost-access.log" combined
##</VirtualHost>

##NameVirtualHost *
  ##<VirtualHost *>
    ##DocumentRoot "C:\xampp\htdocs"
    ##ServerName localhost
  ##</VirtualHost>
  ##<VirtualHost *>
    ##DocumentRoot "C:\xampp\htdocs\bhp"
    #ServerName bhp.local
  ##<Directory "C:\xampp\htdocs\bhp">
    ##Order allow,deny
    #Allow from all
  ##</Directory>
##</VirtualHost>


Code: Select all
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

#127.0.0.1        bhp.local
127.0.0.1      localhost



Code: Select all
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'bhp_wordpress');

/** MySQL database username */
define('DB_USER', 'wordpress');

/** MySQL database password */
define('DB_PASSWORD', '1234');

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');


Image

Image

Thanks for any help!
woodcycl
 
Posts: 17
Joined: 10. October 2011 19:08
Location: Southern Indiana
Operating System: WinXP Pro SP3

Re: Multiple Wordpress Sites using XAMPP

Postby Sharley » 19. October 2011 22:16

Thanks for the detailed response. 8)

Try this (you can copy and paste to your vhosts conf file) and you may wish to clean up that file by deleting any unwanted entries that may lead to confusion:
Code: Select all
NameVirtualHost *:80

<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:/xampp/htdocs"
</VirtualHost>

<VirtualHost *:80>
ServerName bhp.local
ServerAlias www.bhp.local
DocumentRoot "C:/xampp/htdocs/bhp"
<Directory "C:/xampp/htdocs/bhp" >
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
ErrorLog "logs/bhp.local.localhost-error.log"
CustomLog "logs/bhp.local.localhost-access.log" combined
LogLevel error
</VirtualHost>

Hosts file:
Code: Select all
127.0.0.1 localhost
127.0.0.1 bhp.local
Save both files and restart Apache.

You had all your entries commented out and so would not have been read by Apache.

You know that using a vhost you can put your DocumentRoot any where you like even on another partition or drive and is advisable rather than nesting in the htdocs folder.:)


Please go to the user control panel and in the profile settings add your XAMPP Version and Operating System for future reference.
viewtopic.php?f=16&t=48626

Thanks and best wishes. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Multiple Wordpress Sites using XAMPP

Postby woodcycl » 02. November 2011 22:38

Hi Sharley,

I have updated both the httpd-vhost.conf and hosts files to exactly what you provided above. I restarted apache/mysql. I am able to connect to xampp and also phpMyAdmin, but when I attempt to go to http://www.bhp.local, I get a standard problem loading page message. Any other suggestions or things I can check?

I looked in the error.log and noticed these lines
Code: Select all
[Wed Nov 02 17:04:52 2011] [error] [client 127.0.0.1] File does not exist: C:/xampp/htdocs/wordpress
[Wed Nov 02 17:04:53 2011] [error] [client 127.0.0.1] File does not exist: C:/xampp/htdocs/wordpress


Since you advised moving my document root from htdocs to its own location and due to the above error (I had renamed the 'wordpress' folder 'bhp'), I copy/pasted my folder to its own location on a D partition. I updated the httpd-vhost.conf and httpd.conf files to reflect the new document root location. However, after doing so, apache will not run.

httpd-vhost.conf
Code: Select all
    NameVirtualHost *:80

    <VirtualHost *:80>
    ServerName localhost
    DocumentRoot "D:\My Documents\XAMPP\Client Sites\"
    </VirtualHost>

    <VirtualHost *:80>
    ServerName bhp.local
    ServerAlias www.bhp.local
    DocumentRoot "D:\My Documents\XAMPP\Client Sites\bhp"
    <Directory "D:\My Documents\XAMPP\Client Sites\bhp" >
    Options Indexes FollowSymLinks Includes ExecCGI
    Order allow,deny
    Allow from all
    </Directory>
    ErrorLog "logs/bhp.local.localhost-error.log"
    CustomLog "logs/bhp.local.localhost-access.log" combined
    LogLevel error
    </VirtualHost>


httpd.conf (document root portion only)
Code: Select all
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "D:\My Documents\XAMPP\Client Sites\"


xampp control panel
Image

No entries in log files for apache not running ...

Thoughts?
woodcycl
 
Posts: 17
Joined: 10. October 2011 19:08
Location: Southern Indiana
Operating System: WinXP Pro SP3

Re: Multiple Wordpress Sites using XAMPP

Postby Sharley » 03. November 2011 01:13

but when I attempt to go to http://www.bhp.local
You need to add
Code: Select all
127.0.0.1 www.bhp.local
to the Windows host file to make that address work.
Did you try just http://bhp.local to see if that worked before making all these other changes without knowing really what you were doing. :)

So go back to your original settings and correct the Windows hosts file and try again.

Really no need to make the changes from the defaults in the httpd.conf file if you installed XAMPP to C:\xampp especially if Apache and MySQL started and is perhaps why Apache can't start now, but if you revert to the installation defaults then try again to start Apache and MySQL and let me know what happens.

Make sure that the httpd-vhosts.conf file settings I gave above work then you can experiment with changing things, but remember to always make backup copies of any configuration file you change so you can return to a know working configuration.

You may also need to install the newer Microsoft runtime file to allow 1.7.7 VC9 to work properly on XP if they are not installed already.
It can be downloaded from here:
http://www.microsoft.com/download/en/de ... px?id=5582
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Multiple Wordpress Sites using XAMPP

Postby woodcycl » 04. November 2011 20:14

Sharley,

I did make the changes to my hosts file that you recommended. And, I changed the document root back as you suggested, but apache still will not start.

To ease my pain/frustration, I'm going to completely uninstall xampp, etc. and start from scratch.

I'll follow the Windows Install instrtuctions from xampp's website.

And, once I confirm that works as expected, I'll follow these instructions for setting up virtual hosts for xampp and wordpress
http://ailoo.net/2008/07/set-up-multiple-virtual-hosts-on-xampp-for-windows/

If, however, you have a different set of instructions that you feel are better, please don't hesitate to share them with me.

If I don't hear back from you, I'll go ahead w/ the unisntall and re-isntall based on the above and let you know how it goes.

I appreciate all your help!
woodcycl
 
Posts: 17
Joined: 10. October 2011 19:08
Location: Southern Indiana
Operating System: WinXP Pro SP3

Re: Multiple Wordpress Sites using XAMPP

Postby Sharley » 04. November 2011 22:20

You could try these uninstall/reinstall instructions:
viewtopic.php?p=179699#p179699
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Multiple Wordpress Sites using XAMPP

Postby woodcycl » 04. November 2011 22:25

Yes, those are the ones i used. XAMPP has been uninstalled and system restarted.

I have since re-installed XAMPP and now apache, mysql and PHPMyAdmin are working as expected. Now, I need to focus on setting up the virtual host / Wordpress and need good instructions. If you have any suggestions, let me know. Otherwise, I'll just use what I mentioned above or any newer ones I find online.

Thanks much,
Brian
woodcycl
 
Posts: 17
Joined: 10. October 2011 19:08
Location: Southern Indiana
Operating System: WinXP Pro SP3

Re: Multiple Wordpress Sites using XAMPP

Postby Sharley » 06. November 2011 02:24

Your welcome Brian and thanks for the feedback. 8)

I will close this topic now to prevent off topic meaningless posts.
So if you have other issues then please start a new topic.

Thanks and best wishes Brian. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 70 guests