Custom port problem with local MU installation

Situation

I’ve just setup a new installation of WordPress (running on XAMPP/Win7). As I had a port conflict on :80/:443, I switched to :187/4430.

Error

When I’m now trying to access http://vanilla-mu.dev:187/index.php (or any other request), then I run into the following WordPress Error inside a wp_die() page:

Read More

Multisite only works without the port number in the URL.

Question

As I know that the error is non resolvable according to ticket #21077, I need to somehow change my setup. How could I work around this? What would be a setup that accounts the fact that there’s a port conflict, but doesn’t run into the core bug?

The setup

// ~xamppapacheconfhttpd.conf
Listen 187
ServerName 127.0.0.1:187

// ~System32driversetchosts
127.0.0.1 localhost
127.0.0.1 vanilla-mu.dev

// ~xamppapacheconfextrahttpd-vhosts.conf
## vanilla-mu.dev
<VirtualHost *:187>
    ServerName www.vanilla-mu.dev
    ServerAlias vanilla-mu.dev
    DocumentRoot "C:xampphtdocsvanilla-mu.dev"
    <Directory "C:xampphtdocsvanilla-mu.dev">
        Options +Indexes +FollowSymLinks +Includes
        AllowOverride FileInfo
        AllowOverride All
        Order allow,deny
        Allow from all
        DirectoryIndex index.php index.shtml index.html index.htm
    </Directory>
    ErrorLog "logs/error_vanilla-mu.log"
    CustomLog "logs/access_vanilla-mu.log" combined
</VirtualHost>

EDIT: Additional info for later readers to identify possible conflicts.

Port conflict available?

First hit your Win Start Button and open the command line interface typing cmd. Then type the following line, followed by the port number to check (80 and 443).

netstat -o -n -a | findstr 0.0:80
netstat -o -n -a | findstr 0.0:443

You will then see the process(es) ID(s) that are currently using the questioned port.

enter image description here

Identify a port conflict and what is causing it

The next thing to do is to right click on your menu bar and open the Taskmanager. The Taskmanager by default doesn’t show the PID. I added a screenshot that shows you how you can add it.

enter image description here

The question still remains.

Related posts

Leave a Reply

2 comments

  1. As mentioned in the question itself, this is a problem a non-solvable due to the internals of WP core.

    What I did was getting rid of the interfering/colliding process – I simply turned it off (as changing the port wasn’t possible).

  2. I just encountered another (non WP) problem: Skype using port 80/443. This problem will only apply if Skype starts before XAMPP (or whatever local server you’re using).

    To fix it go into “tools ” then “options” and connection down the left, untick the box “use port 80 and 443 as alternative incomming ports”.

    enter image description here