Can't access Webserver Externally on new port

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

Can't access Webserver Externally on new port

Postby daylightasunder » 18. May 2014 18:52

I have been trying to get a specific webpage hosted on our internal webserver to be accessible externally. I use pfSense for my firewall and it seems to be passing the request as the log file shows it passing the external request to the internal server address.

I have configured this specific external website on port 12345 (as example) by adding
Listen 12345 to the apache config
I then added
NameVirtualHost *:12345

<virtualHost *:12345>
DocumentRoot /var/www/site
ServerName internal.server.name
ServerAlias site site.server.name:12345 external_IP
</VirtualHost>

I have also added a DNS entry to make site.server.name point to external_IP which resolves properly

Internally I can access the site by typing internal.server.name. Externally, I have tried to access using external_IP:12345 and site.server.name:12345 and both give me a page can not be displayed.

Is there something I'm missing? (which may be in my firewall config, but that log file says it is passing the information from my external IP to the internal server IP on port 12345) or some suggestions as how to troubleshoot this problem? I have looked at the Apache log files and don't see any access to them when trying to access externally, but do see them serving information out when in the local instance.

Thanks :)
daylightasunder
 
Posts: 3
Joined: 18. May 2014 18:28
Operating System: Ubuntu 12.04 LTS

Re: Can't access Webserver Externally on new port

Postby Nobbie » 18. May 2014 20:07

Benutzt Du denn einen normalen Router für den Zugang zum Internet, oder einen eigenen PC, der als Router konfiguriert ist, oder wie oder was? Die Beschreibung ist leider viel zu oberflächlich, um eine Lösung zu ermitteln.

Du bist hier übrigens im deutschen Forum (das siehst Du allein am Titel), also kannst Du ruhig auf Deutsch schreiben.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Can't access Webserver Externally on new port

Postby daylightasunder » 19. May 2014 03:14

Könnte ein Moderator bewegen Sie bitte diesen Beitrag in XAMPP für Linux - Englisch? Ich habe falsch geschrieben :(
daylightasunder
 
Posts: 3
Joined: 18. May 2014 18:28
Operating System: Ubuntu 12.04 LTS

Re: Can't access Webserver Externally on new port

Postby Altrea » 19. May 2014 06:28

done
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Can't access Webserver Externally on new port

Postby daylightasunder » 19. May 2014 21:17

It ended up being that the webserver had a different gateway then the pfSense one. It would forward the information and then not get back to the same place. Thanks for the help.
daylightasunder
 
Posts: 3
Joined: 18. May 2014 18:28
Operating System: Ubuntu 12.04 LTS

Re: Can't access Webserver Externally on new port

Postby hhavatar » 06. August 2014 15:25

Hi, I've been having a similar issue. I've opened the ports on the router & when I plug in the external IP with the subdirectory (i.e. xxx.xxx.xxx.xxx/site) I get the site but it doesn't display property. I can see, it but the format is all wrong, colours, typeface, images etc. Any advice would be great. Thanking you in advance.
hhavatar
 
Posts: 2
Joined: 06. August 2014 15:19
Operating System: XP

Re: Can't access Webserver Externally on new port

Postby Nobbie » 06. August 2014 16:03

hhavatar wrote:I can see, it but the format is all wrong, colours, typeface, images etc.


Even if you dont apply enough information (you probably should tell us, that you are speaking about a wordpress, joomla or similar installation), i think i know, what is going wrong:

When you installed the software (which you did not tell us), you probably have been asked for a servername in a installation dialog or setup programm or similar. You probably entered "localhost" there.

If you access this installation now from outside, you dont have "localhost" as servername, because "localhost" always yields to your own PC where are working with. Instead you might use a static IP, or a dynamic IP or a domain name, which is assigned to this IP or similar. Anyway, all embedded pictures, CSS modules and so on (all URLs of these) yield to "localhost" (if you look into the source code in the browser, you definately will find lots of http://localhost/...) - and all these modules are NOT FOUND now, because "localhost" is the wrong destination in this context.

There may also be a .htaccess file in the project directory, which redirects to localhost (but this depends). In any case, if you planned to use this software not only to run on localhost, you should have supplied NOT localhost, but the same IP or domain name, as you use now to access the server. In some cases, you may be lucky and find kind of setup PHP Module, where you can replace "localhost" by the new domain or IP - then you should try this. But it may also be possible, that this localhost is hardcoded in the Database and spreaded about many modules, in that case there is no other solution than a new full installation of your software (wordpress, joomla, drupal - whatever it is).
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Can't access Webserver Externally on new port

Postby hhavatar » 06. August 2014 16:48

Hi Nobble
Thanks for coming back to me. What I've installed is is an open source site. When I look through the administration section of the website it does show up with the IP of the machine 192.xxx.xxx rather than 127.0.0.1 and I can access it from any machines on the local network via this IP no problem. You are probably right though, makes sense. I'll have a dig around and see what I can do. Thanks for the assist. Much appreciated.
hhavatar
 
Posts: 2
Joined: 06. August 2014 15:19
Operating System: XP


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 32 guests