apache server, and webpage

All about creating websites!
Post Reply
User avatar
moudy
Technology Enthusiast
Technology Enthusiast
Posts: 688
Joined: 10 Feb 2009, 17:00
15
Location: Beirut, Lebanon

apache server, and webpage

Post by moudy »

Hello every one
I'm planning to set up my home based server, and put on it a simple web page...
I have already downloaded apache, and set it up, tested it, and showed me after hitting 127.0.0.1 on my browser : It works! Which i suppose means that the server is set up...
Now i have several obstacles:
1- I have a dynamic IP (DSL connection). I read many tuts, and I think there is a service that detects the change in ur IP and redirects to the same domain, so no worries in this.
2- When i enter my current IP on another machine in my home it gives authentication required, and if i hit cancel, the page says "HTTP/1.0 401 Authorization Required" can i over come this, coz eventually ppl would want to visit my page
3- If i overcome the two above obstacles, how can I put a simple HTML web page, and make it browsable by the public...

I tried alot on this, read alot, but i dont think im finding any thing helpful on the net.

Thanks for any help
mahmoud_shihab@hotmail.com

User avatar
7A69
forum buddy
forum buddy
Posts: 24
Joined: 28 Dec 2008, 17:00
15

Post by 7A69 »

I'm only sure about the third question so put the html(and other files you want to host) to htdocs folder that is located in the folder you installed apache in.
(In my windows it's C:Program Files\Apache Software Foundation\Apache2.2\htdocs)

User avatar
moudy
Technology Enthusiast
Technology Enthusiast
Posts: 688
Joined: 10 Feb 2009, 17:00
15
Location: Beirut, Lebanon

Post by moudy »

well, i read some thing like that on many websites, but thanks any way, now i have to actually write a page for me,
but the first 2 are major obstacles for me :?
mahmoud_shihab@hotmail.com

User avatar
DNR
Digital Mercenary
Digital Mercenary
Posts: 6114
Joined: 24 Feb 2006, 17:00
18
Location: Michigan USA
Contact:

Post by DNR »

also you may have to set permissions for access to directories on the server -

The issue with dynamic IPs can be overcome by IP redirection services - when you log on the server - it'll update the DNS routers to where your www.homepage.com is to the new IP issued by your ISP.

DNR
-
He gives wisdom to the wise and knowledge to the discerning. He reveals deep and hidden things; he knows what lies in Darkness, and Light dwells with him.

User avatar
floodhound2
∑lectronic counselor
∑lectronic counselor
Posts: 2117
Joined: 03 Sep 2006, 16:00
17
Location: 127.0.0.1
Contact:

Post by floodhound2 »

moudy - I am simply confused. Your web server is set to be within your home network. If I am still confused then why worry about the ip-address? If you wish to set the server so that when you are away from the home network then sure youll need to know the ip-address and this is why it becomes important to obtain a static address.

One solution is to have your home computer/server send its IP-address to some other server (has a static address) that can give it out to whomever wishes to access it. This is kind of an oxymoron though.

Of course the real solution is to contact your Ip-provider and get a static ip-address.

Perhaps I am not clear on what you intend on doing, but thought I would chime in on the assumptions I have made.

Congrats on setting it up this far.

User avatar
moudy
Technology Enthusiast
Technology Enthusiast
Posts: 688
Joined: 10 Feb 2009, 17:00
15
Location: Beirut, Lebanon

Post by moudy »

DNR wrote:also you may have to set permissions for access to directories on the server
that's some thing good to hear, but how can set permissions


floodhound2 wrote:I am simply confused. Your web server is set to be within your home network. If I am still confused then why worry about the ip-address? If you wish to set the server so that when you are away from the home network then sure youll need to know the ip-address and this is why it becomes important to obtain a static address.
sorry floodhound, I should have explained more :oops:
first of all i want to access the box from a foreign computer.
moudy wrote:When I enter my current IP on another machine in my home...

i meant any computer with an internet connection, and not a home network (I should have explained better)
mahmoud_shihab@hotmail.com

User avatar
computathug
Administrator
Administrator
Posts: 2693
Joined: 29 Mar 2007, 16:00
17
Location: UK
Contact:

Post by computathug »

hey moudy, first of all have you registered a domain name. If not you can see b_b about this. If you dont have a domain name this is the error you will get or the problem maybe the domain name is not pointing to your ip address.

127.0.0.1 which gives you the 'It works' page, you can find this which will be index.html and edit it for a bit more effect till you get registered.

The service i think your refering to is no-ip.com or something similar, cant remember at the mo and its late. :wink:

User avatar
Big-E
Administrator
Administrator
Posts: 1332
Joined: 16 May 2007, 16:00
16
Location: IN UR ____ , ____ING UR _____ .
Contact:

Post by Big-E »

If you have a static IP, you can assign up for dyndns.com which allows you to resolve a domain to a dynamic IP using their client - I do that for my house network, so I can access everything remotely.

If you have a domain name, just assign a CNAME record to point to the dyndns.com assigned name and you won't have to worry about updating your IP address everytime it changes (if it`s dynamic).

If you have a NAT router, you may have to assign the server as a DMZ, which basically allows complete access to that computer from the outside world - doing so, you will want to make sure you set up a firewall on the computer which is easily done via IPTables.

Then, you will want to run apache or an alternative web server and install all the applicatable modules for your server and your *pretty much good to go.

Good luck.

User avatar
moudy
Technology Enthusiast
Technology Enthusiast
Posts: 688
Joined: 10 Feb 2009, 17:00
15
Location: Beirut, Lebanon

Post by moudy »

That's really good information you provided me with up there.
Thanks for each and every one
Ill work on what you told me and see what I come up with, and if i face any problem I'll feel free to ask you 8)
mahmoud_shihab@hotmail.com

User avatar
moudy
Technology Enthusiast
Technology Enthusiast
Posts: 688
Joined: 10 Feb 2009, 17:00
15
Location: Beirut, Lebanon

Post by moudy »

I found some useful articles related to this topic, and since the topic is not old yet, i decided to post the links here :wink:

Code: Select all

http://lifehacker.com/software/feature/geek-to-live-how-to-access-a-home-server-behind-a-routerfirewall-127276.php?mail2=true

Code: Select all

http://lifehacker.com/software/feature/how-to-set-up-a-personal-home-web-server-124212.php

Code: Select all

http://lifehacker.com/software/web-publishing/geek-to-live--how-to-assign-a-domain-name-to-your-home-web-server-124804.php
mahmoud_shihab@hotmail.com

pseudo_opcode
cyber messiah
cyber messiah
Posts: 1201
Joined: 30 Apr 2006, 16:00
17
Location: 127.0.0.1

Post by pseudo_opcode »

why make it complicated?

Which ip address are you typing in to reach your server? internal or external?

trying to access your server from internal network wont work with external ip(usually),in this case you have to access it from internal ip, trying to access it from external will again give you the router web iface

Usually your external ip points to your router which is usually running on port 80, hence you're getting the authorization error.

You can simply set up port forwarding and the ip will work. no need to worry about DMZ or iptables, your server is protected by router already.
Big-E wrote:If you have a static IP, you can assign up for dyndns.com which allows you to resolve a domain to a dynamic IP using their client - I do that for my house network, so I can access everything remotely.
i think you mean "if you a have a dynamic IP" because for static ip you can always remember your ip, its not a big deal to remember your own ip.

And you can always add an "A" record pointing to your static ip, so we dont need a dyndns in case of static ip.


and yeah you need to run a little client to update your ip info periodically to nameservers of the dynamic dns service providers such as no-ip.com and dyndns.com

Post Reply