Jump to content

Welcome to We Got Served Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Photo

Xampp On Whs 2011, Port Access

- - - - - apache xampp port web access website mysql router remote access

  • Please log in to reply
8 replies to this topic

#1
cjp87

cjp87

    Newbie

  • Members
  • Pip
  • 8 posts
Hello all,

I've recently built a home server using WHS 2011, and I've run into a bit of a problem while trying to set up an Apache/MySQL/php server using XAMPP. Prior to installing XAMPP, the port-forwarding features I had working were remote access (port 443) and the mstcs.exe remote desktop access (either port 3389 or 4125, not positive). Both worked fine, either way. Oddly, port 80 (http://... access to remote desktop) never worked, but I didn't worry too much since 443 did work.

However, after installing XAMPP, and assigning Apache to use port 81 (so as not to interfere with what WHS 2011 wanted to do with port 80), some issues arose. For one, port 443 closes when I have Apache running as a service, despite the two not being on the same ports. So I lose the remote web client when Apache is on (the remote desktop client remains active). If I disable Apache and restart, 443 becomes active again.

In all of this, however, 81 is never open to remote access. I can only access 81 from localhost:81.

I'm rather new to this stuff, so sorry if I'm not providing all the necessary information, but I would appreciate any help.

Thanks!


Upgrade to a WGS Supporter Account to remove this ad.

#2
Drashna Jaelre (WGS)

Drashna Jaelre (WGS)

    Tinkerer

  • Lead Moderator
  • 14,582 posts
  • Gender:Male
  • Location:San Diego, CA, USA
  • Interests:Computers, Home Server (obviously), math, science, good books, friends
Contributor
Why bother with apache? Seriously? IIS supports PHP and works pretty well. In fact, if you use the Web Platform Installer, it will install PHP for you, and can install a number of other packages.

And if you absolutely need mod_rewrite support, there are a number of very good solutions and I've had best success (on v1 at least) with Helicon Ape (which has a free "3 site" version). Worth checking out, and no need to worry about more ports and such.

#3
cjp87

cjp87

    Newbie

  • Members
  • Pip
  • 8 posts
I was using Apache under the assumption that the remote access page was the only external website WHS would set up by default. PHP and MySQL are really the things I need, and so long as I can copy the php and database files I've already got, it doesn't matter too much what avenue I go through to put it online.

Is there some issue with WHS 2011 and Apache compatibility? As a check, I installed XAMPP on my Macbook Pro, port forwarded port 81 (and changed the httpd files to direct to 81), and I have external access with no problem. So the disconnect is between the router and WHS (or rather, WHS and Apache, I imagine).

I will continue to look into the alternatives you suggested as well. Thanks for your time!

#4
Drashna Jaelre (WGS)

Drashna Jaelre (WGS)

    Tinkerer

  • Lead Moderator
  • 14,582 posts
  • Gender:Male
  • Location:San Diego, CA, USA
  • Interests:Computers, Home Server (obviously), math, science, good books, friends
Contributor
WHS2011's IIS setup is "unique" and cause issues with other web servers from what I've seen. If you have mysql installed, you can probably just leave it (or copy the data files), but you'll want to "reinstall" php.

Head over to iis.net for details on how to install PHP and the like. And yes, you can use your existing data. :)

#5
cjp87

cjp87

    Newbie

  • Members
  • Pip
  • 8 posts
Hi again. So, I followed several different sets of instructions to set up IIS with php/mysql, and while it would allow the website to appear through the WAN, the php was not translated into HTML (that is, it was broken images and a short line of php code). I'm pretty sure everything was properly configured, as I double checked every setting page with screenshots in various how-tos. Never did get the php translated.

Reinstalled XAMPP and tried a few things, like adding exceptions to the firewall. No matter what I do, it works on localhost/..., but will not work from the external IP or URL. Canyouseeme.org reports that the specified port is closed, despite having it open on the router and forwarded to the WHS machine, and then having the firewall exception and httpd file set to open and listen on port 3307. Seems no matter what I do, I can't get anything to work from all directions.

Of note, when I had things set up through IIS, phpmyadmin was available from the WAN. I have a friend who knows php and server side maintenance stuff, and he was able to access phpmyadmin when it was routed through IIS, but the webpage (which works in XAMPP/localhost) was still broken when accessed anywhere.

Any suggestions on what I should try next? I feel like either method is so close to success, but I haven't been able to figure out what component is missing from either.

#6
Drashna Jaelre (WGS)

Drashna Jaelre (WGS)

    Tinkerer

  • Lead Moderator
  • 14,582 posts
  • Gender:Male
  • Location:San Diego, CA, USA
  • Interests:Computers, Home Server (obviously), math, science, good books, friends
Contributor
If phpMyAdmin was working just fine, and you had broken images and such, then it sounds like it was requiring mod_rewrite support. FastCGI sort of supports it, but not well. That may be the issue. Have you tried using one of the several mod_rewrite tools for IIS? (Helicon APE is the best IMO, and "free for 3 sites").

#7
cjp87

cjp87

    Newbie

  • Members
  • Pip
  • 8 posts
I installed Helicon APE, but I'm somewhat lost as to what I'm supposed to do with it. Sorry for the noobishness, but I'm kindof fumbling around in the dark if I don't have something to try and replicate from a how-to or I can't treat it as I did in an earlier attempted method. Am I supposed to change anything with the configuration after installing Helicon APE?

Edit: After allowing directory browsing on the server, phpinfo now works correctly, via localhost or WAN. It seems this website is the only thing not working correctly, despite working fine under XAMPP (localhost).

Here's the broken front page, by the way.

Posted Image

#8
cjp87

cjp87

    Newbie

  • Members
  • Pip
  • 8 posts
Hey again,

Just wanted to close this up by saying we figured out the problem. I guess XAMPP is okay with the short tag <?= (rather than <?=php), while IIS didn't like it quite as much (apparently due to potential XML confounding), and so it was not accepting the short tags as PHP code. So while the Apache/WHS issue was never resolved, it is working just fine through IIS, and all is well.

Thanks again for the help!

#9
Drashna Jaelre (WGS)

Drashna Jaelre (WGS)

    Tinkerer

  • Lead Moderator
  • 14,582 posts
  • Gender:Male
  • Location:San Diego, CA, USA
  • Interests:Computers, Home Server (obviously), math, science, good books, friends
Contributor
Yeah, though you can manually edit the php.ini and turn on "short tags". I've noticed a lot of gallery type stuff want it enabled. For the most part, it should definitely be fine. :)

And glad that you got it working through IIS. Better to have everything working on one web server than have to have two running. IMO. :)





Also tagged with one or more of these keywords: apache, xampp, port, web access, website, mysql, router, remote access

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users


Upgrade to a WGS Supporter Account to remove this ad.