How to use my computer as a web server?
#1
Posted 18 June 2005 - 10:44 AM
I have it up months ago, but I can't seemed to do it again.
I have already a free dynamic DNS service up and a domain name attached with it, all via www.dyndns.org
Have pasted a few files in my home directory (~/Sites), but entering in the URL:http://mydns.net/~/Sites returns an Apache intro page and not reflecting the files installed in the Sites folder. How is that so? I am sure I have missed out quite a bit here, could anyone filled me in with more info on how to get it up online?
Thank you
pharme
I have already a free dynamic DNS service up and a domain name attached with it, all via www.dyndns.org
Have pasted a few files in my home directory (~/Sites), but entering in the URL:http://mydns.net/~/Sites returns an Apache intro page and not reflecting the files installed in the Sites folder. How is that so? I am sure I have missed out quite a bit here, could anyone filled me in with more info on how to get it up online?
Thank you
pharme
#2
Posted 18 June 2005 - 03:49 PM
Well, the URL should be http://yourdomain.com/~yourusername/ instead of http://yourdomain.com/~/Sites/ .
#4
Posted 20 June 2005 - 03:59 AM
Funny the computers connected in the LAN are able to access the site but not remote computers. I have the DNS updated, what am I missing here? Also, I remember someone somewhere have told me that the server computer in fact need not be logged in to serve as web server, it just needs to be at the login screen, with that, there's no access even with the LAN connected computers.
Could anyone help to clarify these abit?
pharme
Could anyone help to clarify these abit?
pharme
#6
Posted 20 June 2005 - 06:12 AM
You're setting the DNS entry to your computer's private LAN IP address (which is not accessible outside your network). I'm going to guess that you're using NAT (which is very likely if your IP is either 10.0.0.x or 192.168.x.x). You'll need to set up port forwarding to your computer in your router as well as set your DNS entry as your externally accessible IP address (usually easily found using whatismyip.com).
#7
Posted 20 June 2005 - 06:26 AM
My DNS entry is the same as reflected in whatismyip.com (220.255.xxx.xxx). However, with the port forwarding in my router (Apple Basestation), I gonna guess it's the Port Mapping, only allows for 10.0.x.x entries. Has that gotta be resolved first?
Thanks
pharme
Thanks
pharme
#8
Posted 20 June 2005 - 06:33 AM
Hi car1son,
We meet again.
Just before your reply, I was reading your notes in the sites you pointed.
File Vault is off.
It might be the port forwarding part for the router that I am a little confused.
I am using a Base station with port mapping, are they the same?
Need more light on this.
thanks
pharme
We meet again.
Just before your reply, I was reading your notes in the sites you pointed.
File Vault is off.
It might be the port forwarding part for the router that I am a little confused.
I am using a Base station with port mapping, are they the same?
Need more light on this.
thanks
pharme
#9
Posted 20 June 2005 - 06:39 AM
In reply to:
However, with the port forwarding in my router (Apple Basestation), I gonna guess it's the Port Mapping, only allows for 10.0.x.x entries. Has that gotta be resolved first?
Yes, you need to find out your private IP number (which should be available in Network under System Preferences and should be a 10.0.x.x number). You'll want to map external port 80 to your IP port 80.
However, with the port forwarding in my router (Apple Basestation), I gonna guess it's the Port Mapping, only allows for 10.0.x.x entries. Has that gotta be resolved first?
#10
Posted 20 June 2005 - 06:53 AM
Yes, have done that.
Ports 21, 80, 427 and 528 have been mapped with my private IP number (10.0.x.x)
In fact that was already set.
On a really side note, why is it that when the root user is enabled in Netinfo Manager and 'Other' is not reflected in the login window? I am asking that because I am thinking my ISP might be blocking port 80 to stop me from using my computer as a server. 'sudo chmod...' in terminal does not seemed to allow me to change the httpd conf. file to port 8080 using TextEdit. I dont know if I am right in thinking this, anyhow, it bugs me a great deal to know that I can't even log in as root.
Well, d00d, thanks for your attention.
pharme
Ports 21, 80, 427 and 528 have been mapped with my private IP number (10.0.x.x)
In fact that was already set.
On a really side note, why is it that when the root user is enabled in Netinfo Manager and 'Other' is not reflected in the login window? I am asking that because I am thinking my ISP might be blocking port 80 to stop me from using my computer as a server. 'sudo chmod...' in terminal does not seemed to allow me to change the httpd conf. file to port 8080 using TextEdit. I dont know if I am right in thinking this, anyhow, it bugs me a great deal to know that I can't even log in as root.
Well, d00d, thanks for your attention.
pharme
#11
Posted 20 June 2005 - 09:58 AM
Use CanYouSeeMe.org to see if your port 80 is open ("Success")
BTW, port 21 alone is not likely to let you run an FTP server (click to read more).
BTW, port 21 alone is not likely to let you run an FTP server (click to read more).
#14
Posted 20 June 2005 - 09:04 PM
I poked around this and I think the problem is actually related to a quirk in Apache that I had not previously noticed:
http://sitename.dyndns.org/~username/ works fine on the LAN and externally.
http://sitename.dyndns.org/~username only works on the LAN.
(Note the trailing "/").
Why? From the Apache docs:
E.g., on my system, http://localhost/~username ends up actually displaying http://hostname.local/~username/ . obviously hostname.local is valid on my LAN, but doesn't mean anything outside of it.
I can't think of any way to work around that other than to insist external users provide the trailing/ slash (/) or even /index.html.
http://sitename.dyndns.org/~username/ works fine on the LAN and externally.
http://sitename.dyndns.org/~username only works on the LAN.
(Note the trailing "/").
Why? From the Apache docs:
In reply to:
A "trailing slash" redirect is issued when the server receives a request for a URL http://servername/foo/dirname where dirname is a directory. Directories require a trailing slash, so mod[/u]dir issues a redirect to http://servername/foo/dirname/ .
It appears that this "Trailing slash" redirect (code 301) employs the local host name.A "trailing slash" redirect is issued when the server receives a request for a URL http://servername/foo/dirname where dirname is a directory. Directories require a trailing slash, so mod[/u]dir issues a redirect to http://servername/foo/dirname/ .
E.g., on my system, http://localhost/~username ends up actually displaying http://hostname.local/~username/ . obviously hostname.local is valid on my LAN, but doesn't mean anything outside of it.
I can't think of any way to work around that other than to insist external users provide the trailing/ slash (/) or even /index.html.



Sign In
Register
Help


MultiQuote