1

I'm currently experimenting with setting up a site on WAMP server to hold some personal information. Because my ISP blocks port 80, I've had to change apache's default port from 80 to 25565 (I believe that I've also left port 80 operable just in case, though). All of this has gone well, as I am completely able to access my server by typing in "localhost" or "localhost:25565" into google chrome.

However, when using my external IP address, I get a variety of errors, namely "connection timed out". In general my queries are made in the format "xxx.xx.xx.x:25565" or "xxx.xx.xx.x", substituting my own external IP. The port is completely forwarded (I've checked http://canyouseeme.org several times) and as I mentioned, the site is working correctly from the localhost.

I am running the latest version of wordpress on the site and using the wordpress homepage as my index.php (replacing the WAMP default). I am also attaching segments of httpd-vhosts.conf and httpd.conf which I modified from WAMP defaults in case those are a part of my issue. Thanks in advance.

Update: I was able to discover that this is actually still a problem with port 80. Apparently the server was still trying to send the final data over port 80 even though it was responding to the initial request on port 25565. If anyone knows a workaround for this, please let me know.

httpd-vhosts.conf:

<VirtualHost *:25565>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "c:/Apache24/docs/dummy-host.example.com"
    ServerName dummy-host.example.com
    ServerAlias www.dummy-host.example.com
    ErrorLog "logs/dummy-host.example.com-error.log"
    CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot "c:/Apache24/docs/dummy-host2.example.com"
    ServerName dummy-host2.example.com
    ErrorLog "logs/dummy-host2.example.com-error.log"
    CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>

httpd.conf

Listen 0.0.0.0:80
Listen [::0]:80
Listen 0.0.0.0:25565
Listen [::0]:25565
Robert Dibble
  • 11
  • 1
  • 3

1 Answers1

0

Ok, First you do not have to change Apache's port from the default port 80. What you should do is change your routers Port Forwarding configuration so that external access to your router port 25565 is forwards to the ip address of the PC running WAMPServer so for example 192.168.1.10 and port 80.

So that makes incoming connects on the routers port 25565 forward the connection to 192.168.1.10:80. This gets round your ISP blocking port 80 and for internal use keeps things using the default port 80.

Secondly the default httpd-vhost.conf file is what Apache release and is not tailored for WAMPServer use. So basically is useless as it points DocumentRoot to somewhere that does not exist on a WAPServer installation i.e. DocumentRoot "c:/Apache24/docs/dummy-host.example.com"

So you are going to have to delete the example code and rewrite it for a WAMPServer installation.

Thirdly, using WordPress complicates things a little because of the way WordPress stores the url used when you install it ( probably you used something like localhost) into its database and then uses it when building urls internally. Its the building of its internal urls that causes problems as you may reach the site homepage but when you click an internal link or menu item it will generate a url like localhost/next-page and of course if a browser see's localhost it is going to look on the clients PC for the Apache web server to server that page, and it wont be there.

So first I suggest you read this post Project Links do not work on Wamp Server It explains why Virtual Hosts are a good idea and also how to create them properly in WAMPServer.

Then you will need to register and get a Dynamic DNS domain name from somewhere like no-ip.com, they let you have one for free.

Then you will need to follow these instructions to change a sites url so you make your sites url match the dynamic dns url that you have got from someone like no-ip.com.

Then a remote user will be able to use the dynamic dns url and the port number to access your server eg mysite.no-ip.net:25565

Community
  • 1
  • 1
RiggsFolly
  • 93,638
  • 21
  • 103
  • 149