Problem when accessing from outside
Posted by: Dmondark (194.165.134.---)
Date: November 02, 2006 12:29PM

Hey guys..

I installed Wamp 1.6.5 successfully, I am not having any problems, well except this.

I have installed wordpress just to test the php, when I use the server online or ofline and access the wordpress from my computer, both work great....

But yesterday I gave my ip to a friend to try the url (after putting wamp online ofcourse), he tried to access it (http://[myip]/blog/), but all he got was the text (naked pages with no images nor styles..etc).

I have it installed on WinXP SP2 (and I made sure that the Apache web server is enabled in windows firewall), can anyone help me with this?

Chears,
Dmondark


Options: ReplyQuote
Re: Problem when accessing from outside
Posted by: tha_neo (---.06-197-73746f22.cust.bredbandsbolaget.se)
Date: November 02, 2006 10:40PM

Dude, it took me a while to find it but it was just so damn easy its irritating.
If you press on that wampserver icon in system tray you´ll get a list of options.
Press the last one, Put online. this will do it allsmiling smiley

Options: ReplyQuote
Re: Problem when accessing from outside
Posted by: Dmondark (86.108.113.---)
Date: November 02, 2006 10:45PM

Thanks dude!
But, the problem is that I am already have it online! and the page cannot viewed from across the internet, just without images or styles.. anyone knows what is it about??

thanks

Options: ReplyQuote
Re: Problem when accessing from outside
Posted by: alanmarcel (---.user.veloxzone.com.br)
Date: November 03, 2006 03:32PM

ok..
here we go..
you must change the config file called " httpd.conf ".
open it with notepad and find (ctrl+F) " Listen 80 " (no quotations marks) and change for Listen 8080.
now, restart your wamp and try to access " http://[myip]:8080/blog/ "
I did it and it works here.. I hope same for you!

NOTE: the file " httppd.conf " is here " C:\wamp\Apache2\conf "

Regards,

Alan Marcel

Options: ReplyQuote
Re: Problem when accessing from outside
Posted by: CyberSpatium (71.237.217.---)
Date: November 03, 2006 08:07PM

if you change the port apache listens to you will have to add the port to your URI like this
[localhost]


CyberSpatium
WAMP English Forum Admin

Options: ReplyQuote
Re: Problem when accessing from outside
Posted by: Dmondark (86.108.96.---)
Date: November 03, 2006 11:41PM

Thank you alanmarcel and CyberSpatium,

I did it but it did not solve the problem.. the problem is happening on any port I listen to.

After checking around, I found the path to the CSS in the resulting page was pointing to full url which includes 'localhost', instead of a relative url (or at least a url that contains the IP address).

I am no PHP guru (in fact, I got Wamp to learn PHP) but why is PHP translating the path to HTML as localhost? is there any config that I can do so it only puts the relative url in the resulting pages?

both "localhost" and IP address paths work if I access them from the same machine where Wamp is installed, this problem is occurring only when accessing from across the internet.



Post Edited (11-03-06 23:46)

Options: ReplyQuote
Re: Problem when accessing from outside
Posted by: rdarlin2 (---.nc.res.rr.com)
Date: November 03, 2006 11:45PM

I am in the same situation. A fresh install - creation of a project ("portal"winking smiley. Placed Online. Registered DNS - and I AM able to access the page locally using 'http\\localhost\portal'.

However, when accesing the site from a remote network via the internet, all image and style references are broken. The text is visible. The properties of the image files and links (menus) show they are pointed to "localhost" not the DNS name used to access the site.

To give more detail, the httpd.ini has the following settings:
ServerName localhost:80
UseCanonicalName Off

I changed these to:
ServerName Clan-Wallace.zyns.com:80
UseCanonicalName On

and restarted the services but the same problem occurs. How do I get the web server to use the DNS name in its' URL addressing for internal resources?

What am I missing?

Options: ReplyQuote
Re: Problem when accessing from outside
Posted by: Dmondark (86.108.96.---)
Date: November 03, 2006 11:50PM

rdarlin2,

yeah, I guess your problem is the same..just to make sure, access the page from the localhost and view the source and see where the CSS files are located (mine is shown as [localhost])..

I will tweak around, and if I found anything I will post it here..or hopefully someone else would know what we are missing.

PS: I tried it with both php4 and php5, its the same.

Options: ReplyQuote
Re: Problem when accessing from outside
Posted by: CyberSpatium (71.237.217.---)
Date: November 04, 2006 03:45AM

rdarlin2

you can not just pluging anyting you want for server name and expect it to work. server name has nothing to do with dns.

you need to remove any and all changes you made to your httpd.conf file. now, make sure your subdomain Clan-Wallace.zyns.com points to your ip address. in technical terms this means you need to make an A type dns record at zyns.com to tie your ip address to your subdomain. once you do that, your server use your subdomain. no changes to httpd.conf needed.

CyberSpatium
WAMP English Forum Admin

Options: ReplyQuote
Re: Problem when accessing from outside
Posted by: rdarlin2 (---.nc.res.rr.com)
Date: November 04, 2006 05:57PM

CyberSpatium,

I have an A record set up:
1494708 @ Clan-Wallace.zyns.com A 69.134.206.226
1494709 www Clan-Wallace.zyns.com A 69.134.206.226
1494710 ftp Clan-Wallace.zyns.com A 69.134.206.226
1494711 Clan-Wallace.zyns.com MX Clan-Wallace.zyns.com.
1494712 Clan-Wallace.zyns.com MX Clan-Wallace.zyns.com.

I am getting to the site through the internet, using the fqdn. That's why I attempted to change the httpd.conf to conform to the fqdn (without success).

I replaced the httpd.conf entries - restarted svcs - the site always references everything with 'localhost', even when connecting via internet using fqdn in the URL OR even when using the IP address in the URL.

So it seems to me there is something in the site configuration that is off. Can I send you my .conf/.ini files? Any other suggestions?

Thanks.

Options: ReplyQuote
Re: Problem when accessing from outside
Posted by: yfastud (---.mia.bellsouth.net)
Date: November 04, 2006 06:07PM

Did you setup Virtual Host associated with your A records?

For examples:

NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.your_domain.com
ServerAlias your_domain.com
DocumentRoot C:/wamp/www/your_domain
</VirtualHost>

<VirtualHost *:80>
ServerName subdomain1.your_domain.com
DocumentRoot C:/wamp/www/subdomain1
</VirtualHost>

<VirtualHost *:80>
ServerName subdomain2.your_domain.com
DocumentRoot C:/wamp/www/subdomain2
</VirtualHost>

So you can have something like this:

[jlbn.com]
[test.jlbn.com]
[forum.jlbn.com]
[mail.jlbn.com]
[ftp.jlbn.com]


Hope this help

Edit:
BTW, in my config file, server name is still localhost though.



Post Edited (11-04-06 18:16)

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Problem when accessing from outside
Posted by: CyberSpatium (71.237.217.---)
Date: November 04, 2006 07:22PM

no, yfastud, if you are just using one subdomain or domain you do not need to setup virtual hosting..your subdomain will searve your website files from document root c:\wamp\www

CyberSpatium
WAMP English Forum Admin

Options: ReplyQuote
Re: Problem when accessing from outside
Posted by: rdarlin2 (---.nc.res.rr.com)
Date: November 04, 2006 08:02PM

THANK YOU one and all - however I've decided my problem is not related to WAMP - that loks to be fine. The problem has to do with the website I installed in the WAMP www directory that I had been accessing locally as \\localhost\portal.

The website I installed is is a Joomla install - and in ITS setup I specified 'localhost\portal' as the site name - and I believe it's in that configuration I need to make changes so that all references for the site name are to the fqdn.

Thanks again everyone.

Options: ReplyQuote


Sorry, only registered users may post in this forum.